Segmentation fault during recovery due to corrupted journal file, leading to repeated creation of new journal files on restart

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.4.29, 8.0.15
    • Component/s: None
    • None
    • Storage Engines - Persistence
    • ALL
    • Hide
      1. Introduce partial corruption in a WiredTiger journal file (e.g., modify the len field of a record to 0xffffffff and corrupt flags).
      1. Start mongod. It will crash with a segmentation fault during recovery.
      1. Observe that a new journal/WiredTigerLog.* file (~100MB) is created before the crash.
      1. Repeat restart: each attempt creates another new journal file.
      Show
      Introduce partial corruption in a WiredTiger journal file (e.g., modify the  len  field of a record to  0xffffffff  and corrupt  flags ). Start  mongod . It will crash with a segmentation fault during recovery. Observe that a new  journal/WiredTigerLog.*  file (~100MB) is created before the crash. Repeat restart: each attempt creates another new journal file.
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We encountered a segmentation fault in mongod during startup recovery when a WiredTiger journal file (journal/WiredTigerLog.*) was partially corrupted. The segmentation fault occurs in __wt_log_scan during the wiredtiger_open recovery process.

      More critically, each restart attempt in this corrupted state creates a new ~100MB journal file, even though the process eventually crashes due to the corruption. If the service is automatically restarted (e.g., by a process manager) many times (e.g., 10,000 attempts), it can generate approximately 1TB of journal files, potentially filling the data disk and causing operational disruption.

            Assignee:
            Unassigned
            Reporter:
            stephen yang
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: