-
Type: Task
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: APIs
-
Storage Engines
-
3
-
StorEng - Defined Pipeline
__wt_session_reset_cursors is called from WT_SESSION->rollback_transaction when MongoDB abandons a WiredTiger transaction. However, because this function resets all positioned cursors, if MongoDB still holds a WT cursor, it can run into use-after-free bug if it tries to use the cursor's memory. This has led to BF-33263, which was difficult to debug because it was only triggered under certain conditions.
To catch future mistakes, we would like to assert that no cursor is positioned when resetting a session. It's really hard to track all positioned cursors in the upper layer, whereas WT already has this information readily available. We can guard this assertion behind a special option that only mongo enables.
- is depended on by
-
SERVER-91100 Asserting that no cursor is active when resetting a WT session
- Closed