syzbot


INFO: task hung in hub_port_connect (2)

Status: auto-closed as invalid on 2022/07/03 17:34
Subsystems: usb
[Documentation on labels]
First crash: 744d, last: 744d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in hub_port_connect usb 2 866d 868d 0/26 closed as invalid on 2022/02/08 09:40

Sample crash report:
INFO: task kworker/0:1:14 blocked for more than 143 seconds.
      Not tainted 5.18.0-rc1-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/0:1     state:D stack:22288 pid:   14 ppid:     2 flags:0x00004000
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5073 [inline]
 __schedule+0x937/0x1090 kernel/sched/core.c:6382
 schedule+0xeb/0x1b0 kernel/sched/core.c:6454
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6513
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:673
 __mutex_lock kernel/locking/mutex.c:733 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:785
 hub_port_connect+0x51d/0x2910 drivers/usb/core/hub.c:5260
 hub_port_connect_change+0x5f9/0xc20 drivers/usb/core/hub.c:5507
 port_event+0xca0/0x13e0 drivers/usb/core/hub.c:5665
 hub_event+0x4ed/0xe40 drivers/usb/core/hub.c:5747
 process_one_work+0x83c/0x11a0 kernel/workqueue.c:2289
 worker_thread+0xa6c/0x1290 kernel/workqueue.c:2436
 kthread+0x2a3/0x2d0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30
 </TASK>
INFO: task kworker/0:2:144 blocked for more than 144 seconds.
      Not tainted 5.18.0-rc1-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/0:2     state:D stack:23128 pid:  144 ppid:     2 flags:0x00004000
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5073 [inline]
 __schedule+0x937/0x1090 kernel/sched/core.c:6382
 schedule+0xeb/0x1b0 kernel/sched/core.c:6454
 usb_kill_urb+0x1d5/0x310 drivers/usb/core/urb.c:726
 usb_start_wait_urb+0x265/0x530 drivers/usb/core/message.c:64
 usb_internal_control_msg drivers/usb/core/message.c:102 [inline]
 usb_control_msg+0x2a5/0x4b0 drivers/usb/core/message.c:153
 usb_get_descriptor+0xb5/0x3c0 drivers/usb/core/message.c:793
 usb_get_device_descriptor+0x8a/0xe0 drivers/usb/core/message.c:1071
 hub_port_init+0x106f/0x2ea0 drivers/usb/core/hub.c:4931
 hub_port_connect+0xc30/0x2910 drivers/usb/core/hub.c:5292
 hub_port_connect_change+0x5f9/0xc20 drivers/usb/core/hub.c:5507
 port_event+0xca0/0x13e0 drivers/usb/core/hub.c:5665
 hub_event+0x4ed/0xe40 drivers/usb/core/hub.c:5747
 process_one_work+0x83c/0x11a0 kernel/workqueue.c:2289
 worker_thread+0xa6c/0x1290 kernel/workqueue.c:2436
 kthread+0x2a3/0x2d0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30
 </TASK>

Showing all locks held in the system:
5 locks held by kworker/0:1/14:
 #0: ffff888145b29938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x7bc/0x11a0
 #1: ffffc90000137d20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x7fb/0x11a0 kernel/workqueue.c:2264
 #2: ffff8881494a2220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:767 [inline]
 #2: ffff8881494a2220 (&dev->mutex){....}-{3:3}, at: hub_event+0x1b2/0xe40 drivers/usb/core/hub.c:5693
 #3: ffff8881494a5580 (&port_dev->status_lock){+.+.}-{3:3}, at: usb_lock_port drivers/usb/core/hub.c:3095 [inline]
 #3: ffff8881494a5580 (&port_dev->status_lock){+.+.}-{3:3}, at: hub_port_connect+0x4f4/0x2910 drivers/usb/core/hub.c:5259
 #4: ffff888149400768 (hcd->address0_mutex){+.+.}-{3:3}, at: hub_port_connect+0x51d/0x2910 drivers/usb/core/hub.c:5260
1 lock held by khungtaskd/28:
 #0: ffffffff8cd1cd60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
3 locks held by kworker/1:2/142:
 #0: ffff888011464d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7bc/0x11a0
 #1: ffffc9000210fd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7fb/0x11a0 kernel/workqueue.c:2264
 #2: ffffffff8cd21de0 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #2: ffffffff8cd21de0 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x277/0x740 kernel/rcu/tree_exp.h:841
5 locks held by kworker/0:2/144:
 #0: ffff888145b29938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x7bc/0x11a0
 #1: ffffc9000211fd20 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x7fb/0x11a0 kernel/workqueue.c:2264
 #2: ffff88801fa50220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:767 [inline]
 #2: ffff88801fa50220 (&dev->mutex){....}-{3:3}, at: hub_event+0x1b2/0xe40 drivers/usb/core/hub.c:5693
 #3: ffff88801fa53580 (&port_dev->status_lock){+.+.}-{3:3}, at: usb_lock_port drivers/usb/core/hub.c:3095 [inline]
 #3: ffff88801fa53580 (&port_dev->status_lock){+.+.}-{3:3}, at: hub_port_connect+0x4f4/0x2910 drivers/usb/core/hub.c:5259
 #4: ffff888149400768 (hcd->address0_mutex){+.+.}-{3:3}, at: hub_port_connect+0x51d/0x2910 drivers/usb/core/hub.c:5260
2 locks held by getty/3277:
 #0: ffff88801e5d1098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc90002e732e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6c2/0x1c60 drivers/tty/n_tty.c:2075
1 lock held by syz-executor.5/3625:
 #0: ffffffff8cd432b0 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: copy_process+0x347d/0x5ff0 kernel/fork.c:2338
