syzbot


INFO: task hung in blk_freeze_queue (3)

Status: upstream: reported C repro on 2022/08/31 14:35
Reported-by: syzbot+38e6c55d4969a14c1534@syzkaller.appspotmail.com
Fix commit: 1de7c3cf48fc nbd: Fix hung when signal interrupts nbd_start_device_ioctl()
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 163d, last: 79d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in blk_freeze_queue C 188 1674d 1825d 9/24 fixed on 2018/07/09 18:05
upstream INFO: task hung in blk_freeze_queue (2) 1 1576d 1576d 0/24 auto-closed as invalid on 2019/04/12 00:55
Last patch testing requests:
Created Duration User Patch Repo Result
2022/09/03 00:47 12m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log
2022/09/02 23:54 12m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log

Sample crash report:
INFO: task syz-executor898:3778 blocked for more than 143 seconds.
      Not tainted 6.1.0-rc5-syzkaller-32269-g9500fc6e9e60 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor898 state:D stack:0     pid:3778  ppid:3109   flags:0x00000001
Call trace:
 __switch_to+0x180/0x298 arch/arm64/kernel/process.c:553
 context_switch kernel/sched/core.c:5191 [inline]
 __schedule+0x408/0x594 kernel/sched/core.c:6503
 schedule+0x64/0xa4 kernel/sched/core.c:6579
 blk_mq_freeze_queue_wait+0x94/0xf4 block/blk-mq.c:180
 blk_freeze_queue+0x94/0xa8 block/blk-mq.c:207
 blk_mq_freeze_queue+0x20/0x30 block/blk-mq.c:216
 nbd_add_socket+0x78/0x27c drivers/block/nbd.c:1121
 __nbd_ioctl+0x80/0x334 drivers/block/nbd.c:1464
 nbd_ioctl+0xec/0x13c drivers/block/nbd.c:1521
 blkdev_ioctl+0x24c/0x6d8 block/ioctl.c:614
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __arm64_sys_ioctl+0xd0/0x140 fs/ioctl.c:856
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
 el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584
INFO: task syz-executor898:3779 blocked for more than 143 seconds.
      Not tainted 6.1.0-rc5-syzkaller-32269-g9500fc6e9e60 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor898 state:D stack:0     pid:3779  ppid:3109   flags:0x00000001
Call trace:
 __switch_to+0x180/0x298 arch/arm64/kernel/process.c:553
 context_switch kernel/sched/core.c:5191 [inline]
 __schedule+0x408/0x594 kernel/sched/core.c:6503
 schedule+0x64/0xa4 kernel/sched/core.c:6579
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6638
 __mutex_lock_common+0x788/0xca8 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
 nbd_ioctl+0x70/0x13c drivers/block/nbd.c:1514
 blkdev_ioctl+0x24c/0x6d8 block/ioctl.c:614
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __arm64_sys_ioctl+0xd0/0x140 fs/ioctl.c:856
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
 el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584
INFO: task syz-executor898:3780 blocked for more than 143 seconds.
      Not tainted 6.1.0-rc5-syzkaller-32269-g9500fc6e9e60 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor898 state:D stack:0     pid:3780  ppid:3109   flags:0x00000001
Call trace:
 __switch_to+0x180/0x298 arch/arm64/kernel/process.c:553
 context_switch kernel/sched/core.c:5191 [inline]
 __schedule+0x408/0x594 kernel/sched/core.c:6503
 schedule+0x64/0xa4 kernel/sched/core.c:6579
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6638
 __mutex_lock_common+0x788/0xca8 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
 nbd_ioctl+0x70/0x13c drivers/block/nbd.c:1514
 blkdev_ioctl+0x24c/0x6d8 block/ioctl.c:614
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __arm64_sys_ioctl+0xd0/0x140 fs/ioctl.c:856
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
 el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/11:
 #0: ffff80000d4d4768 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x3c/0x450 kernel/rcu/tasks.h:507
1 lock held by rcu_tasks_trace/12:
 #0: ffff80000d4d4db8 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x3c/0x450 kernel/rcu/tasks.h:507
1 lock held by khungtaskd/27:
 #0: ffff80000d4d4640 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x4/0x48 include/linux/rcupdate.h:303
1 lock held by klogd/2592:
 #0: ffff0001fefeee98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested kernel/sched/core.c:537 [inline]
 #0: ffff0001fefeee98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock kernel/sched/sched.h:1354 [inline]
 #0: ffff0001fefeee98 (&rq->__lock){-.-.}-{2:2}, at: rq_lock kernel/sched/sched.h:1644 [inline]
 #0: ffff0001fefeee98 (&rq->__lock){-.-.}-{2:2}, at: __schedule+0xa4/0x594 kernel/sched/core.c:6420
2 locks held by getty/2756:
 #0: ffff0000c7d60898 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x28/0x58 drivers/tty/tty_ldisc.c:244
 #1: ffff80000f6ee2f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x19c/0x89c drivers/tty/n_tty.c:2177
1 lock held by syz-executor898/3778:
 #0: ffff0000c62c4d98 (&nbd->config_lock){+.+.}-{3:3}, at: nbd_ioctl+0x70/0x13c drivers/block/nbd.c:1514
1 lock held by syz-executor898/3779:
 #0: ffff0000c62c4d98 (&nbd->config_lock){+.+.}-{3:3}, at: nbd_ioctl+0x70/0x13c drivers/block/nbd.c:1514
1 lock held by syz-executor898/3780:
 #0: ffff0000c62c4d98 (&nbd->config_lock){+.+.}-{3:3}, at: nbd_ioctl+0x70/0x13c drivers/block/nbd.c:1514

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


Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-gce-arm64 2022/11/19 09:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 9500fc6e9e60 5bb70014 .config console log report syz C [disk image] [vmlinux] [kernel image] INFO: task hung in blk_freeze_queue
ci-upstream-gce-arm64 2022/10/16 10:19 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 67cb024c .config console log report syz C [disk image] [vmlinux] INFO: task hung in blk_freeze_queue
ci-upstream-gce-arm64 2022/10/15 22:31 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 67cb024c .config console log report syz C [disk image] [vmlinux] INFO: task hung in blk_freeze_queue
ci-upstream-gce-arm64 2022/10/12 08:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci bbed346d5a96 16a9c9e0 .config console log report syz C [disk image] [vmlinux] INFO: task hung in blk_freeze_queue
ci-upstream-gce-arm64 2022/09/08 09:21 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 25050c56fa3c 435aeef7 .config console log report syz C INFO: task hung in blk_freeze_queue
ci-upstream-gce-arm64 2022/09/05 15:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 85413d1e802e 922294ab .config console log report syz C INFO: task hung in blk_freeze_queue
ci-upstream-gce-arm64 2022/08/27 14:24 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 07177916 .config console log report syz C INFO: task hung in blk_freeze_queue
ci-upstream-gce-arm64 2022/09/14 07:53 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a6b443748715 b884348d .config console log report info INFO: task hung in blk_freeze_queue
* Struck through repros no longer work on HEAD.