[SERVER-27460] RouterStageMerge::kill() can crash during mongos shutdown Created: 19/Dec/16 Updated: 05/Apr/17 Resolved: 18/Jan/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Sharding |
| Affects Version/s: | 3.2.11, 3.4.0 |
| Fix Version/s: | 3.2.13, 3.4.2, 3.5.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | David Storch |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v3.4, v3.2
|
||||||||||||
| Sprint: | Query 2017-01-23 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
RouterStageMerge::kill() retrieves an Event which will be signaled when the mongos cursor is safe to destroy. However, this Event will be invalid if it is retrieved while mongos is shutting down, as documented here: https://github.com/mongodb/mongo/blob/r3.5.1/src/mongo/s/query/async_results_merger.h#L170 This case is not handled correctly by RouterStageMerge::kill(), since it can wait on an invalid event, resulting in an invariant being triggered. Fixing RouterStageMerge::kill() to not wait on an invalid event is a partial fix for |
| Comments |
| Comment by Githook User [ 02/Feb/17 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: (cherry picked from commit c43d7cd31af6854eaf134f8021d9f0784ddf5070) Conflicts: |
| Comment by Githook User [ 23/Jan/17 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: (cherry picked from commit c43d7cd31af6854eaf134f8021d9f0784ddf5070) |
| Comment by Githook User [ 18/Jan/17 ] |
|
Author: {u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}Message: |