syzbot


INFO: task hung in nilfs_detach_log_writer

Status: upstream: reported on 2024/04/01 22:54
Reported-by: syzbot+1f1e503afd680c3c407b@syzkaller.appspotmail.com
First crash: 30d, last: 5d01h
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in nilfs_detach_log_writer nilfs C inconclusive 121 17d 555d 0/26 upstream: reported C repro on 2022/10/24 10:07
linux-5.15 INFO: task hung in nilfs_detach_log_writer origin:lts-only C 4 9d12h 43d 0/3 upstream: reported C repro on 2024/03/19 22:14

Sample crash report:
INFO: task syz-executor.1:8708 blocked for more than 143 seconds.
      Not tainted 6.1.83-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.1  state:D stack:20536 pid:8708  ppid:1      flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5245 [inline]
 __schedule+0x142d/0x4550 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 schedule_timeout+0xac/0x300 kernel/time/timer.c:1911
 do_wait_for_common kernel/sched/completion.c:85 [inline]
 __wait_for_common kernel/sched/completion.c:106 [inline]
 wait_for_common kernel/sched/completion.c:117 [inline]
 wait_for_completion+0x350/0x610 kernel/sched/completion.c:138
 __flush_work+0x95b/0xad0 kernel/workqueue.c:3076
 nilfs_segctor_destroy fs/nilfs2/segment.c:2766 [inline]
 nilfs_detach_log_writer+0x479/0xbd0 fs/nilfs2/segment.c:2850
 nilfs_put_super+0x49/0x150 fs/nilfs2/super.c:498
 generic_shutdown_super+0x130/0x340 fs/super.c:501
 kill_block_super+0x7a/0xe0 fs/super.c:1459
 deactivate_locked_super+0xa0/0x110 fs/super.c:332
 cleanup_mnt+0x490/0x520 fs/namespace.c:1186
 task_work_run+0x246/0x300 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:87
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fe81be7f0d7
RSP: 002b:00007fff75fa6098 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fe81be7f0d7
RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007fff75fa6150
RBP: 00007fff75fa6150 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007fff75fa7210
R13: 00007fe81bec93b9 R14: 000000000009462f R15: 000000000000000a
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d12ab10 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8d12b310 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
1 lock held by khungtaskd/28:
 #0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
1 lock held by klogd/2991:
2 locks held by getty/3299:
 #0: ffff888144711098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900015902f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2188
3 locks held by kworker/0:11/4514:
 #0: ffff888012470938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc90014d57d20 ((work_completion)(&sci->sc_iput_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffff888024882650 (sb_internal#4){.+.+}-{0:0}, at: nilfs_evict_inode+0x163/0x500 fs/nilfs2/inode.c:929
1 lock held by syz-executor.1/8708:
 #0: ffff8880248820e0 (&type->s_umount_key#91){+.+.}-{3:3}, at: deactivate_super+0xa9/0xe0 fs/super.c:362

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.83-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1b0/0x3f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
 watchdog+0xf88/0xfd0 kernel/hung_task.c:377
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3661 Comm: kworker/u4:6 Not tainted 6.1.83-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:lockdep_enabled kernel/locking/lockdep.c:119 [inline]
RIP: 0010:lock_acquire+0x12e/0x5a0 kernel/locking/lockdep.c:5638
Code: c0 a4 99 73 8e 48 c1 e8 03 42 0f b6 04 28 84 c0 0f 85 dd 02 00 00 83 3d b3 47 09 0d 00 0f 84 3f 01 00 00 65 8b 05 c2 26 98 7e <85> c0 0f 85 88 01 00 00 65 48 8b 1d 32 1d 98 7e 48 81 c3 dc 0a 00
RSP: 0018:ffffc900052af7c0 EFLAGS: 00000202
RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff816a51bb
RDX: 0000000000000000 RSI: ffffffff8b3d2b20 RDI: ffffffff8b3d2ae0
RBP: ffffc900052af908 R08: dffffc0000000000 R09: fffffbfff1ce6c9e
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000a55f00
R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f99dc894040 CR3: 000000000ce8e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
 arch_jump_label_transform_queue+0x40/0xd0 arch/x86/kernel/jump_label.c:136
 __jump_label_update+0x177/0x3a0 kernel/jump_label.c:447
 static_key_disable_cpuslocked+0xca/0x1b0 kernel/jump_label.c:207
 static_key_disable+0x16/0x20 kernel/jump_label.c:215
 toggle_allocation_gate+0x3e0/0x480 mm/kfence/core.c:818
 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/01 22:54 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in nilfs_detach_log_writer
2024/04/27 07:25 linux-6.1.y 6741e066ec76 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in nilfs_detach_log_writer
2024/04/12 04:02 linux-6.1.y bf1e3b1cb1e0 27de0a5c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in nilfs_detach_log_writer
2024/04/02 19:58 linux-6.1.y e5cd595e23c1 eb2966c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in nilfs_detach_log_writer
* Struck through repros no longer work on HEAD.