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: 35d, last: 35d
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 35d 96d 2/28 upstream: reported C repro on 2024/06/12 16:26
linux-6.1 INFO: task hung in uevent_show 3 34d 52d 0/3 upstream: reported on 2024/07/26 06:22

Sample crash report:
INFO: task udevd:4528 blocked for more than 143 seconds.
      Not tainted 5.15.164-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:25816 pid: 4528 ppid:  3027 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_preempt_disabled+0xf/0x20 kernel/sched/core.c:6518
 __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:2166 [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:0x7f9e967c5b6a
RSP: 002b:00007fff1bee50a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000561c8429efd0 RCX: 00007f9e967c5b6a
RDX: 0000000000001000 RSI: 0000561c842a6ef0 RDI: 0000000000000008
RBP: 0000561c8429efd0 R08: 0000000000000008 R09: 0000000000000008
R10: 000000000000010f R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000003fff R14: 00007fff1bee5588 R15: 000000000000000a
 </TASK>

Showing all locks held in the system:
2 locks held by ksoftirqd/1/20:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by kworker/u4:1/144:
 #0: ffff888011c79138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc900016efd20 ((work_completion)(&sub_info->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
2 locks held by getty/3320:
 #0: ffff88814b800098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc9000229b2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
4 locks held by kworker/u4:7/3656:
2 locks held by kworker/u4:10/3814:
6 locks held by kworker/1:9/3983:
 #0: ffff888016d50938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90003d27d20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffff88801f1e9220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #2: ffff88801f1e9220 (&dev->mutex){....}-{3:3}, at: hub_event+0x208/0x54c0 drivers/usb/core/hub.c:5769
 #3: ffff88801b2b8220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #3: ffff88801b2b8220 (&dev->mutex){....}-{3:3}, at: __device_attach+0x8a/0x570 drivers/base/dd.c:954
 #4: ffff88807cd961a8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #4: ffff88807cd961a8 (&dev->mutex){....}-{3:3}, at: __device_attach+0x8a/0x570 drivers/base/dd.c:954
 #5: ffffffff8c7cff90 (umhelper_sem){++++}-{3:3}, at: usermodehelper_read_trylock+0x138/0x360 kernel/umh.c:217
1 lock held by udevd/4440:
 #0: ffff88801b92d118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x14d/0xa50 block/bdev.c:817
3 locks held by kworker/1:10/4512:
 #0: ffff888011c70938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc900045c7d20 ((work_completion)(&data->fib_event_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffff888074805240 (&data->fib_lock){+.+.}-{3:3}, at: nsim_fib_event_work+0x2cd/0x4120 drivers/net/netdevsim/fib.c:1478
4 locks held by udevd/4528:
 #0: ffff88801a8869e0 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xae/0xd10 fs/seq_file.c:182
 #1: ffff8880622a0088 (&of->mutex){+.+.}-{3:3}, at: kernfs_seq_start+0x50/0x3b0 fs/kernfs/file.c:112
 #2: ffff88807c757748 (kn->active#32){++++}-{0:0}, at: kernfs_seq_start+0x6f/0x3b0 fs/kernfs/file.c:113
 #3: ffff88801b2b8220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline]
 #3: ffff88801b2b8220 (&dev->mutex){....}-{3:3}, at: uevent_show+0x17e/0x340 drivers/base/core.c:2408
3 locks held by kworker/0:10/6047:
 #0: ffff888011c70938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc900035c7d20 (fqdir_free_work){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8c923ff0 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x9c/0x4e0 kernel/rcu/tree.c:4039
3 locks held by kworker/0:18/6057:
2 locks held by syz-executor/7003:
1 lock held by syz.0.671/7178:
2 locks held by syz.4.685/7253:
 #0: ffff88801b92d118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xfb/0x790 block/bdev.c:912
 #1: ffff88801b917468 (&lo->lo_mutex){+.+.}-{3:3}, at: lo_release+0x4d/0x1f0 drivers/block/loop.c:2070
3 locks held by syz.1.686/7251:
1 lock held by modprobe/7256:

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.164-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/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 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 7003 Comm: syz-executor Not tainted 5.15.164-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
RIP: 0010:__lock_acquire+0x26/0x1ff0 kernel/locking/lockdep.c:4879
Code: 00 00 00 00 55 41 57 41 56 41 55 41 54 53 48 81 ec 88 00 00 00 45 89 cc 45 89 c7 41 89 ce 89 d3 89 f5 65 4c 8b 2d 2a bd 9f 7e <48> c7 c0 c4 7f e9 8d 48 c1 e8 03 48 ba 00 00 00 00 00 fc ff df 0f
RSP: 0018:ffffc90002f67680 EFLAGS: 00000082
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88807260afe8
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff888053668000 R14: 0000000000000001 R15: 0000000000000001
FS:  0000555555c2f500(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f59c4fc6380 CR3: 0000000072ba1000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline]
 _raw_read_lock+0x32/0x40 kernel/locking/spinlock.c:228
 ext4_es_lookup_extent+0x151/0xa40 fs/ext4/extents_status.c:1002
 ext4_map_blocks+0x1fc/0x1e00 fs/ext4/inode.c:537
 ext4_readdir+0xa8b/0x38e0 fs/ext4/dir.c:181
 iterate_dir+0x224/0x570
 __do_sys_getdents64 fs/readdir.c:369 [inline]
 __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354
 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:0x7fcaa6e29a93
Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 62 44 f8 ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 a8 ff ff ff f7 d8
RSP: 002b:00007ffd0fe20158 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 0000555555c52640 RCX: 00007fcaa6e29a93
RDX: 0000000000008000 RSI: 0000555555c52640 RDI: 0000000000000006
RBP: 0000555555c52614 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffa8
R13: 0000000000000016 R14: 0000555555c52610 R15: 00007ffd0fe234f0
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.