syzbot


INFO: task hung in nbd_add_socket

Status: upstream: reported C repro on 2021/03/08 23:07
Reported-by: syzbot+20a832a4769c765c4bef@syzkaller.appspotmail.com
First crash: 932d, last: 209d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in nbd_add_socket (2) block C error 34 67d 555d 0/25 upstream: reported C repro on 2022/03/21 16:06
upstream INFO: task hung in nbd_add_socket block 75 597d 676d 0/25 closed as dup on 2021/11/21 13:59
linux-4.14 INFO: task hung in nbd_add_socket (2) C error 2 387d 640d 0/1 upstream: reported C repro on 2021/12/25 23:00
linux-4.14 INFO: task hung in nbd_add_socket 1 933d 933d 0/1 auto-closed as invalid on 2021/07/06 19:04
linux-6.1 INFO: task hung in nbd_add_socket origin:upstream C 2 44d 129d 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 673d 681d 22/25 fixed on 2022/03/08 16:11
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2021/10/17 18:39 11m bisect fix linux-4.19.y error job log (0)
2021/09/17 18:04 34m bisect fix linux-4.19.y job log (0) log
2021/08/09 06:53 28m bisect fix linux-4.19.y job log (0) log
2021/07/10 06:25 28m bisect fix linux-4.19.y job log (0) log
2021/06/10 05:57 27m bisect fix linux-4.19.y job log (0) log
2021/05/11 05:23 33m bisect fix linux-4.19.y job log (0) log

Sample crash report:
Dev nbd0: unable to read RDB block 0
 nbd0: unable to read partition table
ldm_validate_partition_table(): Disk read failed.
Dev nbd0: unable to read RDB block 0
 nbd0: unable to read partition table
INFO: task syz-executor768:8108 blocked for more than 140 seconds.
      Not tainted 4.19.186-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor768 D26224  8108   8093 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 blk_mq_freeze_queue_wait+0x119/0x270 block/blk-mq.c:152
 nbd_add_socket+0x168/0x840 drivers/block/nbd.c:973
 __nbd_ioctl drivers/block/nbd.c:1320 [inline]
 nbd_ioctl+0x584/0xbe0 drivers/block/nbd.c:1387
 __blkdev_driver_ioctl block/ioctl.c:303 [inline]
 blkdev_ioctl+0x5cb/0x1a80 block/ioctl.c:601
 block_ioctl+0xe9/0x130 fs/block_dev.c:1906
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x44a169
Code: Bad RIP value.
RSP: 002b:00007ffb9c045308 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004cb508 RCX: 000000000044a169
RDX: 0000000000000004 RSI: 000000000000ab00 RDI: 0000000000000003
RBP: 00000000004cb500 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004cb50c
R13: 000000000049b08c R14: 64626e2f7665642f R15: 0000000000022000
INFO: task syz-executor768:8109 blocked for more than 140 seconds.
      Not tainted 4.19.186-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor768 D27368  8109   8093 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 blk_queue_enter+0x66f/0xb70 block/blk-core.c:959
 generic_make_request+0x3fe/0xdf0 block/blk-core.c:2404
 submit_bio+0xb1/0x430 block/blk-core.c:2576
 submit_bh_wbc+0x5a7/0x760 fs/buffer.c:3090
 submit_bh fs/buffer.c:3096 [inline]
 block_read_full_page+0x7cf/0xd10 fs/buffer.c:2310
 do_read_cache_page+0x533/0x1170 mm/filemap.c:2828
 read_mapping_page include/linux/pagemap.h:402 [inline]
 read_dev_sector+0xbf/0x500 block/partition-generic.c:671
 read_part_sector block/partitions/check.h:38 [inline]
 adfspart_check_ICS+0x114/0xe70 block/partitions/acorn.c:366
 check_partition+0x390/0x690 block/partitions/check.c:167
 rescan_partitions+0x1b5/0x970 block/partition-generic.c:535
 bdev_disk_changed+0x179/0x1b0 fs/block_dev.c:1435
 __blkdev_get+0x1282/0x1480 fs/block_dev.c:1561
 blkdev_get+0xb0/0x940 fs/block_dev.c:1627
 blkdev_open+0x202/0x290 fs/block_dev.c:1788
 do_dentry_open+0x4aa/0x1160 fs/open.c:796
 do_last fs/namei.c:3421 [inline]
 path_openat+0x793/0x2df0 fs/namei.c:3537
 do_filp_open+0x18c/0x3f0 fs/namei.c:3567
 do_sys_open+0x3b3/0x520 fs/open.c:1085
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x406994
Code: Bad RIP value.
RSP: 002b:00007ffb9c023e60 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000406994
RDX: 0000000000000000 RSI: 00007ffb9c023ef0 RDI: 00000000ffffff9c
RBP: 00007ffb9c023ef0 R08: 0000000000000000 R09: 002364626e2f7665
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 000000000049b08c R14: 64626e2f7665642f R15: 0000000000022000
INFO: task syz-executor768:8110 blocked for more than 140 seconds.
      Not tainted 4.19.186-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor768 D29160  8110   8093 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
 __mutex_lock_common kernel/locking/mutex.c:1005 [inline]
 __mutex_lock+0x647/0x1260 kernel/locking/mutex.c:1075
 __blkdev_get+0x1d0/0x1480 fs/block_dev.c:1478
 blkdev_get+0xb0/0x940 fs/block_dev.c:1627
 blkdev_open+0x202/0x290 fs/block_dev.c:1788
 do_dentry_open+0x4aa/0x1160 fs/open.c:796
 do_last fs/namei.c:3421 [inline]
 path_openat+0x793/0x2df0 fs/namei.c:3537
 do_filp_open+0x18c/0x3f0 fs/namei.c:3567
 do_sys_open+0x3b3/0x520 fs/open.c:1085
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x406994
Code: Bad RIP value.
RSP: 002b:00007ffb9c002e60 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000406994
RDX: 0000000000000000 RSI: 00007ffb9c002ef0 RDI: 00000000ffffff9c
RBP: 00007ffb9c002ef0 R08: 0000000000000000 R09: 002364626e2f7665
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 000000000049b08c R14: 64626e2f7665642f R15: 0000000000022000

