syzbot


INFO: task hung in uevent_show

Status: upstream: reported on 2024/07/26 06:22
Reported-by: syzbot+dbbadbd69d16b5b8f605@syzkaller.appspotmail.com
First crash: 43d, last: 25d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in uevent_show usb C done 9704 26d 87d 1/27 upstream: reported C repro on 2024/06/12 16:26
linux-5.15 INFO: task hung in uevent_show 1 26d 26d 0/3 upstream: reported on 2024/08/12 05:03

Sample crash report:
INFO: task udevd:3734 blocked for more than 148 seconds.
      Not tainted 6.1.104-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:24920 pid:3734  ppid:3092   flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x143f/0x4570 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6693
 __mutex_lock_common kernel/locking/mutex.c:679 [inline]
 __mutex_lock+0x6b9/0xd80 kernel/locking/mutex.c:747
 device_lock include/linux/device.h:837 [inline]
 uevent_show+0x176/0x330 drivers/base/core.c:2661
 dev_attr_show+0x50/0xb0 drivers/base/core.c:2364
 sysfs_kf_seq_show+0x32d/0x4b0 fs/sysfs/file.c:59
 seq_read_iter+0x43a/0xd10 fs/seq_file.c:230
 call_read_iter include/linux/fs.h:2259 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x88d/0xbf0 fs/read_write.c:470
 ksys_read+0x19c/0x2c0 fs/read_write.c:613
 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:0x7f5795916b6a
RSP: 002b:00007fff1d7f64a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 000055cce89754d0 RCX: 00007f5795916b6a
RDX: 0000000000001000 RSI: 000055cce894d950 RDI: 0000000000000008
RBP: 000055cce89754d0 R08: 0000000000000008 R09: 0000000000000008
R10: 000000000000010f R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000003fff R14: 00007fff1d7f6988 R15: 000000000000000a
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d32b190 (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: ffffffff8d32b990 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
2 locks held by kworker/0:1/14:
 #0: ffff888012872138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc90000137d20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
1 lock held by khungtaskd/28:
 #0: ffffffff8d32afc0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8d32afc0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8d32afc0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
2 locks held by pvrusb2-context/2036:
 #0: ffff88802444c188 (&hdw->big_lock_mutex){+.+.}-{3:3}, at: pvr2_hdw_initialize+0xc6/0x3cc0 drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2326
 #1: ffffffff8d1d80f0 (umhelper_sem){++++}-{3:3}, at: usermodehelper_read_trylock+0x13b/0x2f0 kernel/umh.c:218
2 locks held by getty/3395:
 #0: ffff88814b7eb098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900031332f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2198
3 locks held by kworker/u4:6/3700:
 #0: ffff888146689938 ((wq_completion)cfg80211){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc9000423fd20 ((work_completion)(&(&rdev->dfs_update_channels_wk)->work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffffffff8e4f7ce8 (rtnl_mutex){+.+.}-{3:3}, at: cfg80211_dfs_channels_update_work+0xbb/0x610 net/wireless/mlme.c:888
6 locks held by kworker/0:11/3715:
 #0: ffff8880182aed38 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc9000428fd20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffff888144f0c190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:837 [inline]
 #2: ffff888144f0c190 (&dev->mutex){....}-{3:3}, at: hub_event+0x1fe/0x5730 drivers/usb/core/hub.c:5801
 #3: ffff88807c25a190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:837 [inline]
 #3: ffff88807c25a190 (&dev->mutex){....}-{3:3}, at: usb_disconnect+0xfa/0x8c0 drivers/usb/core/hub.c:2266
 #4: ffff888017af2118 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:837 [inline]
 #4: ffff888017af2118 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1080 [inline]
 #4: ffff888017af2118 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xb6/0x880 drivers/base/dd.c:1283
 #5: ffff88802444c188 (&hdw->big_lock_mutex){+.+.}-{3:3}, at: pvr2_hdw_disconnect+0x6a/0x510 drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2710
4 locks held by udevd/3734:
 #0: ffff88805edc7e80 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xae/0xd10 fs/seq_file.c:182
 #1: ffff8880183c9c88 (&of->mutex){+.+.}-{3:3}, at: kernfs_seq_start+0x4f/0x3a0 fs/kernfs/file.c:154
 #2: ffff8880745aba00 (kn->active#5){.+.+}-{0:0}, at: kernfs_seq_start+0x6e/0x3a0 fs/kernfs/file.c:155
 #3: ffff88807c25a190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:837 [inline]
 #3: ffff88807c25a190 (&dev->mutex){....}-{3:3}, at: uevent_show+0x176/0x330 drivers/base/core.c:2661
5 locks held by kworker/u4:11/3820:
 #0: ffff888012a1e938 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc9000489fd20 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffffffff8e4eb990 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0xf1/0xb60 net/core/net_namespace.c:566
 #3: ffffffff8e4f7ce8 (rtnl_mutex){+.+.}-{3:3}, at: ieee80211_unregister_hw+0x51/0x290 net/mac80211/main.c:1469
 #4: ffffffff8d3305b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:291 [inline]
 #4: ffffffff8d3305b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x4f0/0x930 kernel/rcu/tree_exp.h:962
2 locks held by kworker/u4:14/4032:
 #0: ffff8880b983a9d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:537
 #1: ffff8880b9827788 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x43d/0x770 kernel/sched/psi.c:1001
1 lock held by syz-executor/4802:
 #0: ffffffff8d3305b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:323 [inline]
 #0: ffffffff8d3305b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x360/0x930 kernel/rcu/tree_exp.h:962
3 locks held by kworker/1:17/5203:
 #0: ffff888012870938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc900039f7d20 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffffffff8e4f7ce8 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xa/0x50 net/core/link_watch.c:263
1 lock held by syz-executor/5303:
 #0: ffffffff8e4f7ce8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
 #0: ffffffff8e4f7ce8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x7c1/0xff0 net/core/rtnetlink.c:6118

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

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.104-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/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:295
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 4032 Comm: kworker/u4:14 Not tainted 6.1.104-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Workqueue: bat_events batadv_nc_worker
RIP: 0010:variable_test_bit arch/x86/include/asm/bitops.h:228 [inline]
RIP: 0010:arch_test_bit arch/x86/include/asm/bitops.h:240 [inline]
RIP: 0010:_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline]
RIP: 0010:cpumask_test_cpu include/linux/cpumask.h:444 [inline]
RIP: 0010:cpu_online include/linux/cpumask.h:1030 [inline]
RIP: 0010:trace_lock_acquire include/trace/events/lock.h:24 [inline]
RIP: 0010:lock_acquire+0xeb/0x5a0 kernel/locking/lockdep.c:5633
Code: 03 00 00 39 1d 1e 56 2f 0d 0f 86 e4 02 00 00 89 db 48 89 d8 48 c1 e8 06 48 8d 3c c5 a8 c6 99 8e be 08 00 00 00 e8 05 aa 77 00 <48> 0f a3 1d e5 53 2f 0d 73 0d e8 c6 e4 08 00 84 c0 0f 84 b9 02 00
RSP: 0018:ffffc900059b7a80 EFLAGS: 00000256
RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffffffff816a72bb
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8e99c6a8
RBP: ffffc900059b7be0 R08: dffffc0000000000 R09: fffffbfff1d338d6
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000b36f58
R13: dffffc0000000000 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000560e43a8b131 CR3: 0000000064f72000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 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+0xe8/0x610 net/batman-adv/network-coding.c:719
 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:295
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/13 18:04 linux-6.1.y 36790ef5e00b f21a18ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in uevent_show
2024/07/27 23:56 linux-6.1.y c1cec4dad96b 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in uevent_show
2024/07/26 06:21 linux-6.1.y c18e82d3ee44 3f86dfed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in uevent_show
* Struck through repros no longer work on HEAD.