test_txn19 suppressed from ASan due to log slot buffer leaks on corrupted-log open failure

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Logging
    • None
    • Storage Engines
    • 102.645
    • None
    • None

      test_txn19 is suppressed in test/suite/fail_lists/asan.fail because it triggers LeakSanitizer errors under the ASan build. The test exercises recovery on databases with corrupted log files: it creates data, copies the database directory before closing, corrupts a specific log file, then opens the copy to exercise the recovery path. LSAN reports ~39 MB of log slot buffers that are never freed:

      Direct leak of 40632320 byte(s) in 3968 object(s) allocated from:
          #5 __wt_buf_init        include/buf_inline.h:57
          #6 __wti_log_slot_init  log/log_slot.c:470
          #7 __wt_logmgr_create   log/log_mgr.c:1085
          #8 __wti_connection_workers conn/conn_open.c:266
          #9 wiredtiger_open      conn/conn_api.c:3730
      

      __wti_log_slot_init allocates a buffer for each of the 32 slots in the log slot pool. When wiredtiger_open subsequently fails because a log file is corrupted, the error path reaches __wti_log_slot_destroy, which iterates the slot pool, flushing any buffered data and freeing each slot's buffer. The first slot contains a buffered "Log manager created" record. The write of that record to the now-corrupted log file fails, and WT_RET causes an immediate return — the remaining 31 slots never reach __wt_buf_free.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Salman Javed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: