syzbot


INFO: task hung in blkdev_fallocate

Status: upstream: reported C repro on 2022/01/03 09:11
Reported-by: syzbot+39b75c02b8be0a061bfc@syzkaller.appspotmail.com
First crash: 249d, last: 4d10h

Cause bisection: failed (bisect log)

Fix bisection: failed (bisect log)
duplicates (1):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
INFO: task can't die in blkdev_common_ioctl 8 3d14h 93d 0/22 closed as dup on 2022/04/02 11:26

Sample crash report:
INFO: task syz-executor218:3614 blocked for more than 143 seconds.
      Not tainted 5.18.0-syzkaller-12234-g50fd82b3a9a9 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor218 state:D stack:25328 pid: 3614 ppid:  3611 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5116 [inline]
 __schedule+0x957/0xec0 kernel/sched/core.c:6431
 schedule+0xeb/0x1b0 kernel/sched/core.c:6503
 rwsem_down_write_slowpath+0xe21/0x1370 kernel/locking/rwsem.c:1172
 __down_write_common kernel/locking/rwsem.c:1287 [inline]
 __down_write kernel/locking/rwsem.c:1296 [inline]
 down_write+0x163/0x170 kernel/locking/rwsem.c:1543
 filemap_invalidate_lock include/linux/fs.h:786 [inline]
 blkdev_fallocate+0x21f/0x390 block/fops.c:637
 vfs_fallocate+0x515/0x670 fs/open.c:323
 ksys_fallocate fs/open.c:346 [inline]
 __do_sys_fallocate fs/open.c:354 [inline]
 __se_sys_fallocate fs/open.c:352 [inline]
 __x64_sys_fallocate+0xb9/0x100 fs/open.c:352
 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+0x46/0xb0
RIP: 0033:0x7fbb4a5dfe29
RSP: 002b:00007ffe703ac988 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007fbb4a5dfe29
RDX: 0000000000000000 RSI: 0000000000000011 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 7fffffffffffffff R11: 0000000000000246 R12: 00007fbb4a5a3600
R13: 0000000000000000 R14: 00007ffe703ac9b0 R15: 00007ffe703ac9a0
 </TASK>
INFO: task syz-executor218:3631 blocked for more than 143 seconds.
      Not tainted 5.18.0-syzkaller-12234-g50fd82b3a9a9 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor218 state:D stack:26872 pid: 3631 ppid:  3603 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5116 [inline]
 __schedule+0x957/0xec0 kernel/sched/core.c:6431
 schedule+0xeb/0x1b0 kernel/sched/core.c:6503
 rwsem_down_write_slowpath+0xe21/0x1370 kernel/locking/rwsem.c:1172
 __down_write_common kernel/locking/rwsem.c:1287 [inline]
 __down_write kernel/locking/rwsem.c:1296 [inline]
 down_write+0x163/0x170 kernel/locking/rwsem.c:1543
 filemap_invalidate_lock include/linux/fs.h:786 [inline]
 blkdev_fallocate+0x21f/0x390 block/fops.c:637
 vfs_fallocate+0x515/0x670 fs/open.c:323
 ksys_fallocate fs/open.c:346 [inline]
 __do_sys_fallocate fs/open.c:354 [inline]
 __se_sys_fallocate fs/open.c:352 [inline]
 __x64_sys_fallocate+0xb9/0x100 fs/open.c:352
 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+0x46/0xb0
RIP: 0033:0x7fbb4a5dfe29
RSP: 002b:00007ffe703ac988 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007fbb4a5dfe29
RDX: 0000000000000000 RSI: 0000000000000011 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 7fffffffffffffff R11: 0000000000000246 R12: 000000000000a3fd
R13: 00007ffe703ac99c R14: 00007ffe703ac9b0 R15: 00007ffe703ac9a0
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/29:
 #0: ffffffff8cb1eea0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3283:
 #0: ffff88807f0d8098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc90002cd62e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6ad/0x1c90 drivers/tty/n_tty.c:2075
1 lock held by syz-executor218/3613:
1 lock held by syz-executor218/3614:
 #0: ffff888140c9b4b8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:786 [inline]
 #0: ffff888140c9b4b8 (mapping.invalidate_lock#2){++++}-{3:3}, at: blkdev_fallocate+0x21f/0x390 block/fops.c:637
