syzbot


INFO: task hung in relay_open (2)

Status: upstream: reported on 2025/05/31 01:24
Reported-by: syzbot+dbf37bf753ab32cd27de@syzkaller.appspotmail.com
First crash: 47d, last: 47d
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in relay_open 1 1 198d 198d 0/3 auto-obsoleted due to no activity on 2025/04/09 20:26
upstream INFO: task hung in relay_open block trace 1 2 395d 485d 0/29 auto-obsoleted due to no activity on 2024/09/14 11:45

Sample crash report:
INFO: task syz.4.114:4918 blocked for more than 143 seconds.
      Not tainted 6.1.140-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.4.114       state:D stack:25792 pid:4918  ppid:4259   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x10e9/0x40d0 kernel/sched/core.c:6561
 schedule+0xb9/0x180 kernel/sched/core.c:6637
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6696
 __mutex_lock_common kernel/locking/mutex.c:679 [inline]
 __mutex_lock+0x555/0xaf0 kernel/locking/mutex.c:747
 relay_open+0x384/0x960 kernel/relay.c:515
 do_blk_trace_setup+0x559/0x9a0 kernel/trace/blktrace.c:591
 __blk_trace_setup kernel/trace/blktrace.c:631 [inline]
 blk_trace_ioctl+0x3dc/0x4c0 kernel/trace/blktrace.c:745
 blkdev_ioctl+0x1b2/0x700 block/ioctl.c:609
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f80c898e969
RSP: 002b:00007f80c9729038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f80c8bb6160 RCX: 00007f80c898e969
RDX: 0000200000000240 RSI: 00000000c0481273 RDI: 0000000000000008
RBP: 00007f80c8a10ab1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f80c8bb6160 R15: 00007fff3ce8d498
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8c92b4b0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x33/0xf00 kernel/rcu/tasks.h:517
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8c92bcd0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x33/0xf00 kernel/rcu/tasks.h:517
1 lock held by khungtaskd/27:
 #0: ffffffff8c92ab20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8c92ab20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8c92ab20 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6513
3 locks held by kworker/0:2/1172:
 #0: ffff888017470938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
 #1: ffffc9000557fd00 (fqdir_free_work){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
 #2: ffffffff8c9306c0 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x48/0x600 kernel/rcu/tree.c:4019
2 locks held by dhcpcd/3918:
 #0: ffffffff8db1a568 (vlan_ioctl_mutex){+.+.}-{3:3}, at: sock_ioctl+0x273/0x6e0 net/socket.c:1283
 #1: ffffffff8db34428 (rtnl_mutex){+.+.}-{3:3}, at: vlan_ioctl_handler+0xd2/0x5f0 net/8021q/vlan.c:554
2 locks held by getty/4015:
 #0: ffff88803010a098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc9000325e2f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x41b/0x1380 drivers/tty/n_tty.c:2198
1 lock held by syz-executor/4241:
 #0: ffff8880b8e3aa58 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0xa5/0x140 kernel/sched/core.c:545
4 locks held by kworker/u4:7/4343:
 #0: ffff888017616938 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
 #1: ffffc90002e87d00 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
 #2: ffffffff8db27790 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x132/0xb80 net/core/net_namespace.c:594
 #3: ffffffff8c9307f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:323 [inline]
 #3: ffffffff8c9307f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x346/0x830 kernel/rcu/tree_exp.h:962
3 locks held by kworker/u4:11/4411:
3 locks held by syz.2.102/4837:
2 locks held by syz.4.114/4918:
 #0: ffff88823bc56fd0 (&q->debugfs_mutex){+.+.}-{3:3}, at: blk_trace_ioctl+0xe2/0x4c0 kernel/trace/blktrace.c:740
 #1: ffffffff8c9705a8 (relay_channels_mutex){+.+.}-{3:3}, at: relay_open+0x384/0x960 kernel/relay.c:515
2 locks held by syz.3.136/5107:
 #0: ffff88802426b590 (&q->debugfs_mutex){+.+.}-{3:3}, at: blk_trace_ioctl+0xe2/0x4c0 kernel/trace/blktrace.c:740
 #1: ffffffff8c9705a8 (relay_channels_mutex){+.+.}-{3:3}, at: relay_open+0x384/0x960 kernel/relay.c:515
