syzbot


INFO: task hung in del_gendisk (3)

Status: auto-obsoleted due to no activity on 2023/11/27 17:59
Subsystems: block
[Documentation on labels]
First crash: 227d, last: 178d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in del_gendisk block C done 5 924d 957d 20/26 fixed on 2021/11/10 00:50
upstream INFO: task hung in del_gendisk (2) block 56 823d 824d 0/26 closed as dup on 2021/11/21 13:57
upstream INFO: task can't die in blk_mq_freeze_queue_wait block 221 822d 830d 20/26 fixed on 2022/03/08 16:11

Sample crash report:
INFO: task kworker/1:5:5687 blocked for more than 143 seconds.
      Not tainted 6.5.0-rc6-syzkaller-00158-g895ed7eb263d #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:5     state:D stack:23632 pid:5687  ppid:2      flags:0x00004000
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5381 [inline]
 __schedule+0xc79/0x30a0 kernel/sched/core.c:6710
 schedule+0xe7/0x1b0 kernel/sched/core.c:6786
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:6845
 __mutex_lock_common kernel/locking/mutex.c:679 [inline]
 __mutex_lock+0x967/0x1340 kernel/locking/mutex.c:747
 del_gendisk+0x276/0xab0 block/genhd.c:660
 sd_remove+0x89/0xf0 drivers/scsi/sd.c:3735
 device_remove drivers/base/dd.c:569 [inline]
 device_remove+0x11f/0x170 drivers/base/dd.c:561
 __device_release_driver drivers/base/dd.c:1270 [inline]
 device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1293
 bus_remove_device+0x22c/0x420 drivers/base/bus.c:574
 device_del+0x39a/0xa40 drivers/base/core.c:3814
 __scsi_remove_device+0x30c/0x3f0 drivers/scsi/scsi_sysfs.c:1489
 scsi_forget_host+0x138/0x190 drivers/scsi/scsi_scan.c:1987
 scsi_remove_host+0x153/0x430 drivers/scsi/hosts.c:181
 quiesce_and_remove_host drivers/usb/storage/usb.c:867 [inline]
 usb_stor_disconnect+0x121/0x270 drivers/usb/storage/usb.c:1087
 usb_unbind_interface+0x1dd/0x8d0 drivers/usb/core/driver.c:458
 device_remove drivers/base/dd.c:569 [inline]
 device_remove+0x11f/0x170 drivers/base/dd.c:561
 __device_release_driver drivers/base/dd.c:1270 [inline]
 device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1293
 bus_remove_device+0x22c/0x420 drivers/base/bus.c:574
 device_del+0x39a/0xa40 drivers/base/core.c:3814
 usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1416
 usb_disconnect+0x2e1/0x890 drivers/usb/core/hub.c:2252
 hub_port_connect drivers/usb/core/hub.c:5280 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5580 [inline]
 port_event drivers/usb/core/hub.c:5740 [inline]
 hub_event+0x1be0/0x4f30 drivers/usb/core/hub.c:5822
 process_one_work+0xaa2/0x16f0 kernel/workqueue.c:2600
 worker_thread+0x687/0x1110 kernel/workqueue.c:2751
 kthread+0x33a/0x430 kernel/kthread.c:389
 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
 </TASK>
INFO: task udevd:17804 blocked for more than 144 seconds.
      Not tainted 6.5.0-rc6-syzkaller-00158-g895ed7eb263d #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:26864 pid:17804 ppid:2376   flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5381 [inline]
 __schedule+0xc79/0x30a0 kernel/sched/core.c:6710
 schedule+0xe7/0x1b0 kernel/sched/core.c:6786
 blk_queue_enter+0x3aa/0x620 block/blk-core.c:326
 blk_mq_alloc_request+0x416/0x860 block/blk-mq.c:592
 scsi_alloc_request drivers/scsi/scsi_lib.c:1139 [inline]
 scsi_execute_cmd+0x129/0x770 drivers/scsi/scsi_lib.c:217
 ioctl_internal_command.constprop.0+0xe6/0x3e0 drivers/scsi/scsi_ioctl.c:79
 scsi_set_medium_removal+0x12d/0x1f0 drivers/scsi/scsi_ioctl.c:139
 sd_release+0x10b/0x130 drivers/scsi/sd.c:1423
 blkdev_put_whole+0xa5/0xe0 block/bdev.c:680
 blkdev_put+0x40f/0x8e0 block/bdev.c:915
 blkdev_release+0x82/0xa0 block/fops.c:533
 __fput+0x3f7/0xac0 fs/file_table.c:384
 task_work_run+0x14d/0x240 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
 exit_to_user_mode_prepare+0x1e4/0x1f0 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297
 do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f0f3a04b0a8
RSP: 002b:00007fffcf0594e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 00007f0f39f1fae0 RCX: 00007f0f3a04b0a8
RDX: 0000562e02327537 RSI: 00007fffcf058ce8 RDI: 0000000000000008
RBP: 0000562b60837400 R08: 0000000000000006 R09: 7023ccfc58fe2995
R10: 000000000000010f R11: 0000000000000246 R12: 0000000000000002
R13: 0000562b6082d540 R14: 0000000000000008 R15: 0000562b60818910
 </TASK>

