[SERVER-66556] Prevent potential race when releasing cursors during shutdown Created: 18/May/22  Updated: 29/Oct/23  Resolved: 23/May/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc8, 5.0.10, 4.4.16, 4.2.22, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Yuhong Zhang Assignee: Yuhong Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-55173 Segmentation fault in WiredTigerSessi... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.0, v4.4, v4.2
Sprint: Execution Team 2022-05-30
Participants:
Linked BF Score: 10

 Description   

We check if the WiredTigerSessionCache is being shut down before releasing the cursors, but the critical section is not protected by anything and the shutdown could happen after the check. 



 Comments   
Comment by Githook User [ 11/Jun/22 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}

Message: SERVER-66556 Block shutdown when releasing cursors to avoid race conditions

(cherry picked from commit 66e938045f87c72f379eb0def449b62bde97721c)
Branch: v4.2
https://github.com/mongodb/mongo/commit/68241e3d17119291b6c1295ae81d41937ae99042

Comment by Githook User [ 09/Jun/22 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}

Message: SERVER-66556 Block shutdown when releasing cursors to avoid race conditions

(cherry picked from commit 66e938045f87c72f379eb0def449b62bde97721c)
Branch: v4.4
https://github.com/mongodb/mongo/commit/e5ed9ef36c406ba1c77f9c63b074481ed621d6d7

Comment by Githook User [ 01/Jun/22 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}

Message: SERVER-66556 Block shutdown when releasing cursors to avoid race conditions

(cherry picked from commit 66e938045f87c72f379eb0def449b62bde97721c)
Branch: v5.0
https://github.com/mongodb/mongo/commit/2d3844264672234e8b48b8dfd0f42189c71d36e2

Comment by Githook User [ 31/May/22 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}

Message: SERVER-66556 Block shutdown when releasing cursors to avoid race conditions

(cherry picked from commit 66e938045f87c72f379eb0def449b62bde97721c)
Branch: v6.0
https://github.com/mongodb/mongo/commit/b1b34b9541fda4d4c5517aa8dae5c0159bde3cce

Comment by Githook User [ 23/May/22 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}

Message: SERVER-66556 Block shutdown when releasing cursors to avoid race conditions
Branch: master
https://github.com/mongodb/mongo/commit/66e938045f87c72f379eb0def449b62bde97721c

Generated at Thu Feb 08 06:05:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.