syzbot


INFO: task hung in hci_release_dev

Status: auto-obsoleted due to no activity on 2024/04/28 17:15
Subsystems: bluetooth
[Documentation on labels]
Reported-by: syzbot+83da23da6243e55b4670@syzkaller.appspotmail.com
First crash: 248d, last: 246d
Cause bisection: introduced by (bisect log) :
commit dd6c3c5441263723305a9c52c5ccc899a4653000
Author: Tejun Heo <tj@kernel.org>
Date: Mon Jan 29 18:11:24 2024 +0000

  workqueue: Move pwq_dec_nr_in_flight() to the end of work item handling

Crash: INFO: task hung in hci_release_dev (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bluetooth?] INFO: task hung in hci_release_dev 0 (1) 2024/02/07 00:07
Last patch testing requests (4)
Created Duration User Patch Repo Result
2024/04/28 16:26 23m retest repro linux-next OK log
2024/04/28 16:26 24m retest repro linux-next OK log
2024/02/18 14:31 21m retest repro linux-next error
2024/02/18 14:31 22m retest repro linux-next error

Sample crash report:
INFO: task syz-executor108:5074 blocked for more than 143 seconds.
      Not tainted 6.8.0-rc2-next-20240202-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor108 state:D stack:25360 pid:5074  tgid:5074  ppid:5064   flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5400 [inline]
 __schedule+0x17df/0x4a40 kernel/sched/core.c:6727
 __schedule_loop kernel/sched/core.c:6804 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6819
 schedule_timeout+0xb0/0x310 kernel/time/timer.c:2159
 do_wait_for_common kernel/sched/completion.c:95 [inline]
 __wait_for_common kernel/sched/completion.c:116 [inline]
 wait_for_common kernel/sched/completion.c:127 [inline]
 wait_for_completion+0x355/0x620 kernel/sched/completion.c:148
 __flush_workqueue+0x730/0x1630 kernel/workqueue.c:3617
 drain_workqueue+0xc9/0x390 kernel/workqueue.c:3730
 destroy_workqueue+0xba/0xc40 kernel/workqueue.c:5319
 hci_release_dev+0x136/0x1670 net/bluetooth/hci_core.c:2807
 bt_host_release+0x83/0x90 net/bluetooth/hci_sysfs.c:94
 device_release+0x99/0x1c0
 kobject_cleanup lib/kobject.c:682 [inline]
 kobject_release lib/kobject.c:716 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x1f5/0x430 lib/kobject.c:733
 hci_uart_tty_close+0x1c1/0x290 drivers/bluetooth/hci_ldisc.c:552
 tty_ldisc_kill+0xa3/0x1a0 drivers/tty/tty_ldisc.c:607
 tty_ldisc_release+0x174/0x200 drivers/tty/tty_ldisc.c:775
 tty_release_struct+0x2b/0xe0 drivers/tty/tty_io.c:1696
 tty_release+0xd0c/0x12c0 drivers/tty/tty_io.c:1867
 __fput+0x429/0x8a0 fs/file_table.c:376
 task_work_run+0x24f/0x310 kernel/task_work.c:180
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0xa1b/0x27e0 kernel/exit.c:878
 do_group_exit+0x207/0x2c0 kernel/exit.c:1027
 __do_sys_exit_group kernel/exit.c:1038 [inline]
 __se_sys_exit_group kernel/exit.c:1036 [inline]
 __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1036
 do_syscall_64+0xfb/0x240
 entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7f08333d3309
RSP: 002b:00007ffd1b9835d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f08333d3309
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 00007f0833453390 R08: ffffffffffffffb8 R09: 0000555556c61610
R10: 000000000000000e R11: 0000000000000246 R12: 00007f0833453390
R13: 0000000000000000 R14: 00007f0833454e60 R15: 00007f08333a42f0
 </TASK>

Showing all locks held in the system:
5 locks held by kworker/u4:0/10:
1 lock held by khungtaskd/29:
 #0: ffffffff8e130d60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline]
 #0: ffffffff8e130d60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline]
 #0: ffffffff8e130d60 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6614