Showing all locks held in the system:
2 locks held by ksoftirqd/0/9:
 #0: 00000000fc2bc6d0 (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1824 [inline]
 #0: 00000000fc2bc6d0 (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455
 #1: 00000000540244f2 (rcu_read_lock){....}, at: trace_sched_stat_runtime include/trace/events/sched.h:428 [inline]
 #1: 00000000540244f2 (rcu_read_lock){....}, at: update_curr+0x2c3/0x870 kernel/sched/fair.c:857
1 lock held by khungtaskd/1570:
 #0: 00000000540244f2 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4440
2 locks held by in:imklog/7818:
 #0: 00000000e9934136 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
 #1: 00000000852217bc (fs_reclaim){+.+.}, at: __might_fault+0xef/0x1d0 mm/memory.c:4730
1 lock held by systemd-udevd/8102:
 #0: 00000000bbbf09e9 (&bdev->bd_mutex){+.+.}, at: blkdev_put+0x30/0x520 fs/block_dev.c:1839
1 lock held by syz-executor768/8108:
 #0: 00000000af39b74a (&nbd->config_lock){+.+.}, at: nbd_ioctl+0x151/0xbe0 drivers/block/nbd.c:1380
1 lock held by syz-executor768/8109:
 #0: 00000000bbbf09e9 (&bdev->bd_mutex){+.+.}, at: __blkdev_get+0x1d0/0x1480 fs/block_dev.c:1478
1 lock held by syz-executor768/8110:
 #0: 00000000bbbf09e9 (&bdev->bd_mutex){+.+.}, at: __blkdev_get+0x1d0/0x1480 fs/block_dev.c:1478

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

NMI backtrace for cpu 1
CPU: 1 PID: 1570 Comm: khungtaskd Not tainted 4.19.186-syzkaller #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+0x1fc/0x2ef lib/dump_stack.c:118
 nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1a6/0x1f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
 watchdog+0x991/0xe60 kernel/hung_task.c:287
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 4678 Comm: systemd-journal Not tainted 4.19.186-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:write_comp_data+0x23/0x70 kernel/kcov.c:122
Code: 1f 84 00 00 00 00 00 49 89 f1 49 89 fa 65 48 8b 34 25 80 df 01 00 65 8b 05 ea 80 9f 7e a9 00 01 1f 00 75 4f 8b 86 60 13 00 00 <83> f8 03 75 44 48 8b 86 68 13 00 00 8b b6 64 13 00 00 48 8b 38 48
RSP: 0018:ffff8880a1987910 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000023 RCX: ffffffff87ed607e
RDX: 0000000000000023 RSI: ffff8880a1978200 RDI: 0000000000000007
RBP: ffff8880ae3d31c0 R08: 0000000000000000 R09: 000000000000003f
R10: 0000000000000007 R11: 0000000000000000 R12: ffff8880ae3d30a8
R13: 0000000000000006 R14: 0000000000000000 R15: ffff8880ae3d3080
FS:  00007ff6d2f0f8c0(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff6d02f7000 CR3: 00000000a1876000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 radix_tree_next_chunk+0x30e/0xaa0 lib/radix-tree.c:1765
 find_get_entries+0x5cc/0xa90 mm/filemap.c:1659
 shmem_undo_range+0x1b7/0x1f30 mm/shmem.c:819
 shmem_truncate_range mm/shmem.c:995 [inline]
 shmem_setattr+0x80a/0xc90 mm/shmem.c:1054
 notify_change+0x70b/0xfc0 fs/attr.c:334
 do_truncate+0x134/0x1f0 fs/open.c:63
 do_sys_ftruncate+0x492/0x560 fs/open.c:194
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7ff6d21d1ec7
Code: 73 01 c3 48 8b 0d d1 5f 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 4d 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 5f 2b 00 f7 d8 64 89 01 48
RSP: 002b:00007ffee60129f8 EFLAGS: 00000202 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007ffee6012a30 RCX: 00007ff6d21d1ec7
RDX: 000055bba1b4be80 RSI: 0000000000800000 RDI: 0000000000000010
RBP: 00007ffee6012a28 R08: 0000000000000008 R09: 000055bba1b4c25c
R10: 000055bba1b4c1e0 R11: 0000000000000202 R12: 000055bba1b4c1e0
R13: 00007ffee6012b28 R14: 000055bba1a20958 R15: 0005bfab888accbd

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/11 05:20 linux-4.19.y 830a059cbba6 6a81331a .config console log report syz C ci2-linux-4-19 INFO: task hung in nbd_add_socket
2021/03/09 05:17 linux-4.19.y 2cae3e25b706 09fbf400 .config console log report syz C ci2-linux-4-19 INFO: task hung in nbd_add_socket
2023/03/02 07:56 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in nbd_add_socket
2023/01/02 17:12 linux-4.19.y 3f8a27f9e27b ab32d508 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in nbd_add_socket
2022/06/14 08:35 linux-4.19.y 3f8a27f9e27b 0f087040 .config console log report info ci2-linux-4-19 INFO: task hung in nbd_add_socket
2022/06/09 12:17 linux-4.19.y 3f8a27f9e27b 0d5abf15 .config console log report info ci2-linux-4-19 INFO: task hung in nbd_add_socket
2022/04/16 07:36 linux-4.19.y 3f8a27f9e27b 8bcc32a6 .config console log report info ci2-linux-4-19 INFO: task hung in nbd_add_socket
2022/01/17 19:02 linux-4.19.y 3f8a27f9e27b 731a2d23 .config console log report info ci2-linux-4-19 INFO: task hung in nbd_add_socket
2021/08/18 18:04 linux-4.19.y 59456c9cc40c a2fe1cb5 .config console log report info ci2-linux-4-19 INFO: task hung in nbd_add_socket
2021/03/25 00:10 linux-4.19.y 78fec1611cbf 607e3baf .config console log report info ci2-linux-4-19 INFO: task hung in nbd_add_socket
2021/03/08 23:06 linux-4.19.y 2cae3e25b706 09fbf400 .config console log report info ci2-linux-4-19 INFO: task hung in nbd_add_socket
* Struck through repros no longer work on HEAD.