[SERVER-22950] mongos shutdown is non-deterministic when the shutdown command is executed Created: 03/Mar/16 Updated: 21/Nov/16 Resolved: 04/Mar/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.5, 3.3.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Adam Midvidy | Assignee: | Adam Midvidy |
| Resolution: | Done | Votes: | 0 |
| Labels: | code-only | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Completed: | |||||||||||||||||
| Sprint: | Integration 11 (03/14/16) | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
Once we signalShutdown() in exitCleanly, we're in a race to shutdown between the main thread (which will return from mongoSMain and call quickExit) and the thread handling the connection, which will join all the task executor threads and then call dbExit(). Depending on which thread wins, we get different logging output, since dbExit logs the process' exit code before returning. This is causing exit_logging.js to be flaky. |
| Comments |
| Comment by Githook User [ 10/Mar/16 ] |
|
Author: {u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}Message: |
| Comment by Adam Midvidy [ 09/Mar/16 ] |
|
ramon.fernandez is this cool to backport to 3.2? |
| Comment by Kyle Erf [ 09/Mar/16 ] |
|
definitely needs a backport—another failure this afternoon: https://evergreen.mongodb.com/task/mongodb_mongo_v3.2_amazon_noPassthrough_f313d9f91a28661b0a7fc18eb6216596ce0051fb_16_03_09_17_34_04 |
| Comment by Adam Midvidy [ 09/Mar/16 ] |
|
requesting backport as this is still happening on the 3.2 branch. |
| Comment by Githook User [ 04/Mar/16 ] |
|
Author: {u'username': u'amidvidy', u'name': u'Adam Midvidy', u'email': u'amidvidy@gmail.com'}Message: |
| Comment by Andy Schwerin [ 03/Mar/16 ] |
|
Per offline conversation, I think mongos should probably be calling exitCleanly at the end of main. That would cause it to block and allow the original caller of exitCleanly to finish. |