Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-69615

Rollback fuzzing in WiredTiger leads to size storer marked dirty at shutdown

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0, 6.0.13, 5.0.24
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v6.0, v5.0, v4.4, v4.2
    • Execution Team 2022-09-19

      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.

            Assignee:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Reporter:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: