[CDRIVER-1426] Race recording error message in mongoc_topology_scanner_finish Created: 27/Jul/16  Updated: 19/Oct/16  Resolved: 23/Aug/16

Status: Closed
Project: C Driver
Component/s: libmongoc, tests
Affects Version/s: 1.4.0
Fix Version/s: 1.5.0

Type: Bug Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-1435 POWER8 test failures Closed

 Description   

For example:

 [2016/07/27 13:20:59.677] Begin /server_selection/errors/dns/direct/pooled
 [2016/07/27 13:21:00.704] FAIL
 [2016/07/27 13:21:00.704] Assert Failure: "No suitable servers found: `serverSelectionTimeoutMS` expired" != "No suitable servers found: `serverSelectionTimeoutMS` expired: [Failed to resolve 'example-localhost']"
 [2016/07/27 13:21:00.937]     { "status": "FAIL", "test_file": "/server_selection/errors/dns/direct/pooled", "seed": "1573355641", "start": 7952268.906781541, "end": 7952270.166590696, "elapsed": 1.259809155 },

The problem is, we can't predict how long getaddrinfo takes to fail. If it's longer than serverSelectionTimeoutMS we'll just see "no suitable servers" without the characteristic "failed to resolve" message.

For now, make serverSelectionTimeoutMS longer. In the future, probably need to override mongoc_client_default_stream_initiator with a mock initiator that fills out "error" and never calls getaddrinfo.



 Comments   
Comment by Githook User [ 23/Aug/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1426 fix locking around scanner-finish
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0b7c29404909d288ab50c798cf2cf29cdeb5d959

Comment by Githook User [ 08/Aug/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1426 reliably test DNS error messages
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/bed373fc4f353220121ff989e8cf9c596bf53701

Comment by Hannes Magnusson [ 05/Aug/16 ]

[2016/08/05 07:24:00.930] Begin /server_selection/errors/dns/multi/fail/single
[2016/08/05 07:24:00.940] FAIL
[2016/08/05 07:24:00.940] Assert Failure: "No suitable servers found
(`serverSelectionTryOnce` set)" != "No suitable servers found
(`serverSelectionTryOnce` set): [Failed to resolve 'example-localhost'] [Failed
to resolve 'other-example-localhost']"
[2016/08/05 07:24:01.046]     { "status": "FAIL", "test_file":
"/server_selection/errors/dns/multi/fail/single", "seed": "573983579", "start":
60133.645636930, "end": 60133.761193272, "elapsed": 0.115556342 },

https://evergreen.mongodb.com/task/mongo_c_driver_ubuntu_1404_32_integration_test_2.6_replica_set_no_auth_aeb423474db0c7fcb0a2c9a22de441b24f8b7054_16_08_05_14_01_02

Comment by Githook User [ 03/Aug/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1426 don't clear error when scan starts
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/93e9bb0a0c03694bc457c0bdf9b4cb40e9358ee2

Comment by Hannes Magnusson [ 30/Jul/16 ]

https://evergreen.mongodb.com/task/mongo_c_driver_clang38_test_latest_server_auth_sasl_nossl_c6832a2086fa192f6242ab2f8dc417aa32a2fe2c_16_07_30_02_56_19

 [2016/07/29 22:16:38.870] FAIL
 [2016/07/29 22:16:38.871] Assert Failure: "No suitable servers found: `serverSelectionTimeoutMS` expired: [Failed to resolve 'example-localhost'] " != "No suitable servers found: `serverSelectionTimeoutMS` expired: [Failed to resolve 'example-localhost'] [Failed to resolve 'other-example-localhost']"
 [2016/07/29 22:16:39.543] /bin/bash: line 1: 17851 Aborted                 (core dumped) ./$TEST_PROG --no-fork -d -F test-results.json -F test-results.json
 [2016/07/29 22:16:39.544] make: *** [test] Error 134

Comment by Githook User [ 27/Jul/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1426 longer timeout in DNS tests
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/3913e40b1dde420906c01df0f64a6e18e6088218

Generated at Wed Feb 07 21:12:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.