syzbot


BUG: workqueue leaked lock or atomic in ocfs2_truncate_log_worker (3)

Status: upstream: reported on 2026/04/27 16:05
Reported-by: syzbot+1a55c85684e1dafe8688@syzkaller.appspotmail.com
First crash: 16d, last: 10d
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 BUG: workqueue leaked lock or atomic in ocfs2_truncate_log_worker -1 2 420d 420d 0/3 auto-obsoleted due to no activity on 2025/06/27 19:37
linux-5.15 BUG: workqueue leaked lock or atomic in ocfs2_truncate_log_worker (2) -1 1 289d 289d 0/3 auto-obsoleted due to no activity on 2025/11/05 01:58

Sample crash report:
(kworker/u4:5,4242,1):ocfs2_replay_truncate_records:5974 ERROR: status = -30
(kworker/u4:5,4242,1):__ocfs2_flush_truncate_log:6055 ERROR: status = -30
(kworker/u4:5,4242,1):ocfs2_truncate_log_worker:6089 ERROR: status = -30
BUG: workqueue leaked lock or atomic: kworker/u4:5/0x00000000/4242
     last function: ocfs2_truncate_log_worker
3 locks held by kworker/u4:5/4242:
 #0: ffff888076b1e650 (sb_internal#2){.+.+}-{0:0}, at: ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5938 [inline]
 #0: ffff888076b1e650 (sb_internal#2){.+.+}-{0:0}, at: __ocfs2_flush_truncate_log+0x4a5/0x1110 fs/ocfs2/alloc.c:6052
 #1: ffff888061a5e4e8 (&journal->j_trans_barrier){.+.+}-{3:3}, at: ocfs2_start_trans+0x3a6/0x6f0 fs/ocfs2/journal.c:374
 #2: ffff88806157c990 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0x134c/0x15c0 fs/jbd2/transaction.c:462
CPU: 0 PID: 4242 Comm: kworker/u4:5 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Workqueue: ocfs2_wq ocfs2_truncate_log_worker
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 process_one_work+0xc69/0x1010 kernel/workqueue.c:2325
 worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
 kthread+0x436/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u4:5/4242 is trying to acquire lock:
ffff88805ad9c138 ((wq_completion)ocfs2_wq#2){+.+.}-{0:0}, at: process_one_work+0x761/0x1010 kernel/workqueue.c:-1

but task is already holding lock:
ffff88806157c990 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0x134c/0x15c0 fs/jbd2/transaction.c:462

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (jbd2_handle){++++}-{0:0}:
       jbd2_journal_lock_updates+0xa4/0x390 fs/jbd2/transaction.c:881
       __ocfs2_flush_truncate_log+0x2ba/0x1110 fs/ocfs2/alloc.c:6027
       ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6074 [inline]
       ocfs2_truncate_log_worker+0x9f/0x190 fs/ocfs2/alloc.c:6087
       process_one_work+0x85f/0x1010 kernel/workqueue.c:2310
       worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
       kthread+0x436/0x520 kernel/kthread.c:334
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

-> #2 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}:
       down_write+0x38/0x60 kernel/locking/rwsem.c:1551
       inode_lock include/linux/fs.h:787 [inline]
       ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6073 [inline]
       ocfs2_truncate_log_worker+0x97/0x190 fs/ocfs2/alloc.c:6087
       process_one_work+0x85f/0x1010 kernel/workqueue.c:2310
       worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
       kthread+0x436/0x520 kernel/kthread.c:334
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

-> #1 ((work_completion)(&(&osb->osb_truncate_log_wq)->work)){+.+.}-{0:0}:
       process_one_work+0x7bb/0x1010 kernel/workqueue.c:2286
       worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
       kthread+0x436/0x520 kernel/kthread.c:334
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

-> #0 ((wq_completion)ocfs2_wq#2){+.+.}-{0:0}:
       check_prev_add kernel/locking/lockdep.c:3053 [inline]
       check_prevs_add kernel/locking/lockdep.c:3172 [inline]
       validate_chain kernel/locking/lockdep.c:3788 [inline]
       __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
       lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
       process_one_work+0x79b/0x1010 kernel/workqueue.c:2285
       worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
       kthread+0x436/0x520 kernel/kthread.c:334
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

other info that might help us debug this:

Chain exists of:
  (wq_completion)ocfs2_wq#2 --> &ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5 --> jbd2_handle

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(jbd2_handle);
                               lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5);
                               lock(jbd2_handle);
  lock((wq_completion)ocfs2_wq#2);

 *** DEADLOCK ***

3 locks held by kworker/u4:5/4242:
 #0: ffff888076b1e650 (sb_internal#2){.+.+}-{0:0}, at: ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5938 [inline]
 #0: ffff888076b1e650 (sb_internal#2){.+.+}-{0:0}, at: __ocfs2_flush_truncate_log+0x4a5/0x1110 fs/ocfs2/alloc.c:6052
 #1: ffff888061a5e4e8 (&journal->j_trans_barrier){.+.+}-{3:3}, at: ocfs2_start_trans+0x3a6/0x6f0 fs/ocfs2/journal.c:374
 #2: ffff88806157c990 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0x134c/0x15c0 fs/jbd2/transaction.c:462

stack backtrace:
CPU: 0 PID: 4242 Comm: kworker/u4:5 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Workqueue: ocfs2_wq ocfs2_truncate_log_worker
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2133
 check_prev_add kernel/locking/lockdep.c:3053 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
 process_one_work+0x79b/0x1010 kernel/workqueue.c:2285
 worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
 kthread+0x436/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/03 05:16 linux-5.15.y ef251c45f1cd a0d91488 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: workqueue leaked lock or atomic in ocfs2_truncate_log_worker
2026/04/27 16:04 linux-5.15.y b9d57c40a767 0f700595 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: workqueue leaked lock or atomic in ocfs2_truncate_log_worker
* Struck through repros no longer work on HEAD.