3 locks held by kworker/u4:21/4698:
 #0: ffff8880b9a39bd8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x25/0x110 kernel/sched/core.c:554
 #1: ffffc9000374fd20 ((work_completion)(&(&kfence_timer)->work)){+.+.}-{0:0}, at: process_one_work+0x7fb/0x11a0 kernel/workqueue.c:2264
 #2: ffffffff8cbbc430 (cpu_hotplug_lock){++++}-{0:0}, at: static_key_disable+0xe/0x20 kernel/jump_label.c:214
2 locks held by kworker/1:9/5015:
 #0: ffff888011466538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7bc/0x11a0
 #1: ffffc90005417d20 ((work_completion)(&rew.rew_work)){+.+.}-{0:0}, at: process_one_work+0x7fb/0x11a0 kernel/workqueue.c:2264
1 lock held by syz-executor.3/24756:
 #0: ffffffff8cd432b0 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: do_exit+0x16a/0x20c0 kernel/exit.c:751
1 lock held by syz-executor.3/24757:
 #0: ffffffff8cd432b0 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: do_exit+0x16a/0x20c0 kernel/exit.c:751
1 lock held by syz-executor.3/24758:
 #0: ffffffff8cd432b0 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: do_exit+0x16a/0x20c0 kernel/exit.c:751
1 lock held by syz-executor.2/24772:
 #0: ffffffff8cd432b0 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: copy_process+0x347d/0x5ff0 kernel/fork.c:2338
4 locks held by kvm-nx-lpage-re/24775:
 #0: ffffffff8cd430c8 (cgroup_mutex){+.+.}-{3:3}, at: cgroup_attach_task_all+0x23/0x130 kernel/cgroup/cgroup-v1.c:61
 #1: ffffffff8cd432b0 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: cgroup_attach_task_all+0x2f/0x130 kernel/cgroup/cgroup-v1.c:62
 #2: ffffffff8cd4f7b0 (&cpuset_rwsem){++++}-{0:0}, at: cpuset_can_attach+0x1e8/0x490 kernel/cgroup/cpuset.c:2233
 #3: ffffffff8cd21de0 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:322 [inline]
 #3: ffffffff8cd21de0 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x356/0x740 kernel/rcu/tree_exp.h:841

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 5.18.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x45f/0x490 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x16a/0x280 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:212 [inline]
 watchdog+0xc82/0xcd0 kernel/hung_task.c:369
 kthread+0x2a3/0x2d0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 4717 Comm: kworker/u4:30 Not tainted 5.18.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:core_kernel_text+0x0/0xa0 kernel/extable.c:67
Code: 8c 48 89 da e8 a1 8f ff 02 48 85 c0 75 0d 48 89 df e8 94 47 22 00 48 85 c0 74 02 5b c3 48 89 df 5b e9 f4 5a 3a 00 0f 1f 40 00 <55> 53 48 89 fb 48 c7 c0 00 00 00 81 bd 01 00 00 00 48 39 c7 72 0c
RSP: 0018:ffffc900038ef7d8 EFLAGS: 00000202
RAX: 0000000000000849 RBX: ffffffff81d6c849 RCX: ffffffff8f81e203
RDX: 0000000000000004 RSI: ffffffff8f7fe42b RDI: ffffffff81d6c849
RBP: ffffc900038ef990 R08: dffffc0000000000 R09: 0000000000000004
R10: fffff5200071df4f R11: 0000000000000005 R12: 000000000000084d
R13: ffffc900038ef920 R14: 1ffff9200071df08 R15: 0000000000000004
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555555f4e848 CR3: 000000000ca8e000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __text_poke+0x113/0x9f0 arch/x86/kernel/alternative.c:1013
 text_poke arch/x86/kernel/alternative.c:1121 [inline]
 text_poke_bp_batch+0x487/0x920 arch/x86/kernel/alternative.c:1385
 text_poke_flush arch/x86/kernel/alternative.c:1542 [inline]
 text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1549
 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
 static_key_enable_cpuslocked+0x12d/0x250 kernel/jump_label.c:177
 static_key_enable+0x16/0x20 kernel/jump_label.c:190
 toggle_allocation_gate+0xbf/0x460 mm/kfence/core.c:785
 process_one_work+0x83c/0x11a0 kernel/workqueue.c:2289
 worker_thread+0xa6c/0x1290 kernel/workqueue.c:2436
 kthread+0x2a3/0x2d0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30
 </TASK>
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	48 89 da             	mov    %rbx,%rdx
   3:	e8 a1 8f ff 02       	callq  0x2ff8fa9
   8:	48 85 c0             	test   %rax,%rax
   b:	75 0d                	jne    0x1a
   d:	48 89 df             	mov    %rbx,%rdi
  10:	e8 94 47 22 00       	callq  0x2247a9
  15:	48 85 c0             	test   %rax,%rax
  18:	74 02                	je     0x1c
  1a:	5b                   	pop    %rbx
  1b:	c3                   	retq
  1c:	48 89 df             	mov    %rbx,%rdi
  1f:	5b                   	pop    %rbx
  20:	e9 f4 5a 3a 00       	jmpq   0x3a5b19
  25:	0f 1f 40 00          	nopl   0x0(%rax)
* 29:	55                   	push   %rbp <-- trapping instruction
  2a:	53                   	push   %rbx
  2b:	48 89 fb             	mov    %rdi,%rbx
  2e:	48 c7 c0 00 00 00 81 	mov    $0xffffffff81000000,%rax
  35:	bd 01 00 00 00       	mov    $0x1,%ebp
  3a:	48 39 c7             	cmp    %rax,%rdi
  3d:	72 0c                	jb     0x4b

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/04/04 17:28 upstream 312310928417 5915c2cb .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in hub_port_connect
* Struck through repros no longer work on HEAD.