syzbot


INFO: task hung in __input_unregister_device (2)

Status: closed as invalid on 2019/11/04 12:11
Subsystems: input
[Documentation on labels]
First crash: 1800d, last: 1800d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in __input_unregister_device (4) usb input C done 924 760d 825d 22/28 fixed on 2023/02/24 13:50
linux-4.14 INFO: task hung in __input_unregister_device 1 1512d 1512d 0/1 auto-closed as invalid on 2020/12/12 06:17
upstream INFO: task hung in __input_unregister_device input 7 1810d 1942d 0/28 closed as invalid on 2019/10/23 07:54
upstream INFO: task hung in __input_unregister_device (5) usb input C done 16 13d 382d 0/28 upstream: reported C repro on 2023/09/18 12:45
upstream INFO: task hung in __input_unregister_device (3) input 65 1575d 1551d 0/28 auto-closed as invalid on 2020/10/10 08:29

Sample crash report:
INFO: task kworker/0:3:2725 blocked for more than 143 seconds.
      Not tainted 5.4.0-rc5+ #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/0:3     D24384  2725      2 0x80004000
Workqueue: usb_hub_wq hub_event
Call Trace:
 schedule+0xca/0x250 kernel/sched/core.c:4136
 schedule_preempt_disabled+0xc/0x20 kernel/sched/core.c:4195
 __mutex_lock_common kernel/locking/mutex.c:1033 [inline]
 __mutex_lock+0x881/0x1360 kernel/locking/mutex.c:1103
 input_disconnect_device drivers/input/input.c:732 [inline]
 __input_unregister_device+0x23/0x430 drivers/input/input.c:2081
 input_unregister_device+0xb4/0xf0 drivers/input/input.c:2268
 iforce_usb_disconnect+0x5e/0xf0 drivers/input/joystick/iforce/iforce-usb.c:261
 usb_unbind_interface+0x1bd/0x8a0 drivers/usb/core/driver.c:423
 __device_release_driver drivers/base/dd.c:1134 [inline]
 device_release_driver_internal+0x42f/0x500 drivers/base/dd.c:1165
 bus_remove_device+0x2dc/0x4a0 drivers/base/bus.c:532
 device_del+0x420/0xb20 drivers/base/core.c:2376
 usb_disable_device+0x211/0x690 drivers/usb/core/message.c:1237
 usb_disconnect+0x284/0x8d0 drivers/usb/core/hub.c:2200
 hub_port_connect drivers/usb/core/hub.c:5035 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5324 [inline]
 port_event drivers/usb/core/hub.c:5470 [inline]
 hub_event+0x16f2/0x3800 drivers/usb/core/hub.c:5552
 process_one_work+0x92b/0x1530 kernel/workqueue.c:2269
 worker_thread+0x96/0xe20 kernel/workqueue.c:2415
 kthread+0x318/0x420 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352

Showing all locks held in the system:
5 locks held by kworker/0:1/12:
1 lock held by khungtaskd/23:
 #0: ffffffff86cfe8a0 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x269 kernel/locking/lockdep.c:5335
5 locks held by kworker/0:2/101:
1 lock held by rsyslogd/1597:
2 locks held by getty/1688:
 #0: ffff8881d230c090 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: ffffc900004692e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x223/0x1ae0 drivers/tty/n_tty.c:2156
2 locks held by getty/1689:
 #0: ffff8881d1a8a090 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: ffffc900004852e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x223/0x1ae0 drivers/tty/n_tty.c:2156
2 locks held by getty/1690:
 #0: ffff8881d230d090 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: ffffc9000046d2e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x223/0x1ae0 drivers/tty/n_tty.c:2156
2 locks held by getty/1691:
 #0: ffff8881d1bcc090 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: ffffc9000047d2e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x223/0x1ae0 drivers/tty/n_tty.c:2156
2 locks held by getty/1692:
 #0: ffff8881d1a2d090 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: ffffc9000048f2e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x223/0x1ae0 drivers/tty/n_tty.c:2156
2 locks held by getty/1693:
 #0: ffff8881d1a8b090 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: ffffc9000048b2e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x223/0x1ae0 drivers/tty/n_tty.c:2156
2 locks held by getty/1694:
 #0: ffff8881d213d090 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: ffffc9000045d2e0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x223/0x1ae0 drivers/tty/n_tty.c:2156
6 locks held by kworker/0:3/2725:
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: __write_once_size include/linux/compiler.h:226 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:855 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:40 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_data kernel/workqueue.c:620 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:647 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: process_one_work+0x827/0x1530 kernel/workqueue.c:2240
 #1: ffff8881c5dffdd0 ((work_completion)(&hub->events)){+.+.}, at: process_one_work+0x85b/0x1530 kernel/workqueue.c:2244
 #2: ffff8881d516f200 (&dev->mutex){....}, at: device_lock include/linux/device.h:1462 [inline]
 #2: ffff8881d516f200 (&dev->mutex){....}, at: hub_event+0x1b2/0x3800 drivers/usb/core/hub.c:5498
 #3: ffff8881ce19c200 (&dev->mutex){....}, at: device_lock include/linux/device.h:1462 [inline]
 #3: ffff8881ce19c200 (&dev->mutex){....}, at: usb_disconnect+0x91/0x8d0 drivers/usb/core/hub.c:2191
 #4: ffff8881c9aaf190 (&dev->mutex){....}, at: device_release_driver_internal+0x23/0x500 drivers/base/dd.c:1162
 #5: ffff8881c9aab2a8 (&dev->mutex#2){+.+.}, at: input_disconnect_device drivers/input/input.c:732 [inline]
 #5: ffff8881c9aab2a8 (&dev->mutex#2){+.+.}, at: __input_unregister_device+0x23/0x430 drivers/input/input.c:2081
6 locks held by kworker/1:3/2745:
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: __write_once_size include/linux/compiler.h:226 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:855 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:40 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_data kernel/workqueue.c:620 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:647 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: process_one_work+0x827/0x1530 kernel/workqueue.c:2240
 #1: ffff8881ae62fdd0 ((work_completion)(&hub->events)){+.+.}, at: process_one_work+0x85b/0x1530 kernel/workqueue.c:2244
 #2: ffff8881d5196200 (&dev->mutex){....}, at: device_lock include/linux/device.h:1462 [inline]
 #2: ffff8881d5196200 (&dev->mutex){....}, at: hub_event+0x1b2/0x3800 drivers/usb/core/hub.c:5498
 #3: ffff8881d51f8520 (&port_dev->status_lock){+.+.}, at: usb_lock_port drivers/usb/core/hub.c:2997 [inline]
 #3: ffff8881d51f8520 (&port_dev->status_lock){+.+.}, at: hub_port_connect drivers/usb/core/hub.c:5115 [inline]
 #3: ffff8881d51f8520 (&port_dev->status_lock){+.+.}, at: hub_port_connect_change drivers/usb/core/hub.c:5324 [inline]
 #3: ffff8881d51f8520 (&port_dev->status_lock){+.+.}, at: port_event drivers/usb/core/hub.c:5470 [inline]
 #3: ffff8881d51f8520 (&port_dev->status_lock){+.+.}, at: hub_event+0x1c06/0x3800 drivers/usb/core/hub.c:5552
 #4: ffff8881d504ec60 (hcd->address0_mutex){+.+.}, at: hub_port_init+0x1b6/0x2d30 drivers/usb/core/hub.c:4539
 #5: ffffffff871e6f68 (ehci_cf_port_reset_rwsem){.+.+}, at: hub_port_reset+0x17b/0x1460 drivers/usb/core/hub.c:2859
5 locks held by kworker/1:4/2749:
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: __write_once_size include/linux/compiler.h:226 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:855 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:40 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_data kernel/workqueue.c:620 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:647 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: process_one_work+0x827/0x1530 kernel/workqueue.c:2240
 #1: ffff8881ae6bfdd0 ((work_completion)(&hub->events)){+.+.}, at: process_one_work+0x85b/0x1530 kernel/workqueue.c:2244
 #2: ffff8881d5168200 (&dev->mutex){....}, at: device_lock include/linux/device.h:1462 [inline]
 #2: ffff8881d5168200 (&dev->mutex){....}, at: hub_event+0x1b2/0x3800 drivers/usb/core/hub.c:5498
 #3: ffff8881d1a2c200 (&dev->mutex){....}, at: device_lock include/linux/device.h:1462 [inline]
 #3: ffff8881d1a2c200 (&dev->mutex){....}, at: __device_attach+0x7b/0x360 drivers/base/dd.c:871
 #4: ffff8881ab4a6190 (&dev->mutex){....}, at: device_lock include/linux/device.h:1462 [inline]
 #4: ffff8881ab4a6190 (&dev->mutex){....}, at: __device_attach+0x7b/0x360 drivers/base/dd.c:871
3 locks held by kworker/1:5/2754:
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: __write_once_size include/linux/compiler.h:226 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: atomic64_set include/asm-generic/atomic-instrumented.h:855 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: atomic_long_set include/asm-generic/atomic-long.h:40 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_data kernel/workqueue.c:620 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: set_work_pool_and_clear_pending kernel/workqueue.c:647 [inline]
 #0: ffff8881d8f51528 ((wq_completion)usb_hub_wq){+.+.}, at: process_one_work+0x827/0x1530 kernel/workqueue.c:2240
 #1: ffff8881d3957dd0 ((work_completion)(&hub->events)){+.+.}, at: process_one_work+0x85b/0x1530 kernel/workqueue.c:2244
 #2: ffff8881d50cb200 (&dev->mutex){....}, at: device_lock include/linux/device.h:1462 [inline]
 #2: ffff8881d50cb200 (&dev->mutex){....}, at: hub_event+0x1b2/0x3800 drivers/usb/core/hub.c:5498
2 locks held by syz-executor.0/3614:
 #0: ffff8881cc2f8148 (&evdev->mutex){+.+.}, at: evdev_close_device drivers/input/evdev.c:425 [inline]
 #0: ffff8881cc2f8148 (&evdev->mutex){+.+.}, at: evdev_release+0xeb/0x1c0 drivers/input/evdev.c:466
 #1: ffff8881c9aab2a8 (&dev->mutex#2){+.+.}, at: input_close_device+0x42/0x1a0 drivers/input/input.c:673

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

NMI backtrace for cpu 0
CPU: 0 PID: 23 Comm: khungtaskd Not tainted 5.4.0-rc5+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0xca/0x13e lib/dump_stack.c:113
 nmi_cpu_backtrace.cold+0x55/0x96 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1b0/0x1c7 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:205 [inline]
 watchdog+0x9a4/0xe50 kernel/hung_task.c:289
 kthread+0x318/0x420 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 1752 Comm: syz-executor.1 Not tainted 5.4.0-rc5+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:hlock_class kernel/locking/lockdep.c:158 [inline]
RIP: 0010:__lock_acquire+0x7e5/0x3b60 kernel/locking/lockdep.c:3952
Code: db 0f 85 93 0e 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b 54 24 28 48 c1 ea 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e 54 2a 00 00 <41> 0f b7 5f 20 66 81 e3 ff 1f 0f b7 db be 08 00 00 00 48 89 d8 48
RSP: 0018:ffff8881b00d79c8 EFLAGS: 00000046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 523122434399d62f
RDX: 1ffff1103a07240e RSI: 00000000f576ab73 RDI: ffffffff88d59d28
RBP: ffff8881d0391800 R08: 0000000000000001 R09: fffffbfff11ab3a6
R10: fffffbfff11ab3a5 R11: ffffffff88d59d2f R12: 0000000039255d9c
R13: ffffffffffffffff R14: ffffffff87867fb0 R15: ffff8881d0392050
FS:  0000000000dec940(0000) GS:ffff8881db300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200023c0 CR3: 00000001b00b9000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 lock_acquire+0x127/0x320 kernel/locking/lockdep.c:4487
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x32/0x50 kernel/locking/spinlock.c:159
 lock_hrtimer_base+0x76/0x140 kernel/time/hrtimer.c:169
 hrtimer_start_range_ns+0xef/0xb10 kernel/time/hrtimer.c:1128
 hrtimer_start_expires include/linux/hrtimer.h:435 [inline]
 hrtimer_sleeper_start_expires kernel/time/hrtimer.c:1792 [inline]
 do_nanosleep+0x1b9/0x650 kernel/time/hrtimer.c:1868
 hrtimer_nanosleep+0x249/0x4f0 kernel/time/hrtimer.c:1924
 __do_sys_nanosleep kernel/time/hrtimer.c:1958 [inline]
 __se_sys_nanosleep kernel/time/hrtimer.c:1945 [inline]
 __x64_sys_nanosleep+0x19d/0x220 kernel/time/hrtimer.c:1945
 do_syscall_64+0xb7/0x580 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4583f0
Code: c0 5b 5d c3 66 0f 1f 44 00 00 8b 04 24 48 83 c4 18 5b 5d c3 66 0f 1f 44 00 00 83 3d e1 00 62 00 00 75 14 b8 23 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 d4 d1 fb ff c3 48 83 ec 08 e8 ea 46 00 00
RSP: 002b:00007fff56c09b88 EFLAGS: 00000246 ORIG_RAX: 0000000000000023
RAX: ffffffffffffffda RBX: 000000000003cbb5 RCX: 00000000004583f0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007fff56c09b90
RBP: 00000000000000ac R08: 0000000000000001 R09: 0000000000dec940
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000b
R13: 00007fff56c09be0 R14: 000000000003c57f R15: 00007fff56c09bf0

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/31 16:25 https://github.com/google/kasan.git usb-fuzzer ff6409a6ec35 a41ca8fa .config console log report ci2-upstream-usb
2019/10/31 13:52 https://github.com/google/kasan.git usb-fuzzer ff6409a6ec35 a41ca8fa .config console log report ci2-upstream-usb
* Struck through repros no longer work on HEAD.