syzbot


INFO: task hung in nilfs_segctor_thread

Status: upstream: reported on 2024/05/12 09:28
Reported-by: syzbot+24654743dce66352b6a2@syzkaller.appspotmail.com
First crash: 33d, last: 33d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in nilfs_segctor_thread nilfs2 C 41 486d 588d 0/1 upstream: reported C repro on 2022/11/05 03:06
linux-5.15 INFO: task hung in nilfs_segctor_thread (2) 1 33d 33d 0/3 upstream: reported on 2024/05/12 07:59
upstream INFO: task hung in nilfs_segctor_thread nilfs C error 94 409d 583d 22/27 fixed on 2023/06/08 14:41
linux-5.15 INFO: task hung in nilfs_segctor_thread 3 419d 432d 0/3 auto-obsoleted due to no activity on 2023/08/20 05:29
linux-4.14 INFO: task hung in nilfs_segctor_thread nilfs2 C 1 484d 484d 0/1 upstream: reported C repro on 2023/02/16 07:03
upstream INFO: task hung in nilfs_segctor_thread (2) nilfs C inconclusive 98 6d19h 116d 12/27 upstream: reported C repro on 2024/02/19 10:54

Sample crash report:
INFO: task segctord:16774 blocked for more than 143 seconds.
      Not tainted 6.1.90-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:segctord        state:D stack:28248 pid:16774 ppid:2      flags:0x00004000
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
 rwsem_down_write_slowpath+0xea1/0x14b0 kernel/locking/rwsem.c:1189
 nilfs_transaction_lock+0x25c/0x4f0 fs/nilfs2/segment.c:357
 nilfs_segctor_thread_construct fs/nilfs2/segment.c:2523 [inline]
 nilfs_segctor_thread+0x52b/0x1130 fs/nilfs2/segment.c:2607
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
INFO: task segctord:16999 blocked for more than 143 seconds.
      Not tainted 6.1.90-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:segctord        state:D stack:28248 pid:16999 ppid:2      flags:0x00004000
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
 rwsem_down_write_slowpath+0xea1/0x14b0 kernel/locking/rwsem.c:1189
 nilfs_transaction_lock+0x25c/0x4f0 fs/nilfs2/segment.c:357
 nilfs_segctor_thread_construct fs/nilfs2/segment.c:2523 [inline]
 nilfs_segctor_thread+0x52b/0x1130 fs/nilfs2/segment.c:2607
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d12ae50 (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: ffffffff8d12b650 (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: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
2 locks held by kworker/u4:2/41:
2 locks held by getty/3310:
 #0: ffff888028de9098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2188
3 locks held by kworker/0:6/3616:
 #0: ffff888143abc938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc900043bfd20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffff888145bb5190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:837 [inline]
 #2: ffff888145bb5190 (&dev->mutex){....}-{3:3}, at: hub_event+0x1fe/0x5730 drivers/usb/core/hub.c:5800
5 locks held by kworker/1:14/5006:
 #0: ffff888143abc938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc9000355fd20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffff888145f23190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:837 [inline]
 #2: ffff888145f23190 (&dev->mutex){....}-{3:3}, at: hub_event+0x1fe/0x5730 drivers/usb/core/hub.c:5800
 #3: ffff88805624e190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:837 [inline]
 #3: ffff88805624e190 (&dev->mutex){....}-{3:3}, at: __device_attach+0x8a/0x570 drivers/base/dd.c:990
 #4: ffff88805624d118 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:837 [inline]
 #4: ffff88805624d118 (&dev->mutex){....}-{3:3}, at: __device_attach+0x8a/0x570 drivers/base/dd.c:990
2 locks held by syz-executor.3/16773:
1 lock held by segctord/16774:
 #0: ffff88807d7042a0 (&nilfs->ns_segctor_sem){++++}-{3:3}, at: nilfs_transaction_lock+0x25c/0x4f0 fs/nilfs2/segment.c:357
2 locks held by syz-executor.0/16995:
1 lock held by segctord/16999:
 #0: ffff88807882b2a0 (&nilfs->ns_segctor_sem){++++}-{3:3}, at: nilfs_transaction_lock+0x25c/0x4f0 fs/nilfs2/segment.c:357
3 locks held by syz-executor.3/20668:
2 locks held by syz-executor.2/20671:

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.90-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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:308
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 16995 Comm: syz-executor.0 Not tainted 6.1.90-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:bio_uninit+0x1b/0x3b0 block/bio.c:210
Code: 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 41 57 41 56 41 55 41 54 53 48 83 ec 18 49 89 fe 49 bc 00 00 00 00 00 fc ff df <e8> b0 7d 71 fd 4d 8d 7e 48 4c 89 fb 48 c1 eb 03 42 80 3c 23 00 74
RSP: 0018:ffffc9001022f558 EFLAGS: 00000292
RAX: ffffffff841948f9 RBX: ffff88806276a8c0 RCX: 0000000000040000
RDX: ffffc9001523c000 RSI: 000000000003ffff RDI: ffff88806276a8c0
RBP: ffff88806276a940 R08: ffffffff841944c7 R09: ffffed100c4ed51c
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 000000000000000a R14: ffff88806276a8c0 R15: ffff88806276a3c0
FS:  00007f9212f006c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc87776e000 CR3: 0000000063bef000 CR4: 00000000003506e0
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 bio_free+0x51/0x1a0 block/bio.c:231
 __bio_chain_endio block/bio.c:313 [inline]
 bio_endio+0x4f/0x7d0 block/bio.c:1546
 blk_next_bio+0x10f/0x150 block/bio.c:350
 __blkdev_issue_discard+0x377/0x570 block/blk-lib.c:67
 blkdev_issue_discard+0xf0/0x1c0 block/blk-lib.c:105
 nilfs_sufile_trim_fs+0x109e/0x1360 fs/nilfs2/sufile.c:1179
 nilfs_ioctl_trim_fs fs/nilfs2/ioctl.c:1071 [inline]
 nilfs_ioctl+0x1188/0x24a0 fs/nilfs2/ioctl.c:1312
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f921227dd69
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f9212f000c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f92123abf80 RCX: 00007f921227dd69
RDX: 0000000020000680 RSI: 00000000c0185879 RDI: 0000000000000004
RBP: 00007f92122ca49e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f92123abf80 R15: 00007ffd1d692448
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/12 09:27 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in nilfs_segctor_thread
* Struck through repros no longer work on HEAD.