2 locks held by getty/4817:
 #0: ffff88802afa30a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc90002f162f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6b5/0x1e10 drivers/tty/n_tty.c:2201
1 lock held by syz-executor108/5074:
 #0: ffff88807a68e0a0 (&tty->ldisc_sem){++++}-{0:0}, at: __tty_ldisc_lock drivers/tty/tty_ldisc.c:289 [inline]
 #0: ffff88807a68e0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_lock_pair_timeout drivers/tty/tty_ldisc.c:352 [inline]
 #0: ffff88807a68e0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_lock_pair drivers/tty/tty_ldisc.c:366 [inline]
 #0: ffff88807a68e0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_release+0x110/0x200 drivers/tty/tty_ldisc.c:774

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

NMI backtrace for cpu 1
CPU: 1 PID: 29 Comm: khungtaskd Not tainted 6.8.0-rc2-next-20240202-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x198/0x320 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+0xfb0/0xff0 kernel/hung_task.c:379
 kthread+0x2f0/0x390 kernel/kthread.c:388
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:242
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 10 Comm: kworker/u4:0 Not tainted 6.8.0-rc2-next-20240202-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:can_migrate_task+0x4ef/0x960 kernel/sched/fair.c:8991
Code: c1 e8 03 42 0f b6 04 20 84 c0 0f 85 fa 01 00 00 44 3b 7d 00 76 6c 83 fb 01 75 0a 0f 1f 44 00 00 0f 1f 44 00 00 b9 01 00 00 00 <89> c8 48 83 c4 38 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc 48
RSP: 0018:ffffc900000f6f70 EFLAGS: 00000046
RAX: 0000000000000000 RBX: ffff88801969bc34 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88801969c028
RBP: 0000000000000001 R08: ffff88801969c02f R09: 1ffff110032d3805
R10: dffffc0000000000 R11: ffffed10032d3806 R12: ffffc900000f7580
R13: ffff88801969bc00 R14: dffffc0000000000 R15: ffff88801969c018
FS:  0000000000000000(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055b598263448 CR3: 000000000df32000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 detach_tasks kernel/sched/fair.c:9088 [inline]
 load_balance+0x5480/0x8920 kernel/sched/fair.c:11335
 newidle_balance+0x6be/0x1080 kernel/sched/fair.c:12363
 pick_next_task_fair+0x27a/0xde0 kernel/sched/fair.c:8502
 __pick_next_task+0xb0/0x2c0 kernel/sched/core.c:6021
 pick_next_task kernel/sched/core.c:6111 [inline]
 __schedule+0x729/0x4a40 kernel/sched/core.c:6691
 __schedule_loop kernel/sched/core.c:6804 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6819
 toggle_allocation_gate+0x16a/0x250 mm/kfence/core.c:828
 process_one_work kernel/workqueue.c:3049 [inline]
 process_scheduled_works+0x913/0x14f0 kernel/workqueue.c:3125
 worker_thread+0xa60/0x1000 kernel/workqueue.c:3206
 kthread+0x2f0/0x390 kernel/kthread.c:388
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:242
 </TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.335 msecs

Crashes (18):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/03 00:08 linux-next 076d56d74f17 60bf9982 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 20:06 linux-next 076d56d74f17 60bf9982 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/04 10:50 linux-next 076d56d74f17 a67b2c42 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/03 19:20 linux-next 076d56d74f17 a67b2c42 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/03 19:18 linux-next 076d56d74f17 a67b2c42 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/03 19:18 linux-next 076d56d74f17 a67b2c42 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/03 08:47 linux-next 076d56d74f17 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 19:37 linux-next 076d56d74f17 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 17:31 linux-next 076d56d74f17 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 13:36 linux-next 076d56d74f17 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 13:33 linux-next 076d56d74f17 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 13:29 linux-next 076d56d74f17 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 13:16 linux-next 076d56d74f17 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 13:12 linux-next 076d56d74f17 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 12:25 linux-next 076d56d74f17 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 11:19 linux-next 076d56d74f17 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 11:00 linux-next 076d56d74f17 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
2024/02/02 07:24 linux-next 076d56d74f17 d61103fc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in hci_release_dev
* Struck through repros no longer work on HEAD.