1 lock held by syz-executor218/3631:
 #0: ffff888140c9b4b8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:786 [inline]
 #0: ffff888140c9b4b8 (mapping.invalidate_lock#2){++++}-{3:3}, at: blkdev_fallocate+0x21f/0x390 block/fops.c:637
1 lock held by syz-executor218/3632:
 #0: ffff888140c9b4b8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:786 [inline]
 #0: ffff888140c9b4b8 (mapping.invalidate_lock#2){++++}-{3:3}, at: blkdev_fallocate+0x21f/0x390 block/fops.c:637
1 lock held by syz-executor218/3639:
 #0: ffff888140c9b4b8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:786 [inline]
 #0: ffff888140c9b4b8 (mapping.invalidate_lock#2){++++}-{3:3}, at: blkdev_fallocate+0x21f/0x390 block/fops.c:637
1 lock held by syz-executor218/3640:
 #0: ffff888140c9b4b8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:786 [inline]
 #0: ffff888140c9b4b8 (mapping.invalidate_lock#2){++++}-{3:3}, at: blkdev_fallocate+0x21f/0x390 block/fops.c:637

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

NMI backtrace for cpu 1
CPU: 1 PID: 29 Comm: khungtaskd Not tainted 5.18.0-syzkaller-12234-g50fd82b3a9a9 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x473/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x168/0x280 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
 watchdog+0xd18/0xd60 kernel/hung_task.c:378
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 2960 Comm: klogd Not tainted 5.18.0-syzkaller-12234-g50fd82b3a9a9 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:check_heap_object+0xdf/0x870 mm/usercopy.c:190
Code: a8 00 f0 ff ff 48 85 db 48 0f 45 e8 4c 89 e7 48 89 ee e8 14 eb a0 ff 49 39 ec 0f 87 fa 02 00 00 e8 c6 e8 a0 ff e9 c2 01 00 00 <e8> cc 31 56 ff 84 c0 0f 84 b0 01 00 00 89 5c 24 0c 48 bd 00 00 00
RSP: 0018:ffffc90002d1fa28 EFLAGS: 00000246
RAX: ffffe8ffffffff00 RBX: 0000000000000000 RCX: ffff88807dfb8000
RDX: 0000000000000000 RSI: 000000000000003a RDI: ffff888020323c00
RBP: 0000000000000000 R08: 0000000000000005 R09: ffffffff81e6a130
R10: 0000000000000003 R11: ffff88807dfb8000 R12: ffff888074fcca00
R13: ffff888020323c00 R14: ffff888020323c00 R15: 000000000000003a
FS:  00007fcec4738800(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fbb4a650130 CR3: 0000000025940000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __check_object_size+0xad/0x210 mm/usercopy.c:252
 check_object_size include/linux/thread_info.h:199 [inline]
 check_copy_size include/linux/thread_info.h:235 [inline]
 copy_from_iter include/linux/uio.h:168 [inline]
 skb_copy_datagram_from_iter+0xdf/0x6d0 net/core/datagram.c:556
 unix_dgram_sendmsg+0x97a/0x1fc0 net/unix/af_unix.c:1908
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg net/socket.c:734 [inline]
 __sys_sendto+0x439/0x5c0 net/socket.c:2119
 __do_sys_sendto net/socket.c:2131 [inline]
 __se_sys_sendto net/socket.c:2127 [inline]
 __x64_sys_sendto+0xda/0xf0 net/socket.c:2127
 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+0x46/0xb0
RIP: 0033:0x7fcec48d40ac
Code: 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 19 45 31 c9 45 31 c0 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 64 c3 0f 1f 00 55 48 83 ec 20 48 89 54 24 10
RSP: 002b:00007ffde8c6f138 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcec48d40ac
RDX: 000000000000003a RSI: 00005569ba999c80 RDI: 0000000000000003
RBP: 00005569ba995910 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000004000 R11: 0000000000000246 R12: 0000000000000014
R13: 0000000000000001 R14: 00007fcec4a4f77d R15: 00007ffde8c6f248
 </TASK>
----------------
Code disassembly (best guess):
   0:	a8 00                	test   $0x0,%al
   2:	f0 ff                	lock (bad)
   4:	ff 48 85             	decl   -0x7b(%rax)
   7:	db 48 0f             	fisttpl 0xf(%rax)
   a:	45 e8 4c 89 e7 48    	rex.RB callq 0x48e7895c
  10:	89 ee                	mov    %ebp,%esi
  12:	e8 14 eb a0 ff       	callq  0xffa0eb2b
  17:	49 39 ec             	cmp    %rbp,%r12
  1a:	0f 87 fa 02 00 00    	ja     0x31a
  20:	e8 c6 e8 a0 ff       	callq  0xffa0e8eb
  25:	e9 c2 01 00 00       	jmpq   0x1ec
* 2a:	e8 cc 31 56 ff       	callq  0xff5631fb <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	0f 84 b0 01 00 00    	je     0x1e7
  37:	89 5c 24 0c          	mov    %ebx,0xc(%rsp)
  3b:	48                   	rex.W
  3c:	bd                   	.byte 0xbd
  3d:	00 00                	add    %al,(%rax)

Crashes (31):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2022/06/03 09:16 upstream 50fd82b3a9a9 02dddea8 .config log report syz C INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-root 2022/04/19 06:14 upstream b2d229d4ddb1 8bcc32a6 .config log report syz C INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce 2021/12/30 08:55 upstream eec4df26e24e 6cc879d4 .config log report syz C INFO: task hung in blkdev_fallocate
ci-upstream-linux-next-kasan-gce-root 2022/05/28 17:39 linux-next d3fde8ff50ab a46af346 .config log report syz C INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-selinux-root 2022/06/30 13:15 upstream d9b2ba67917c 1434eec0 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-smack-root 2022/06/20 21:28 upstream 78ca55889a54 8d15e28d .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-smack-root 2022/06/14 13:31 upstream b13baccc3850 0f087040 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-root 2022/06/14 13:25 upstream b13baccc3850 0f087040 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-root 2022/04/29 13:00 upstream 38d741cb70b3 e9076525 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-root 2022/04/15 16:16 upstream 028192fea1de 8bcc32a6 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-smack-root 2022/04/12 15:29 upstream ce522ba9ef7e af01ee7d .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-selinux-root 2022/03/14 07:26 upstream f0e18b03fcaf 9e8eaa75 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-root 2022/03/08 10:49 upstream ea4424be1688 7bdd8b2c .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-root 2022/01/16 20:45 upstream d0a231f01e5b 723cfaf0 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-root 2022/01/01 18:47 upstream 800829388818 e1768e9c .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce 2021/12/30 07:16 upstream eec4df26e24e 6cc879d4 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-selinux-root 2021/12/19 05:25 upstream 3f667b5d4053 44068e19 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-selinux-root 2021/12/06 18:53 upstream 0fcfb00b28c0 579a8754 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-smack-root 2021/12/03 03:28 upstream a51e3ac43ddb 61f86278 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce 2021/12/03 02:09 upstream a51e3ac43ddb 61f86278 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce 2021/11/27 21:36 upstream 741392771338 63eeac02 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce 2021/11/26 23:32 upstream c5c17547b778 63eeac02 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-root 2021/11/25 02:40 upstream 5f53fa508db0 545ab074 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce 2021/11/14 23:34 upstream c8c109546a19 83f5c9b5 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-selinux-root 2021/11/12 15:23 upstream 5833291ab6de 75b04091 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-root 2021/11/11 08:16 upstream 881007522c8f 75b04091 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-root 2021/11/08 17:01 upstream 6b75d88fa81b d29682f1 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-root 2021/10/28 21:23 upstream 1fc596a56b33 be531bb4 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-386 2021/11/11 20:40 upstream debe436e77c7 75b04091 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-kasan-gce-386 2021/11/09 05:19 upstream e851dfae4371 8ab17e57 .config log report info INFO: task hung in blkdev_fallocate
ci-upstream-linux-next-kasan-gce-root 2021/11/30 06:01 linux-next f81e94e91878 d0830353 .config log report info INFO: task can't die in blkdev_fallocate