syzbot


INFO: task hung in nbd_add_socket (2)

Status: upstream: reported C repro on 2022/03/21 16:06
Labels: block (incorrect?)
Reported-by: syzbot+cbb4b1ebc70d0c5a8c29@syzkaller.appspotmail.com
First crash: 442d, last: 3d20h

Cause bisection: failed (error log, bisect log)
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly block report (May 2023) 0 (1) 2023/05/05 08:06
[syzbot] INFO: task hung in nbd_add_socket (2) 0 (2) 2022/04/07 05:24
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in nbd_add_socket 75 480d 559d 0/24 closed as dup on 2021/11/21 13:59
linux-4.14 INFO: task hung in nbd_add_socket (2) C error 2 270d 523d 0/1 upstream: reported C repro on 2021/12/25 23:00
linux-4.14 INFO: task hung in nbd_add_socket 1 815d 815d 0/1 auto-closed as invalid on 2021/07/06 19:04
linux-4.19 INFO: task hung in nbd_add_socket C error 11 92d 815d 0/1 upstream: reported C repro on 2021/03/08 23:07
linux-6.1 INFO: task hung in nbd_add_socket origin:upstream C 1 11d 11d 0/3 upstream: reported C repro on 2023/05/21 19:27
upstream INFO: task can't die in blk_mq_freeze_queue_wait block 221 556d 564d 22/24 fixed on 2022/03/08 16:11
Last patch testing requests (2)
Created Duration User Patch Repo Result
2022/04/07 10:23 11m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ 3e732ebf7316 OK
2022/04/07 08:54 4m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ 3e732ebf7316 error
Fix bisection attempts (7)
Created Duration User Patch Repo Result
2023/05/29 19:17 30m bisect fix upstream job log (0) log
2023/04/09 02:05 30m bisect fix upstream job log (0) log
2023/03/10 01:34 30m bisect fix upstream job log (0) log
2023/02/08 00:33 32m bisect fix upstream job log (0) log
2022/07/16 15:39 24m bisect fix upstream job log (0) log
2022/06/09 08:34 29m bisect fix upstream job log (0) log
2022/05/09 23:26 23m bisect fix upstream job log (0) log

Sample crash report:
INFO: task syz-executor157:5205 blocked for more than 143 seconds.
      Not tainted 6.2.0-rc2-syzkaller-00313-g9b43a525db12 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor157 state:D stack:26936 pid:5205  ppid:5091   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x9d1/0xe40 kernel/sched/core.c:6555
 schedule+0xcb/0x190 kernel/sched/core.c:6631
 blk_mq_freeze_queue_wait+0x105/0x190 block/blk-mq.c:180
 nbd_add_socket+0x17b/0x8e0 drivers/block/nbd.c:1122
 __nbd_ioctl drivers/block/nbd.c:1465 [inline]
 nbd_ioctl+0x1d5/0x5b0 drivers/block/nbd.c:1522
 blkdev_ioctl+0x3c9/0x7c0 block/ioctl.c:616
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fe09f221239
RSP: 002b:00007fe09f1ce308 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fe09f2a5408 RCX: 00007fe09f221239
RDX: 0000000000000004 RSI: 000000000000ab00 RDI: 0000000000000003
RBP: 00007fe09f2a5400 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe09f2a540c
R13: 00007fe09f2721a4 R14: 64626e2f7665642f R15: 0000000000022000
 </TASK>
INFO: task syz-executor157:5207 blocked for more than 143 seconds.
      Not tainted 6.2.0-rc2-syzkaller-00313-g9b43a525db12 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor157 state:D stack:28904 pid:5207  ppid:5091   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x9d1/0xe40 kernel/sched/core.c:6555
 schedule+0xcb/0x190 kernel/sched/core.c:6631
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6690
 __mutex_lock_common+0xecf/0x26c0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
 nbd_ioctl+0xd7/0x5b0 drivers/block/nbd.c:1515
 blkdev_ioctl+0x3c9/0x7c0 block/ioctl.c:616
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fe09f221239
RSP: 002b:00007fe09f1ad308 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fe09f2a5418 RCX: 00007fe09f221239
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000003
RBP: 00007fe09f2a5410 R08: 00007fe09f1ad700 R09: 0000000000000000
R10: 00007fe09f1ad700 R11: 0000000000000246 R12: 00007fe09f2a541c
R13: 00007fe09f2721a4 R14: 64626e2f7665642f R15: 0000000000022000
 </TASK>