2 locks held by syz.5.141/5150:
 #0: ffff88802426ccd0 (&q->debugfs_mutex){+.+.}-{3:3}, at: blk_trace_ioctl+0xe2/0x4c0 kernel/trace/blktrace.c:740
 #1: ffffffff8c9705a8 (relay_channels_mutex){+.+.}-{3:3}, at: relay_open+0x384/0x960 kernel/relay.c:515
8 locks held by syz-executor/5651:
 #0: ffff88807e046460 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x256/0x960 fs/read_write.c:580
 #1: ffff8880588ec888 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x1e5/0x4c0 fs/kernfs/file.c:325
 #2: ffff8880266fb2c0 (kn->active#53){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x208/0x4c0 fs/kernfs/file.c:326
 #3: ffffffff8d44dae8 (nsim_bus_dev_list_lock){+.+.}-{3:3}, at: del_device_store+0xce/0x360 drivers/net/netdevsim/bus.c:209
 #4: ffff88807a3800e8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:837 [inline]
 #4: ffff88807a3800e8 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1080 [inline]
 #4: ffff88807a3800e8 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xb2/0x850 drivers/base/dd.c:1283
 #5: ffff88807a3812f8 (&devlink->lock_key#10){+.+.}-{3:3}, at: nsim_drv_remove+0x54/0x160 drivers/net/netdevsim/dev.c:1677
 #6: ffffffff8db34428 (rtnl_mutex){+.+.}-{3:3}, at: nsim_destroy+0x3b/0x150 drivers/net/netdevsim/netdev.c:381
 #7: ffffffff8c9307f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:291 [inline]
 #7: ffffffff8c9307f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x455/0x830 kernel/rcu/tree_exp.h:962
1 lock held by syz-executor/5692:
 #0: ffffffff8db34428 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
 #0: ffffffff8db34428 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x740/0xed0 net/core/rtnetlink.c:6150
2 locks held by kworker/1:11/5822:
 #0: ffff888017472138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
 #1: ffffc90003587d00 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7a1/0x1160 kernel/workqueue.c:2267
1 lock held by syz-executor/5837:
 #0: ffffffff8db34428 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
 #0: ffffffff8db34428 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x740/0xed0 net/core/rtnetlink.c:6150
1 lock held by syz.7.266/5868:

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 6.1.140-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
 nmi_cpu_backtrace+0x3f4/0x470 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1d4/0x450 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+0xeee/0xf30 kernel/hung_task.c:377
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 75 Comm: kworker/u4:4 Not tainted 6.1.140-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: bat_events batadv_nc_worker
RIP: 0010:mark_lock+0xb/0x320 kernel/locking/lockdep.c:4589
Code: e8 2a ab 6e 00 4c 89 f7 41 89 d9 e9 79 ff ff ff 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 50 <89> d5 49 89 f6 48 89 fb 49 bd 00 00 00 00 00 fc ff df 83 fa 08 75
RSP: 0018:ffffc90001597800 EFLAGS: 00000046
RAX: 0000000000000002 RBX: 0000000000000002 RCX: ffffffff8162f7fb
RDX: 0000000000000008 RSI: ffff8880187d0b30 RDI: ffff8880187d0000
RBP: ffffc90001597a90 R08: dffffc0000000000 R09: fffffbfff2117064
R10: fffffbfff2117064 R11: 1ffffffff2117063 R12: ffff8880187d0000
R13: ffff8880187d0b04 R14: ffff8880187d0b30 R15: ffff8880187d0b50
FS:  0000000000000000(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc06939dc8 CR3: 0000000082f4f000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 mark_usage kernel/locking/lockdep.c:4549 [inline]
 __lock_acquire+0xd6f/0x7c50 kernel/locking/lockdep.c:5003
 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
 rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 rcu_read_lock include/linux/rcupdate.h:791 [inline]
 batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:408 [inline]
 batadv_nc_worker+0xeb/0x600 net/batman-adv/network-coding.c:719
 process_one_work+0x898/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/31 01:24 linux-6.1.y da3c5173c55f 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in relay_open
* Struck through repros no longer work on HEAD.