ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc1025
    • Affects Version/s: None
    • Component/s: None
    • Storage Engines - Server Integration
    • Fully Compatible
    • ALL
    • SESIKhuuBeanz 2026-10-06, SESIPreview 2026-10-20
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Seen on the aubsan disagg variant where ASAN caught a double free of the block cache. The issue was that the block cache decoration shared pointer gets copied and reset concurrently during shutdown:

      • FTDC thread: serverStatus collection copies the shared_ptr via getBlockCache()
      • shutdown thread: WT connection close -> paliTerminate -> destroyBlockCache -> cache.reset() on the same shared_ptr instance

      Both threads run ~BlockCache and the buffer is freed twice.

      I believe this is the same FTDC / decoration teardown race as described in mongod_main.cpp:

          // Stop FTDC before tearing down FlowControl. The FTDC background thread runs serverStatus
          // collection (including FlowControl::get()) concurrently. Joining the FTDC thread here
          // ensures it is fully quiesced before FlowControl::shutdown() resets the unique_ptr
          // decoration, preventing a TSAN data race between the two threads.
      

      I think the difference is that the block cache gets reset during storage engine shutdown (destroyBlockCache as part of PaliTerminate), which runs before stopMongoDFTDC(), so FTDC can still be collecting serverStatus while the cache is destroyed.

            Assignee:
            Aaron Balsara
            Reporter:
            Clarisse Cheah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: