syzbot


INFO: task hung in TXN_SLEEP_DROP_LOCK

Status: upstream: reported on 2024/08/30 06:20
Reported-by: syzbot+874cfb4b8939560fff57@syzkaller.appspotmail.com
First crash: 53d, last: 34d

Sample crash report:
INFO: task kworker/u4:0:18480 blocked for more than 144 seconds.
      Not tainted 5.15.167-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:0    state:D stack:21152 pid:18480 ppid:     2 flags:0x00004000
Workqueue: writeback wb_workfn (flush-7:0)
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 io_schedule+0x88/0x100 kernel/sched/core.c:8481
 TXN_SLEEP_DROP_LOCK+0x161/0x1c0 fs/jfs/jfs_txnmgr.c:125
 txBegin+0x112/0x6e0
 jfs_commit_inode+0x21b/0x580 fs/jfs/inode.c:101
 jfs_write_inode+0x13f/0x210 fs/jfs/inode.c:132
 write_inode fs/fs-writeback.c:1495 [inline]
 __writeback_single_inode+0x644/0xe30 fs/fs-writeback.c:1705
 writeback_sb_inodes+0xbce/0x1a40 fs/fs-writeback.c:1930
 wb_writeback+0x451/0xc50 fs/fs-writeback.c:2104
 wb_do_writeback fs/fs-writeback.c:2247 [inline]
 wb_workfn+0x46c/0x1130 fs/fs-writeback.c:2288
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
INFO: task syz.0.2814:18605 blocked for more than 145 seconds.
      Not tainted 5.15.167-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.2814      state:D stack:22464 pid:18605 ppid: 16906 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 wb_wait_for_completion+0x164/0x290 fs/fs-writeback.c:191
 sync_inodes_sb+0x293/0xab0 fs/fs-writeback.c:2770
 iterate_supers+0x127/0x1e0 fs/super.c:716
 ksys_sync+0xb9/0x1c0 fs/sync.c:102
 __do_sys_sync+0xa/0x10 fs/sync.c:113
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f05dd63eef9
RSP: 002b:00007f05dbab7038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a2
RAX: ffffffffffffffda RBX: 00007f05dd7f6f80 RCX: 00007f05dd63eef9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007f05dd6b1b76 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f05dd7f6f80 R15: 00007ffd1e1e1438
 </TASK>
INFO: task syz.4.2815:18611 blocked for more than 145 seconds.
      Not tainted 5.15.167-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.4.2815      state:D stack:22464 pid:18611 ppid: 17655 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 rwsem_down_write_slowpath+0xf0c/0x16a0 kernel/locking/rwsem.c:1165
 bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:362 [inline]
 sync_inodes_sb+0x274/0xab0 fs/fs-writeback.c:2768
 iterate_supers+0x127/0x1e0 fs/super.c:716
 ksys_sync+0xb9/0x1c0 fs/sync.c:102
 __do_sys_sync+0xa/0x10 fs/sync.c:113
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fce5cab5ef9
RSP: 002b:00007fce5af2e038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a2
RAX: ffffffffffffffda RBX: 00007fce5cc6df80 RCX: 00007fce5cab5ef9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007fce5cb28b76 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fce5cc6df80 R15: 00007ffe95681388
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91fc60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
3 locks held by kworker/u4:2/145:
2 locks held by getty/3328:
 #0: ffff88814b2e6098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc9000250b2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
3 locks held by kworker/u4:16/10176:
 #0: ffff888017079138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc900030c7d20 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8da31d88 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xa/0x50 net/core/link_watch.c:251
2 locks held by kworker/1:18/11406:
 #0: ffff888017072138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90003357d20 ((work_completion)(&rew.rew_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
2 locks held by kworker/u4:0/18480:
 #0: ffff8881431ba138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90002f37d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
2 locks held by syz.0.2814/18605:
 #0: ffff888026c5c0e0 (&type->s_umount_key#96){++++}-{3:3}, at: iterate_supers+0xac/0x1e0 fs/super.c:714
 #1: ffff888020f8e7d8 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:362 [inline]
 #1: ffff888020f8e7d8 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: sync_inodes_sb+0x274/0xab0 fs/fs-writeback.c:2768
2 locks held by syz.4.2815/18611:
 #0: ffff888026c5c0e0 (&type->s_umount_key#96){++++}-{3:3}, at: iterate_supers+0xac/0x1e0 fs/super.c:714
 #1: ffff888020f8e7d8 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:362 [inline]
 #1: ffff888020f8e7d8 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: sync_inodes_sb+0x274/0xab0 fs/fs-writeback.c:2768
2 locks held by syz.2.3129/20062:
 #0: ffffffff8da31d88 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline]
 #0: ffffffff8da31d88 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x94c/0xee0 net/core/rtnetlink.c:5615
 #1: ffffffff8c924228 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #1: ffffffff8c924228 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x280/0x740 kernel/rcu/tree_exp.h:845

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.167-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 18932 Comm: kworker/u4:10 Not tainted 5.15.167-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Workqueue: bat_events batadv_nc_worker
RIP: 0010:validate_chain+0x5ca/0x5930 kernel/locking/lockdep.c:3800
Code: 0c 00 0f 84 00 0e 00 00 41 be 01 00 00 00 48 8b 84 24 98 00 00 00 48 c7 84 24 00 01 00 00 0e 36 e0 45 49 c7 04 04 00 00 00 00 <49> c7 44 04 09 00 00 00 00 49 c7 44 04 17 00 00 00 00 49 c7 44 04
RSP: 0018:ffffc90002ea76e0 EFLAGS: 00000002
RAX: 1ffff920005d4efc RBX: 0000000000020015 RCX: 1ffff920005d4efc
RDX: 0000000000000000 RSI: ffff8880525ac6c0 RDI: ffff8880525abb80
RBP: ffffc90002ea7990 R08: dffffc0000000000 R09: fffffbfff20e2419
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff8880525ac6e0 R14: 0000000000000001 R15: ffff8880525ac6e0
FS:  0000000000000000(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f26e00f7178 CR3: 0000000022773000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 000000000000000e DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
 rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:312
 rcu_read_lock include/linux/rcupdate.h:739 [inline]
 batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:412 [inline]
 batadv_nc_worker+0xc1/0x5b0 net/batman-adv/network-coding.c:723
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 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
2024/09/18 03:09 linux-5.15.y 3a5928702e71 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in TXN_SLEEP_DROP_LOCK
2024/08/30 06:20 linux-5.15.y fa93fa65db6e ee2602b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in TXN_SLEEP_DROP_LOCK
* Struck through repros no longer work on HEAD.