syzbot


INFO: task hung in nilfs_detach_log_writer

Status: upstream: reported C repro on 2024/03/19 22:14
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+86ad196992d18d9bb81e@syzkaller.appspotmail.com
First crash: 43d, last: 9d09h
Bug presence (2)
Date Name Commit Repro Result
2024/04/23 linux-5.15.y (ToT) c52b9710c83d C [report] KASAN: use-after-free Read in try_to_wake_up
2024/04/23 upstream (ToT) 71b1543c83d6 C Didn't crash
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-6.1 INFO: task hung in nilfs_detach_log_writer 4 4d23h 30d 0/3 upstream: reported on 2024/04/01 22:54

Sample crash report:
INFO: task syz-executor170:3540 blocked for more than 143 seconds.
      Not tainted 5.15.156-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor170 state:D stack:25176 pid: 3540 ppid:  3538 flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6376
 schedule+0x11b/0x1f0 kernel/sched/core.c:6459
 schedule_timeout+0xac/0x300 kernel/time/timer.c:1890
 do_wait_for_common+0x2d9/0x480 kernel/sched/completion.c:85
 __wait_for_common kernel/sched/completion.c:106 [inline]
 wait_for_common kernel/sched/completion.c:117 [inline]
 wait_for_completion+0x48/0x60 kernel/sched/completion.c:138
 __flush_work+0x124/0x1a0 kernel/workqueue.c:3094
 nilfs_segctor_destroy fs/nilfs2/segment.c:2768 [inline]
 nilfs_detach_log_writer+0x47b/0xbd0 fs/nilfs2/segment.c:2852
 nilfs_put_super+0x49/0x150 fs/nilfs2/super.c:498
 generic_shutdown_super+0x136/0x2c0 fs/super.c:475
 kill_block_super+0x7a/0xe0 fs/super.c:1414
 deactivate_locked_super+0xa0/0x110 fs/super.c:335
 cleanup_mnt+0x44e/0x500 fs/namespace.c:1143
 task_work_run+0x129/0x1a0 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f56e7d48507
RSP: 002b:00007ffc0f4e0308 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f56e7d48507
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffc0f4e03c0
RBP: 00007ffc0f4e03c0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffc0f4e1430
R13: 000055555745a6c0 R14: 431bde82d7b634db R15: 00007ffc0f4e1450
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
1 lock held by klogd/2951:
 #0: ffff8880b9b3a358 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475
2 locks held by getty/3257:
 #0: ffff88814b581098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc90002bab2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
1 lock held by syz-executor170/3540:
 #0: ffff88801ead80e0 (&type->s_umount_key#43){+.+.}-{3:3}, at: deactivate_super+0xa9/0xe0 fs/super.c:365
3 locks held by kworker/0:2/3602:
 #0: ffff888011c70938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90002c87d20 ((work_completion)(&sci->sc_iput_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffff88801ead8650 (sb_internal#2){.+.+}-{0:0}, at: nilfs_evict_inode+0x163/0x500 fs/nilfs2/inode.c:933

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.156-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/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:300
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
NMI backtrace for cpu 1 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_safe_halt drivers/acpi/processor_idle.c:109 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:570

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/22 21:15 linux-5.15.y c52b9710c83d 36c961ad .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan INFO: task hung in nilfs_detach_log_writer
2024/04/22 14:21 linux-5.15.y c52b9710c83d 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in nilfs_detach_log_writer
2024/03/31 22:14 linux-5.15.y 9465fef4ae35 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in nilfs_detach_log_writer
2024/03/19 22:13 linux-5.15.y b95c01af2113 e104824c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in nilfs_detach_log_writer
* Struck through repros no longer work on HEAD.