[SERVER-28548] mmap b-tree removals may cause index readers or writers to return invalid data Created: 29/Mar/17  Updated: 05/Jun/18  Resolved: 31/Mar/17

Status: Closed
Project: Core Server
Component/s: MMAPv1, Storage
Affects Version/s: 3.0.14, 3.2.12, 3.4.3
Fix Version/s: 3.0.15, 3.2.13, 3.4.4, 3.5.6

Type: Bug Priority: Critical - P2
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:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4, v3.2, v3.0
Sprint: Storage 2017-04-17
Participants:
Case:
Linked BF Score: 0

 Description   

When an index reader or writer calls restoreState(), the code attempts to find the element it was looking at before it saved state. If that element is no longer in the tree, it may end up pointing instead to an element flagged as unused. This is a normal situation, but in this case the code fails to skip over unused elements, and can instead return a DiskLoc that does not point to a valid data record. This can cause a server crash, or, very unlikely, to return an incorrect record.



 Comments   
Comment by Githook User [ 04/Apr/17 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-28548 skip unused keys in restorePosition, even when prev location is not found

(cherry picked from commit 928d3b0cf3b989f7f099df9b9746505d6b68f470)
Branch: v3.0
https://github.com/mongodb/mongo/commit/f83d377d44dcdcb4cb15501a554918ef907937df

Comment by Githook User [ 04/Apr/17 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-28548 skip unused keys in restorePosition, even when prev location is not found

(cherry picked from commit 928d3b0cf3b989f7f099df9b9746505d6b68f470)
Branch: v3.2
https://github.com/mongodb/mongo/commit/5afdad6db992052712eb9abb4c8127ef8382b50c

Comment by Githook User [ 04/Apr/17 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-28548 skip unused keys in restorePosition, even when prev location is not found

(cherry picked from commit 928d3b0cf3b989f7f099df9b9746505d6b68f470)
Branch: v3.4
https://github.com/mongodb/mongo/commit/a9dcf2ac398a8afa2d31f9d97e3459ef9bb1eb68

Comment by Githook User [ 31/Mar/17 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-28548 skip unused keys in restorePosition, even when prev location is not found
Branch: master
https://github.com/mongodb/mongo/commit/928d3b0cf3b989f7f099df9b9746505d6b68f470

Comment by Githook User [ 31/Mar/17 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-28548 improve bucket diagnostic output for btrees
Branch: master
https://github.com/mongodb/mongo/commit/cc091a779a503887c260eb8246838a54da1173c3

Generated at Thu Feb 08 04:18:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.