syzbot


INFO: task hung in uevent_show

Status: upstream: reported on 2024/08/12 05:03
Reported-by: syzbot+49ec46118b7484c7ab31@syzkaller.appspotmail.com
First crash: 131d, last: 19d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in uevent_show usb C done 9704 130d 191d 28/28 fixed on 2024/10/22 11:56
linux-6.1 INFO: task hung in uevent_show origin:upstream syz 8 21d 148d 0/3 upstream: reported syz repro on 2024/07/26 06:22
upstream INFO: task hung in uevent_show (2) kernel C inconclusive 4271 1h19m 41d 0/28 upstream: reported C repro on 2024/11/09 14:37

Sample crash report:
INFO: task udevd:4295 blocked for more than 143 seconds.
      Not tainted 5.15.173-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:24216 pid: 4295 ppid:  3545 flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6515
 __mutex_lock_common+0xe34/0x25a0 kernel/locking/mutex.c:669
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 device_lock include/linux/device.h:760 [inline]
 uevent_show+0x17e/0x340 drivers/base/core.c:2408
 dev_attr_show+0x50/0xb0 drivers/base/core.c:2110
 sysfs_kf_seq_show+0x313/0x4e0 fs/sysfs/file.c:61
 seq_read_iter+0x43a/0xd10 fs/seq_file.c:230
 call_read_iter include/linux/fs.h:2168 [inline]
 new_sync_read fs/read_write.c:404 [inline]
 vfs_read+0xa93/0xe10 fs/read_write.c:485
 ksys_read+0x1a2/0x2c0 fs/read_write.c:623
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f1a239efb6a
RSP: 002b:00007ffc35be7c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000563165cbdc60 RCX: 00007f1a239efb6a
RDX: 0000000000001000 RSI: 0000563165caf030 RDI: 0000000000000008
RBP: 0000563165cbdc60 R08: 0000000000000008 R09: 0000000000000020
R10: 000000000000010f R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000003fff R14: 00007ffc35be8148 R15: 000000000000000a
 </TASK>

Showing all locks held in the system:
2 locks held by kworker/u4:0/9:
 #0: ffff888017479138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffff8880b8f27848 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x53d/0x810 kernel/sched/psi.c:891
1 lock held by khungtaskd/27:
 #0: ffffffff8cb1fc60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by kworker/u4:3/431:
2 locks held by getty/3927:
 #0: 
ffff88802c416098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc900025c62e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
3 locks held by kworker/1:5/4208:
 #0: ffff88802b13bd38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc9000314fd20 ((work_completion)(&(&ifa->dad_work)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8dc41388 (rtnl_mutex){+.+.}-{3:3}, at: addrconf_dad_work+0xcc/0x1720 net/ipv6/addrconf.c:4113
3 locks held by kworker/0:6/4264:
4 locks held by udevd/4295:
 #0: 
ffff88805c0c3540 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xae/0xd10 fs/seq_file.c:182
 #1: ffff888062bed888 (&of->mutex){+.+.}-{3:3}, at: kernfs_seq_start+0x50/0x3b0 fs/kernfs/file.c:112
 #2: ffff8880621303a8 (kn->active#32){++++}-{0:0}, at: kernfs_seq_start+0x6f/0x3b0 fs/kernfs/file.c:113
 #3: ffff88801c3081a8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #3: ffff88801c3081a8 (&dev->mutex){....}-{3:3}, at: uevent_show+0x17e/0x340 drivers/base/core.c:2408
3 locks held by kworker/0:12/4532:
 #0: ffff88802b13bd38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc9000324fd20 ((work_completion)(&(&ifa->dad_work)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8dc41388 (rtnl_mutex){+.+.}-{3:3}, at: addrconf_dad_work+0xcc/0x1720 net/ipv6/addrconf.c:4113
5 locks held by kworker/u4:14/4671:
 #0: ffff8880175cd938 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: 
ffffc9000322fd20
 (
net_cleanup_work){+.+.}-{0:0}
, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8dc35790 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0xf1/0xb60 net/core/net_namespace.c:561
 #3: ffff8880615393e8 (&wg->device_update_lock){+.+.}-{3:3}, at: wg_destruct+0x10c/0x2f0 drivers/net/wireguard/device.c:233
 #4: ffffffff8cb24228 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:322 [inline]
 #4: ffffffff8cb24228 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x350/0x740 kernel/rcu/tree_exp.h:845
3 locks held by kworker/1:17/5570:
 #0: ffff88802b13bd38 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90003f7fd20 ((work_completion)(&(&ifa->dad_work)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8dc41388 (rtnl_mutex){+.+.}-{3:3}, at: addrconf_dad_work+0xcc/0x1720 net/ipv6/addrconf.c:4113
9 locks held by kworker/1:20/5812:
1 lock held by syz-executor/6132:
 #0: ffff888028a440e0 (&type->s_umount_key#91){+.+.}-{3:3}, at: deactivate_super+0xa9/0xe0 fs/super.c:365
2 locks held by kworker/1:22/6360:
 #0: ffff888017472138 ((wq_completion)rcu_gp){+.+.}-{0:0}
, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90002eafd20 ((work_completion)(&rew.rew_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
4 locks held by udevd/8419:
1 lock held by syz.1.833/8715:
 #0: ffff888148272220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #0: ffff888148272220 (&dev->mutex){....}-{3:3}, at: usbdev_open+0x152/0x7a0 drivers/usb/core/devio.c:1040
2 locks held by sed/9457:

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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:287
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 6132 Comm: syz-executor Not tainted 5.15.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:mark_lock+0xfb/0x340 kernel/locking/lockdep.c:4610
Code: 00 74 39 31 db 48 83 c3 50 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 20 1e 67 00 41 bc 01 00 00 00 44 85 33 74 53 <44> 89 e0 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 ce 37 ad
RSP: 0018:ffffc9000338f5b8 EFLAGS: 00000006
RAX: 1ffffffff206249a RBX: ffffffff903124d0 RCX: ffffffff81632d68
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff90988100
RBP: 0000000000000008 R08: dffffc0000000000 R09: fffffbfff2131021
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000001
R13: dffffc0000000000 R14: 0000000000000100 R15: ffff88807e3ca900
FS:  000055558ca57500(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fedef77a6c0 CR3: 0000000069223000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 mark_usage kernel/locking/lockdep.c:4512 [inline]
 __lock_acquire+0xc97/0x1ff0 kernel/locking/lockdep.c:4966
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
 _raw_spin_lock_nested+0x2d/0x40 kernel/locking/spinlock.c:368
 raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475
 raw_spin_rq_lock kernel/sched/sched.h:1326 [inline]
 task_rq_lock+0xc2/0x360 kernel/sched/core.c:577
 cpu_cgroup_fork+0x89/0x250 kernel/sched/core.c:10044
 cgroup_post_fork+0x38f/0x810 kernel/cgroup/cgroup.c:6431
 copy_process+0x3bc6/0x3ef0 kernel/fork.c:2433
 kernel_clone+0x210/0x960 kernel/fork.c:2603
 __do_sys_clone kernel/fork.c:2720 [inline]
 __se_sys_clone kernel/fork.c:2704 [inline]
 __x64_sys_clone+0x23f/0x290 kernel/fork.c:2704
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fedeea7c093
Code: 1f 84 00 00 00 00 00 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00
RSP: 002b:00007ffc650b4db8 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fedeea7c093
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: 000055558ca577d0 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000005e1b5 R14: 000000000005daf1 R15: 00007ffc650b4f40
 </TASK>

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/02 11:08 linux-5.15.y 0a51d2d4527b 68914665 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in uevent_show
2024/12/02 02:18 linux-5.15.y 0a51d2d4527b 68914665 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in uevent_show
2024/12/01 22:58 linux-5.15.y 0a51d2d4527b 68914665 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in uevent_show
2024/11/25 16:29 linux-5.15.y 0a51d2d4527b 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in uevent_show
2024/11/20 18:41 linux-5.15.y 0a51d2d4527b 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in uevent_show
2024/11/15 14:15 linux-5.15.y d98fd109f827 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in uevent_show
2024/08/12 05:02 linux-5.15.y 7e89efd3ae1c 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in uevent_show
* Struck through repros no longer work on HEAD.