Showing all locks held in the system:
2 locks held by kworker/0:1/9:
 #0: ffff888100072538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:20 [inline]
 #0: ffff888100072538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: raw_atomic64_set include/linux/atomic/atomic-arch-fallback.h:2608 [inline]
 #0: ffff888100072538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: raw_atomic_long_set include/linux/atomic/atomic-long.h:79 [inline]
 #0: ffff888100072538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:3196 [inline]
 #0: ffff888100072538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:678 [inline]
 #0: ffff888100072538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:705 [inline]
 #0: ffff888100072538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x96a/0x16f0 kernel/workqueue.c:2570
 #1: ffffc9000009fd80 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x99e/0x16f0 kernel/workqueue.c:2574
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff87ea8330 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x2c/0xe20 kernel/rcu/tasks.h:522
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff87ea8030 (
rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x2c/0xe20 kernel/rcu/tasks.h:522
1 lock held by khungtaskd/28:
 #0: ffffffff87ea8f40 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x340 kernel/locking/lockdep.c:6615
1 lock held by klogd/2365:
 #0: ffff8881f663b218 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested kernel/sched/core.c:558 [inline]
 #0: ffff8881f663b218 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock kernel/sched/sched.h:1366 [inline]
 #0: ffff8881f663b218 (&rq->__lock){-.-.}-{2:2}, at: rq_lock kernel/sched/sched.h:1675 [inline]
 #0: ffff8881f663b218 (&rq->__lock){-.-.}-{2:2}, at: __schedule+0x290/0x30a0 kernel/sched/core.c:6627
2 locks held by getty/2434:
 #0: 
ffff888102245098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
 #1: ffffc900000452f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xfcb/0x1480 drivers/tty/n_tty.c:2187
3 locks held by kworker/1:4/5678:
8 locks held by kworker/1:5/5687:
 #0: ffff88810d251938
 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:20 [inline]
 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: raw_atomic64_set include/linux/atomic/atomic-arch-fallback.h:2608 [inline]
 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: raw_atomic_long_set include/linux/atomic/atomic-long.h:79 [inline]
 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:3196 [inline]
 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:678 [inline]
 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:705 [inline]
 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x96a/0x16f0 kernel/workqueue.c:2570
 #1: ffffc90006f1fd80 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x99e/0x16f0 kernel/workqueue.c:2574
 #2: ffff888105bf3190 (&dev->mutex
){....}-{3:3}, at: device_lock include/linux/device.h:958 [inline]
){....}-{3:3}, at: hub_event+0x1be/0x4f30 drivers/usb/core/hub.c:5768
 #3: ffff88813e6b6190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:958 [inline]
 #3: ffff88813e6b6190 (&dev->mutex){....}-{3:3}, at: usb_disconnect+0x10a/0x890 drivers/usb/core/hub.c:2243
 #4: ffff88812dc18160 (
&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:958 [inline]
&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1093 [inline]
&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xa4/0x610 drivers/base/dd.c:1290
 #5: ffff888101e9c0e0 (&shost->scan_mutex){+.+.}-{3:3}, at: scsi_remove_host+0x2c/0x430 drivers/scsi/hosts.c:169
 #6: ffff888114e3a370 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:958 [inline]
 #6: ffff888114e3a370 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1093 [inline]
 #6: ffff888114e3a370 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0xa4/0x610 drivers/base/dd.c:1290
 #7: 
ffff8881067f8358 (&disk->open_mutex){+.+.}-{3:3}, at: del_gendisk+0x276/0xab0 block/genhd.c:660
3 locks held by kworker/0:7/5998:
 #0: ffff888104a65d38 ((wq_completion)pm){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:20 [inline]
 #0: ffff888104a65d38 ((wq_completion)pm){+.+.}-{0:0}, at: raw_atomic64_set include/linux/atomic/atomic-arch-fallback.h:2608 [inline]
 #0: ffff888104a65d38 ((wq_completion)pm){+.+.}-{0:0}, at: raw_atomic_long_set include/linux/atomic/atomic-long.h:79 [inline]
 #0: ffff888104a65d38 ((wq_completion)pm){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:3196 [inline]
 #0: ffff888104a65d38 ((wq_completion)pm){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:678 [inline]
 #0: ffff888104a65d38 ((wq_completion)pm){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:705 [inline]
 #0: ffff888104a65d38 ((wq_completion)pm){+.+.}-{0:0}, at: process_one_work+0x96a/0x16f0 kernel/workqueue.c:2570
 #1: ffffc9000f657d80 ((work_completion)(&hcd->wakeup_work)){+.+.}-{0:0}, at: process_one_work+0x99e/0x16f0 kernel/workqueue.c:2574
 #2: ffff888105ffb190 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:958 [inline]
 #2: ffff888105ffb190 (&dev->mutex){....}-{3:3}, at: usb_remote_wakeup+0x21/0xe0 drivers/usb/core/hub.c:3772