INFO: task udevd:5206 blocked for more than 143 seconds.
      Not tainted 6.2.0-rc2-syzkaller-00313-g9b43a525db12 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:26328 pid:5206  ppid:4422   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x9d1/0xe40 kernel/sched/core.c:6555
 schedule+0xcb/0x190 kernel/sched/core.c:6631
 io_schedule+0x83/0x100 kernel/sched/core.c:8811
 folio_wait_bit_common+0x8ca/0x1390 mm/filemap.c:1297
 folio_put_wait_locked mm/filemap.c:1466 [inline]
 do_read_cache_folio+0xb9/0x790 mm/filemap.c:3535
 read_mapping_folio include/linux/pagemap.h:761 [inline]
 read_part_sector+0xcb/0x360 block/partitions/core.c:717
 adfspart_check_ICS+0xd4/0x950 block/partitions/acorn.c:360
 check_partition block/partitions/core.c:146 [inline]
 blk_add_partitions block/partitions/core.c:602 [inline]
 bdev_disk_changed+0x79d/0x1420 block/partitions/core.c:688
 blkdev_get_whole+0x342/0x3d0 block/bdev.c:685
 blkdev_get_by_dev+0x300/0xa60 block/bdev.c:822
 blkdev_open+0x128/0x2e0 block/fops.c:478
 do_dentry_open+0x85f/0x11b0 fs/open.c:882
 do_open fs/namei.c:3557 [inline]
 path_openat+0x25cc/0x2de0 fs/namei.c:3714
 do_filp_open+0x275/0x500 fs/namei.c:3741
 do_sys_openat2+0x13b/0x500 fs/open.c:1310
 do_sys_open fs/open.c:1326 [inline]
 __do_sys_openat fs/open.c:1342 [inline]
 __se_sys_openat fs/open.c:1337 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1337
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fdf33f25697
RSP: 002b:00007ffd88d5f390 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 000055c149591dd0 RCX: 00007fdf33f25697
RDX: 00000000000a0800 RSI: 000055c149569680 RDI: 00000000ffffff9c
RBP: 000055c149569680 R08: 0000000000000001 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000a0800
R13: 000055c14958c290 R14: 00007ffd88d5f43c R15: 000055c149568910
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d5239d0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x30/0xd00 kernel/rcu/tasks.h:507
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8d5241d0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x30/0xd00 kernel/rcu/tasks.h:507
1 lock held by khungtaskd/28:
 #0: ffffffff8d523800 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/4740:
 #0: ffff88802c5ab098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900015802f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6e8/0x1e50 drivers/tty/n_tty.c:2177
1 lock held by syz-executor157/5205:
 #0: ffff88801f4081a0 (&nbd->config_lock){+.+.}-{3:3}, at: nbd_ioctl+0xd7/0x5b0 drivers/block/nbd.c:1515
1 lock held by syz-executor157/5207:
 #0: ffff88801f4081a0 (&nbd->config_lock){+.+.}-{3:3}, at: nbd_ioctl+0xd7/0x5b0 drivers/block/nbd.c:1515
1 lock held by udevd/5206:
 #0: ffff888146a5c4c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0xfe/0xa60 block/bdev.c:813

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.2.0-rc2-syzkaller-00313-g9b43a525db12 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e3/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x19b/0x3e0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
 watchdog+0xcd5/0xd20 kernel/hung_task.c:377
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 9 Comm: kworker/u4:0 Not tainted 6.2.0-rc2-syzkaller-00313-g9b43a525db12 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:match_held_lock+0x17/0xb0 kernel/locking/lockdep.c:5117
Code: 8f ff 8d f6 0f 0b e9 38 ff ff ff e8 93 fa ff ff 0f 1f 00 55 53 bd 01 00 00 00 48 39 77 10 74 67 48 89 fb 81 7f 20 00 00 10 00 <72> 59 48 8b 46 08 48 85 c0 75 11 31 ed 48 89 f7 31 f6 e8 82 fe ff
RSP: 0018:ffffc900000e7820 EFLAGS: 00000087
RAX: 0000000000000003 RBX: ffff88813fee0a88 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8d523780 RDI: ffff88813fee0a88
RBP: 0000000000000001 R08: dffffc0000000000 R09: ffffc900000e7a60
R10: fffff5200001cf51 R11: 1ffff9200001cf4c R12: 0000000000000246
R13: ffff88813fee0000 R14: 00000000ffffffff R15: ffffffff8d523780
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f37a890e310 CR3: 000000000d28e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __lock_is_held kernel/locking/lockdep.c:5409 [inline]
 lock_is_held_type+0xb1/0x190 kernel/locking/lockdep.c:5711
 lock_is_held include/linux/lockdep.h:283 [inline]
 __might_resched+0xdf/0x6a0 kernel/sched/core.c:9947
 __mutex_lock_common+0xd2/0x26c0 kernel/locking/mutex.c:580
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
 jump_label_lock kernel/jump_label.c:27 [inline]
 static_key_disable_cpuslocked+0x95/0x1b0 kernel/jump_label.c:233
 static_key_disable+0x16/0x20 kernel/jump_label.c:243
 toggle_allocation_gate+0x1b8/0x250 mm/kfence/core.c:804
 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289
 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>

