[SERVER-27246] Running applyOps with an op on a nonexistent database using mmapv1 will crash mongod Created: 01/Dec/16 Updated: 15/Apr/22 Resolved: 05/Dec/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 3.3.8 |
| Fix Version/s: | 3.4.1, 3.5.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Eric Milkie |
| 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 Completed: | |||||||||||||||||
| Steps To Reproduce: | Start mongod with mmapv1. Ensure p11 database does not exist.
|
||||||||||||||||
| Sprint: | Storage 2016-12-12 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
See repro steps. This crashes because we attempt to construct an OldClientContext while in an active WriteUnitOfWork. |
| Comments |
| Comment by Githook User [ 05/Dec/16 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: (cherry picked from commit 0b9be138fb58ea4ef2ca77ddebf53b6c76238a13) |
| Comment by Githook User [ 05/Dec/16 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: |
| Comment by Eric Milkie [ 01/Dec/16 ] |
|
This will only affect applyOps invocations that expect to create collections implicitly (via insert/updates to a non-existent collection). This bug doesn't affect users that are replaying oplog entries because replication always explictly creates collections. One proposed solution to this is to detect when a database is missing, throw an exception, and then restart the applyOps command from scratch but in non-atomic mode. Non-atomic mode is already used for any applyOps arrays that contain 'c' ops. |