5 locks held by kworker/0:8/6003:
1 lock held by udevd/17804:
 #0: ffff8881067f8358 (
&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xb0/0x8e0 block/bdev.c:901
1 lock held by syz-executor.3/19736:
 #0: ffffffff87eb43f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:293 [inline]
 #0: ffffffff87eb43f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x69e/0x7e0 kernel/rcu/tree_exp.h:992
1 lock held by syz-executor.0/19744:
 #0: ffffffff87eb43f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:325 [inline]
 #0: ffffffff87eb43f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x404/0x7e0 kernel/rcu/tree_exp.h:992

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

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.5.0-rc6-syzkaller-00158-g895ed7eb263d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x277/0x380 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x27b/0x2e0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline]
 watchdog+0xf29/0x11b0 kernel/hung_task.c:379
 kthread+0x33a/0x430 kernel/kthread.c:389
 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 5998 Comm: kworker/0:7 Not tainted 6.5.0-rc6-syzkaller-00158-g895ed7eb263d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Workqueue: usb_hub_wq hub_event
RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x70 kernel/kcov.c:200
Code: 06 80 ec 00 66 0f 1f 44 00 00 f3 0f 1e fa 48 8b be b0 01 00 00 e8 b0 ff ff ff 31 c0 c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 <f3> 0f 1e fa 65 8b 05 fd 5b b7 7e 89 c1 48 8b 34 24 81 e1 00 01 00
RSP: 0018:ffffc90000007e38 EFLAGS: 00000097
RAX: 0000000000010001 RBX: ffff8881f662b6c0 RCX: ffffffff813b9e86
RDX: ffff888117b29d00 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000007
R10: 0000000000000000 R11: 0000000000004000 R12: ffff8881f662b640
R13: 0000000000000000 R14: ffffc90005d4fd90 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8881f6600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9b84a68d58 CR3: 000000013cc11000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 cpumask_test_cpu include/linux/cpumask.h:504 [inline]
 cpu_online include/linux/cpumask.h:1082 [inline]
 trace_hrtimer_expire_exit include/trace/events/timer.h:286 [inline]
 __run_hrtimer kernel/time/hrtimer.c:1691 [inline]
 __hrtimer_run_queues+0x275/0xc10 kernel/time/hrtimer.c:1752
 hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1814
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1098 [inline]
 __sysvec_apic_timer_interrupt+0x14a/0x430 arch/x86/kernel/apic/apic.c:1115
 sysvec_apic_timer_interrupt+0x89/0xb0 arch/x86/kernel/apic/apic.c:1109
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:console_trylock_spinning kernel/printk/printk.c:1972 [inline]
RIP: 0010:vprintk_emit+0x3f6/0x640 kernel/printk/printk.c:2306
Code: 00 00 e8 cd d8 1b 00 9c 8f 45 d0 48 8b 45 d0 31 ff 25 00 02 00 00 49 89 c6 48 89 c6 e8 43 d4 1b 00 4d 85 f6 0f 85 fa 01 00 00 <f3> 0f 1e fa e8 a1 d8 1b 00 45 31 c9 41 b8 01 00 00 00 31 c9 68 16
RSP: 0018:ffffc9000f657718 EFLAGS: 00000283
RAX: 000000000000e7a1 RBX: 000000000000003c RCX: ffffc9000ecbf000
RDX: 0000000000040000 RSI: ffffffff8130750a RDI: 0000000000000007
RBP: ffffc9000f657750 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000200
R13: ffff888103e43a00 R14: 0000000000000001 R15: 0000000000000000
 dev_vprintk_emit drivers/base/core.c:4840 [inline]
 dev_printk_emit+0xfb/0x140 drivers/base/core.c:4851
 __dev_printk+0xf5/0x270 drivers/base/core.c:4863
 _dev_info+0xe5/0x120 drivers/base/core.c:4909
 hub_port_init+0xcd3/0x3920 drivers/usb/core/hub.c:4870
 hub_port_connect drivers/usb/core/hub.c:5369 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5580 [inline]
 port_event drivers/usb/core/hub.c:5740 [inline]
 hub_event+0x2c20/0x4f30 drivers/usb/core/hub.c:5822
 process_one_work+0xaa2/0x16f0 kernel/workqueue.c:2600
 worker_thread+0x687/0x1110 kernel/workqueue.c:2751
 kthread+0x33a/0x430 kernel/kthread.c:389
 ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/29 17:56 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 895ed7eb263d ce731e62 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: task hung in del_gendisk
2023/07/27 16:26 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing ba0b3af70630 92476829 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: task hung in del_gendisk
2023/07/26 19:00 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing a85ff0db48c3 41fe1bae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: task hung in del_gendisk
2023/07/11 03:56 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 06c2afb862f9 d47e94ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-usb INFO: task hung in del_gendisk
* Struck through repros no longer work on HEAD.