Crashes (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Manager Title
2023/01/09 00:33 upstream 9b43a525db12 1dac8c7a .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2023/01/08 08:32 upstream 0a71553536d2 1dac8c7a .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2022/12/02 23:01 upstream a4412fdd49dc e080de16 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in nbd_add_socket
2022/10/03 05:10 upstream a962b54e162c feb56351 .config console log report syz C [disk image] [vmlinux] ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2022/10/02 08:18 upstream b357fd1c2afc feb56351 .config console log report syz C [disk image] [vmlinux] ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2022/09/19 18:23 upstream 521a547ced64 dd9a85ff .config console log report syz C ci-upstream-kasan-gce-selinux-root INFO: task hung in nbd_add_socket
2022/09/18 13:57 upstream a335366bad13 dd9a85ff .config console log report syz C ci-upstream-kasan-gce-selinux-root INFO: task hung in nbd_add_socket
2022/09/18 06:19 upstream a335366bad13 dd9a85ff .config console log report syz C ci-upstream-kasan-gce-selinux-root INFO: task hung in nbd_add_socket
2022/09/18 04:17 upstream a335366bad13 dd9a85ff .config console log report syz C ci-upstream-kasan-gce-selinux-root INFO: task hung in nbd_add_socket
2022/09/08 08:26 upstream 0066f1b0e275 435aeef7 .config console log report syz C ci-upstream-kasan-gce-root INFO: task hung in nbd_add_socket
2022/09/05 06:24 upstream 7726d4c3e60b 28811d0a .config console log report syz C [disk image] [vmlinux] ci-upstream-kasan-gce-selinux-root INFO: task hung in nbd_add_socket
2022/09/02 12:23 upstream 42e66b1cc3a0 a805568e .config console log report syz C ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2022/08/23 20:10 upstream 072e51356cd5 cea8b0f7 .config console log report syz C ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2022/08/20 08:36 upstream 4c2d0b039c5c 26a13b38 .config console log report syz C ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2022/08/13 15:16 upstream 7ebfc85e2cd7 8dfcaa3d .config console log report syz C ci-upstream-kasan-gce-root INFO: task hung in nbd_add_socket
2022/08/06 10:01 upstream 200e340f2196 e853abd9 .config strace log report syz C ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2022/04/07 05:35 upstream 3e732ebf7316 97582466 .config console log report syz C ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2022/04/07 05:23 upstream 3e732ebf7316 97582466 .config console log report syz C ci-upstream-kasan-gce-selinux-root INFO: task hung in nbd_add_socket
2022/09/12 01:36 linux-next e47eb90a0a9a 356d8217 .config console log report syz C ci-upstream-linux-next-kasan-gce-root INFO: task hung in nbd_add_socket
2022/08/21 10:43 linux-next 8755ae45a9e8 26a13b38 .config console log report syz C ci-upstream-linux-next-kasan-gce-root INFO: task hung in nbd_add_socket
2022/08/15 00:44 linux-next 6c8f479764eb 8dfcaa3d .config console log report syz C ci-upstream-linux-next-kasan-gce-root INFO: task hung in nbd_add_socket
2022/08/14 02:56 linux-next 6c8f479764eb 8dfcaa3d .config console log report syz C ci-upstream-linux-next-kasan-gce-root INFO: task hung in nbd_add_socket
2022/08/12 18:00 linux-next 6c8f479764eb 402cd70d .config console log report syz C ci-upstream-linux-next-kasan-gce-root INFO: task hung in nbd_add_socket
2022/08/11 08:45 linux-next 6c8f479764eb a6201f11 .config console log report syz C ci-upstream-linux-next-kasan-gce-root INFO: task hung in nbd_add_socket
2022/06/16 14:03 linux-next 6012273897fe 1719ee24 .config console log report syz C ci-upstream-linux-next-kasan-gce-root INFO: task hung in nbd_add_socket
2022/03/17 15:46 upstream 56e337f2cf13 dfa9a8ed .config console log report syz ci-upstream-kasan-gce-root INFO: task hung in nbd_add_socket
2023/04/29 19:16 upstream 89d77f71f493 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2022/10/22 06:43 upstream 4da34b7d175d c0b80a55 .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2022/04/07 02:49 upstream 3e732ebf7316 97582466 .config console log report info ci-upstream-kasan-gce-smack-root INFO: task hung in nbd_add_socket
2022/04/07 02:49 upstream 3e732ebf7316 97582466 .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in nbd_add_socket
2022/04/07 02:45 upstream 3e732ebf7316 97582466 .config console log report info ci-upstream-kasan-gce-root INFO: task hung in nbd_add_socket
2022/03/17 13:28 upstream 56e337f2cf13 dfa9a8ed .config console log report info ci-upstream-kasan-gce-root INFO: task hung in nbd_add_socket
2022/10/31 18:33 linux-next 4d48f589d294 2a71366b .config console log report info [disk image] [vmlinux] ci-upstream-linux-next-kasan-gce-root INFO: task hung in nbd_add_socket
* Struck through repros no longer work on HEAD.