[v6.1] INFO: task hung in nbd_ioctl

0 views
Skip to first unread message

syzbot

unread,
Apr 23, 2023, 7:29:59 PM4/23/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: f17b0ab65d17 Linux 6.1.25
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16da5858280000
kernel config: https://syzkaller.appspot.com/x/.config?x=73f7ee8e484b74b7
dashboard link: https://syzkaller.appspot.com/bug?extid=01dac5a170e34de1cd4b
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/553994c02131/disk-f17b0ab6.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c88e4d2795a5/vmlinux-f17b0ab6.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d788d429a3a9/Image-f17b0ab6.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+01dac5...@syzkaller.appspotmail.com

INFO: task syz-executor.4:8158 blocked for more than 143 seconds.
Not tainted 6.1.25-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4 state:D stack:0 pid:8158 ppid:4368 flags:0x00000009
Call trace:
__switch_to+0x320/0x754 arch/arm64/kernel/process.c:553
context_switch kernel/sched/core.c:5241 [inline]
__schedule+0xee4/0x1c98 kernel/sched/core.c:6554
schedule+0xc4/0x170 kernel/sched/core.c:6630
schedule_timeout+0xb8/0x344 kernel/time/timer.c:1911
do_wait_for_common+0x30c/0x468 kernel/sched/completion.c:85
__wait_for_common kernel/sched/completion.c:106 [inline]
wait_for_common kernel/sched/completion.c:117 [inline]
wait_for_completion+0x48/0x60 kernel/sched/completion.c:138
__flush_workqueue+0x580/0x11c4 kernel/workqueue.c:2861
nbd_start_device_ioctl drivers/block/nbd.c:1419 [inline]
__nbd_ioctl drivers/block/nbd.c:1481 [inline]
nbd_ioctl+0x8dc/0xc40 drivers/block/nbd.c:1521
blkdev_ioctl+0x408/0xb40 block/ioctl.c:615
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+0x14c/0x1c8 fs/ioctl.c:856
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
#0: ffff800015754930 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:510
1 lock held by rcu_tasks_trace/13:
#0: ffff800015755130 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:510
1 lock held by khungtaskd/28:
#0: ffff800015754760 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:305
2 locks held by kworker/u5:0/47:
#0: ffff0000ccb66138 ((wq_completion)nbd4-recv){+.+.}-{0:0}, at: process_one_work+0x664/0x1404 kernel/workqueue.c:2262
#1: ffff80001c077c20 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x6a8/0x1404 kernel/workqueue.c:2264
2 locks held by getty/3990:
#0: ffff0000d3c5a098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340
#1: ffff80001ca202f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1210 drivers/tty/n_tty.c:2177
1 lock held by udevadm/12048:
2 locks held by syz-executor.3/12073:
2 locks held by syz-executor.5/12081:
3 locks held by syz-executor.1/12084:
1 lock held by syz-executor.2/12092:
#0: ffff0000cf7f2130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1721 [inline]
#0: ffff0000cf7f2130 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_setsockopt+0x518/0x128c net/packet/af_packet.c:3790
2 locks held by syz-executor.4/12095:

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



---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Jun 26, 2023, 12:50:48 AM6/26/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: e84a4e368abe Linux 6.1.35
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1335283b280000
kernel config: https://syzkaller.appspot.com/x/.config?x=a69b5c9de715622a
dashboard link: https://syzkaller.appspot.com/bug?extid=01dac5a170e34de1cd4b
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1227b40b280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1092c4c7280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3c7fedd1a86d/disk-e84a4e36.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8b34c6296ed7/vmlinux-e84a4e36.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a88164798cc2/bzImage-e84a4e36.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+01dac5...@syzkaller.appspotmail.com

INFO: task syz-executor158:3563 blocked for more than 143 seconds.
Not tainted 6.1.35-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor158 state:D stack:26184 pid:3563 ppid:3562 flags:0x00004004
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5241 [inline]
__schedule+0x132c/0x4330 kernel/sched/core.c:6554
schedule+0xbf/0x180 kernel/sched/core.c:6630
schedule_timeout+0xac/0x300 kernel/time/timer.c:1911
do_wait_for_common+0x441/0x5e0 kernel/sched/completion.c:85
__wait_for_common kernel/sched/completion.c:106 [inline]
wait_for_common kernel/sched/completion.c:117 [inline]
wait_for_completion+0x46/0x60 kernel/sched/completion.c:138
__flush_workqueue+0x737/0x1610 kernel/workqueue.c:2861
nbd_start_device_ioctl drivers/block/nbd.c:1425 [inline]
__nbd_ioctl drivers/block/nbd.c:1487 [inline]
nbd_ioctl+0xaf6/0xe70 drivers/block/nbd.c:1527
blkdev_ioctl+0x3a9/0x760 block/ioctl.c:615
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f105e767389
RSP: 002b:00007ffe3d311a48 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f105e767389
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007ffe3d311be8 R09: 00007ffe3d311be8
R10: 00007ffe3d311be8 R11: 0000000000000246 R12: 00007f105e7266a0
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
</TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
#0: ffffffff8cf27470 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
1 lock held by rcu_tasks_trace/13:
#0: ffffffff8cf27c70 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
1 lock held by khungtaskd/28:
#0: ffffffff8cf272a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by kworker/u5:0/47:
#0: ffff88801f953938 ((wq_completion)nbd0-recv){+.+.}-{0:0}, at: process_one_work+0x77a/0x11f0
#1: ffffc90000b87d20 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x7bd/0x11f0 kernel/workqueue.c:2264
2 locks held by getty/3303:
#0: ffff8880213cc098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
#1: ffffc900031332f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2177
2 locks held by kworker/u4:0/3566:
#0: ffff8880b9839dd8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:537
#1: ffff8880b9827788 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x43d/0x770 kernel/sched/psi.c:952

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.35-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
nmi_trigger_cpumask_backtrace+0x1b0/0x3f0 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+0xf18/0xf60 kernel/hung_task.c:377
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3566 Comm: kworker/u4:0 Not tainted 6.1.35-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:static_obj kernel/locking/lockdep.c:841 [inline]
RIP: 0010:lockdep_init_map_type+0x22e/0x8d0 kernel/locking/lockdep.c:4840
Code: 10 00 74 16 48 c7 c7 c0 e5 d5 8c e8 fc 71 76 00 48 ba 00 00 00 00 00 fc ff df 48 c7 c0 00 60 02 92 49 39 c7 0f 83 65 ff ff ff <4c> 39 3d 0b 38 6c 0b 0f 87 58 ff ff ff 4c 89 ff e8 8d 06 00 00 48
RSP: 0018:ffffc9000398f960 EFLAGS: 00000287
RAX: ffffffff92026000 RBX: ffffc9000398faaa RCX: ffffffff91a83103
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: ffffc9000398faa9
RBP: ffffc9000398fa28 R08: dffffc0000000000 R09: ffffc9000398fa90
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffc9000398fa88
R13: 0000000000000000 R14: 0000000000000000 R15: ffffffff91ac8400
FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000558729454600 CR3: 000000000cc8e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<TASK>
lockdep_init_map_waits include/linux/lockdep.h:191 [inline]
lockdep_init_map_wait include/linux/lockdep.h:198 [inline]
lockdep_init_map include/linux/lockdep.h:204 [inline]
do_init_timer kernel/time/timer.c:850 [inline]
init_timer_on_stack_key kernel/time/timer.c:806 [inline]
schedule_timeout+0x1a0/0x300 kernel/time/timer.c:1933
toggle_allocation_gate+0x23b/0x480 mm/kfence/core.c:811
process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
Jun 26, 2023, 2:58:59 AM6/26/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: f67653019430 Linux 5.15.118
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1061e4cb280000
kernel config: https://syzkaller.appspot.com/x/.config?x=c6daef03436a2bc5
dashboard link: https://syzkaller.appspot.com/bug?extid=df34fe61d8d75eab5996
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1513ad57280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17f399af280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/600ef9372d32/disk-f6765301.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/46dca37198b3/vmlinux-f6765301.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7ae4a35a0a6d/Image-f6765301.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+df34fe...@syzkaller.appspotmail.com

INFO: task syz-executor155:3984 blocked for more than 143 seconds.
Not tainted 5.15.118-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor155 state:D stack: 0 pid: 3984 ppid: 3983 flags:0x00000009
Call trace:
__switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
context_switch kernel/sched/core.c:5026 [inline]
__schedule+0xf10/0x1e38 kernel/sched/core.c:6372
schedule+0x11c/0x1c8 kernel/sched/core.c:6455
schedule_timeout+0xb8/0x344 kernel/time/timer.c:1860
do_wait_for_common+0x214/0x388 kernel/sched/completion.c:85
__wait_for_common kernel/sched/completion.c:106 [inline]
wait_for_common kernel/sched/completion.c:117 [inline]
wait_for_completion+0x4c/0x64 kernel/sched/completion.c:138
flush_workqueue+0x580/0x11c4 kernel/workqueue.c:2879
nbd_start_device_ioctl drivers/block/nbd.c:1365 [inline]
__nbd_ioctl drivers/block/nbd.c:1427 [inline]
nbd_ioctl+0x8c8/0xc2c drivers/block/nbd.c:1467
blkdev_ioctl+0x3d8/0xbd0 block/ioctl.c:601
block_ioctl+0xa8/0x114 block/fops.c:493
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Showing all locks held in the system:
1 lock held by khungtaskd/27:
#0: ffff800014ac19a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:268
2 locks held by kworker/u5:0/144:
#0: ffff0000cbac4138 ((wq_completion)nbd0-recv){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2280
#1: ffff80001a3b7c00 ((work_completion)(&args->work)){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2282
2 locks held by getty/3720:
#0: ffff0000d26ea098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x40/0x50 drivers/tty/tty_ldsem.c:340
#1: ffff80001a29b2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1200 drivers/tty/n_tty.c:2147

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



---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages