[SERVER-69615] Rollback fuzzing in WiredTiger leads to size storer marked dirty at shutdown Created: 13/Sep/22  Updated: 03/Jan/24  Resolved: 15/Sep/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0, 6.0.13, 5.0.24

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

Issue Links:
Backports
Depends
is depended on by SERVER-66770 Consider turning knobs that increase ... Closed
is depended on by SERVER-69697 Enable rollback_error config fuzz Blocked
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.0, v4.4, v4.2
Sprint: Execution Team 2022-09-19
Participants:

 Description   

SERVER-66770 is fuzzing some parameters in WiredTiger including debug_mode=(rollback_error=N). This forces WiredTiger to return rollback for every Nth operation.

The patch test for the change request for SERVER-66770 found a bug for the following fuzzed range:

dbg_rollback_error = rng.choice([0, rng.randint(250, 1500)])

There is an invariant that gets hit on mongod shutdown:

          struct SizeInfo {
              SizeInfo() = default;
              SizeInfo(long long records, long long size) : numRecords(records), dataSize(size) {}
 
              ~SizeInfo() {
                  invariant(!_dirty.load());   <<<<<<<<<<<<<<<<<<<<<<<<<<
              }
              AtomicWord<long long> numRecords;
              AtomicWord<long long> dataSize;

It appears like during the shutdown the size store is expected to be set to clean but is dirty instead.



 Comments   
Comment by Githook User [ 03/Jan/24 ]

Author:

{'name': 'Sulabh Mahajan', 'email': 'sulabh.mahajan@mongodb.com', 'username': 'sulabhM'}

Message: SERVER-69615 On shutdown retry size storer flush until successful

(cherry picked from commit 0797ff28efcd7cb954b88658425b7b38c980b605)

GitOrigin-RevId: d1224214988b748b2d3fdd4b6945886a146f437e
Branch: v6.0
https://github.com/mongodb/mongo/commit/b45501d313a652a49fc2a0b827f4f1b6dc8d1d36

Comment by Githook User [ 03/Jan/24 ]

Author:

{'name': 'Sulabh Mahajan', 'email': 'sulabh.mahajan@mongodb.com', 'username': 'sulabhM'}

Message: SERVER-69615 On shutdown retry size storer flush until successful

(cherry picked from commit 0797ff28efcd7cb954b88658425b7b38c980b605)

GitOrigin-RevId: a776f7b185dbb646c786476b9cc02aa50b658889
Branch: v5.0
https://github.com/mongodb/mongo/commit/09947cc41cce84f8aad3f60d8088b89756ea9def

Comment by Githook User [ 15/Sep/22 ]

Author:

{'name': 'Sulabh Mahajan', 'email': 'sulabh.mahajan@mongodb.com', 'username': 'sulabhM'}

Message: SERVER-69615 On shutdown retry size storer flush until successful
Branch: master
https://github.com/mongodb/mongo/commit/0797ff28efcd7cb954b88658425b7b38c980b605

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