syzbot


INFO: task hung in blkdev_put

Status: auto-closed as invalid on 2020/01/12 01:56
Reported-by: syzbot+8fcb28f1e98b73e71986@syzkaller.appspotmail.com
First crash: 1835d, last: 1686d
Similar bugs (14)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in blkdev_put (3) fs 1 1460d 1460d 0/26 auto-closed as invalid on 2020/06/25 13:28
android-49 INFO: task hung in blkdev_put (2) 3 1623d 1643d 0/3 auto-closed as invalid on 2020/03/14 12:22
linux-4.19 INFO: task hung in blkdev_put C error 31 607d 1372d 0/1 upstream: reported C repro on 2020/07/23 21:33
upstream INFO: task hung in blkdev_put udf 320 1902d 2328d 0/26 closed as dup on 2018/11/11 08:29
linux-5.15 INFO: task hung in blkdev_put origin:upstream C error 4 32d 308d 0/3 upstream: reported C repro on 2023/06/23 01:15
linux-4.14 INFO: task hung in blkdev_put (3) C error 16 556d 1334d 0/1 upstream: reported C repro on 2020/08/30 21:52
upstream INFO: task hung in blkdev_put (4) block C done 486 44d 1300d 0/26 upstream: reported C repro on 2020/10/03 13:09
android-49 INFO: task hung in blkdev_put 220 1822d 1839d 0/3 auto-closed as invalid on 2019/10/25 08:47
linux-4.14 INFO: task hung in blkdev_put (2) 2 1489d 1527d 0/1 auto-closed as invalid on 2020/07/26 14:38
android-414 INFO: task hung in blkdev_put 119 1608d 1840d 0/1 auto-closed as invalid on 2020/03/30 04:06
android-44 INFO: task hung in blkdev_put 26 1908d 1839d 0/2 auto-closed as invalid on 2019/08/03 02:42
android-44 INFO: task hung in blkdev_put (2) 3 1619d 1696d 0/2 auto-closed as invalid on 2020/03/18 19:27
linux-6.1 INFO: task hung in blkdev_put origin:upstream C 89 3d15h 367d 0/3 upstream: reported C repro on 2023/04/25 09:01
upstream INFO: task hung in blkdev_put (2) fs 2 1615d 1661d 0/26 auto-closed as invalid on 2020/02/22 04:07

Sample crash report:
ntfs: (device loop5): parse_options(): NLS character set none not found.
SELinux: security_context_str_to_sid(staff_u) failed for (dev 9p, type 9p) errno=-22
INFO: task syz-executor.0:8766 blocked for more than 140 seconds.
      Not tainted 4.14.143 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.0  D27760  8766   6909 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2807 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3383
 schedule+0x92/0x1c0 kernel/sched/core.c:3427
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3485
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 blkdev_put+0x2b/0x510 fs/block_dev.c:1814
 blkdev_close+0x8b/0xb0 fs/block_dev.c:1863
 __fput+0x275/0x7a0 fs/file_table.c:210
 ____fput+0x16/0x20 fs/file_table.c:244
 task_work_run+0x114/0x190 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:191 [inline]
 exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:164
 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
 do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4135d1
RSP: 002b:00007ffcc964f6a0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00000000004135d1
RDX: 0000000000000000 RSI: 00000000000012e7 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000000063f112e8 R09: ffffffffffffffff
R10: 00007ffcc964f780 R11: 0000000000000293 R12: 000000000075c9a0
R13: 000000000075c9a0 R14: 0000000000760408 R15: ffffffffffffffff
INFO: task syz-executor.0:8774 blocked for more than 140 seconds.
      Not tainted 4.14.143 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.0  D28768  8774   6909 0x80000004
Call Trace:
 context_switch kernel/sched/core.c:2807 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3383
 schedule+0x92/0x1c0 kernel/sched/core.c:3427
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3485
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 lo_ioctl+0x8f/0x1ce0 drivers/block/loop.c:1404
 __blkdev_driver_ioctl block/ioctl.c:297 [inline]
 blkdev_ioctl+0x96b/0x1860 block/ioctl.c:594
 ioctl_by_bdev+0xa5/0x110 fs/block_dev.c:2066
 isofs_get_last_session fs/isofs/inode.c:571 [inline]
 isofs_fill_super+0x1cbf/0x25af fs/isofs/inode.c:670
 mount_bdev+0x2be/0x370 fs/super.c:1134
 isofs_mount+0x35/0x40 fs/isofs/inode.c:1570
 mount_fs+0x97/0x2a1 fs/super.c:1237
 vfs_kern_mount.part.0+0x5e/0x3d0 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2549 [inline]
 do_mount+0x417/0x27d0 fs/namespace.c:2879
 SYSC_mount fs/namespace.c:3095 [inline]
 SyS_mount+0xab/0x120 fs/namespace.c:3072
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45c33a
RSP: 002b:00007feb697f7a88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007feb697f7b40 RCX: 000000000045c33a
RDX: 00007feb697f7ae0 RSI: 0000000020000000 RDI: 00007feb697f7b00
RBP: 0000000000000001 R08: 00007feb697f7b40 R09: 00007feb697f7ae0
R10: 0000000000000001 R11: 0000000000000206 R12: 0000000000000003
R13: 00000000004c8a7a R14: 00000000004df9f0 R15: 00000000ffffffff
INFO: task syz-executor.1:8778 blocked for more than 140 seconds.
      Not tainted 4.14.143 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.1  D28528  8778   6907 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2807 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3383
 schedule+0x92/0x1c0 kernel/sched/core.c:3427
 __rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:292 [inline]
 rwsem_down_read_failed+0x1f6/0x390 kernel/locking/rwsem-xadd.c:309
 call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94
 __down_read arch/x86/include/asm/rwsem.h:66 [inline]
 down_read+0x49/0xb0 kernel/locking/rwsem.c:26
 __get_super.part.0+0x1cb/0x280 fs/super.c:678
 __get_super include/linux/spinlock.h:317 [inline]
 get_super+0x2e/0x50 fs/super.c:707
 fsync_bdev+0x19/0xd0 fs/block_dev.c:495
 invalidate_partition+0x36/0x60 block/genhd.c:1506
 drop_partitions block/partition-generic.c:442 [inline]
 rescan_partitions+0xe3/0x860 block/partition-generic.c:515
 __blkdev_reread_part+0x15c/0x1e0 block/ioctl.c:173
 blkdev_reread_part+0x27/0x40 block/ioctl.c:193
 loop_reread_partitions+0x7c/0x90 drivers/block/loop.c:614
 loop_set_status+0xc25/0x11f0 drivers/block/loop.c:1183
 loop_set_status_old+0x1f5/0x2d0 drivers/block/loop.c:1291
 lo_ioctl+0x9fe/0x1ce0 drivers/block/loop.c:1421
 __blkdev_driver_ioctl block/ioctl.c:297 [inline]
 blkdev_ioctl+0x96b/0x1860 block/ioctl.c:594
 block_ioctl+0xde/0x120 fs/block_dev.c:1881
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x7ae/0x1060 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4598e9
RSP: 002b:00007fbb28914c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004598e9
RDX: 00000000200000c0 RSI: 0000000000004c02 RDI: 0000000000000003
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbb289156d4
R13: 00000000004c30c2 R14: 00000000004d6858 R15: 00000000ffffffff
INFO: task syz-executor.1:8806 blocked for more than 140 seconds.
      Not tainted 4.14.143 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.1  D29184  8806   6907 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2807 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3383
 schedule+0x92/0x1c0 kernel/sched/core.c:3427
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3485
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 __blkdev_get+0x145/0x1120 fs/block_dev.c:1457
 blkdev_get+0xa8/0x8e0 fs/block_dev.c:1612
 blkdev_open+0x1d1/0x260 fs/block_dev.c:1770
 do_dentry_open+0x73b/0xeb0 fs/open.c:777
 vfs_open+0x105/0x220 fs/open.c:891
 do_last fs/namei.c:3425 [inline]
 path_openat+0x8bd/0x3f70 fs/namei.c:3566
 do_filp_open+0x18e/0x250 fs/namei.c:3600
 do_sys_open+0x2c5/0x430 fs/open.c:1084
 SYSC_open fs/open.c:1102 [inline]
 SyS_open+0x2d/0x40 fs/open.c:1097
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4137d1
RSP: 002b:00007fbb288f37a0 EFLAGS: 00000293 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 6666666666666667 RCX: 00000000004137d1
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00007fbb288f3850
RBP: 000000000075bfc8 R08: 000000000000000f R09: 0000000000000000
R10: 00007fbb288f49d0 R11: 0000000000000293 R12: 00007fbb288f46d4
R13: 00000000004c8cff R14: 00000000004dfcd8 R15: 00000000ffffffff
INFO: task blkid:8781 blocked for more than 140 seconds.
      Not tainted 4.14.143 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
blkid           D28720  8781   6869 0x00000004
Call Trace:
 context_switch kernel/sched/core.c:2807 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3383
 schedule+0x92/0x1c0 kernel/sched/core.c:3427
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3485
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 __blkdev_get+0x145/0x1120 fs/block_dev.c:1457
 blkdev_get+0xa8/0x8e0 fs/block_dev.c:1612
 blkdev_open+0x1d1/0x260 fs/block_dev.c:1770
 do_dentry_open+0x73b/0xeb0 fs/open.c:777
 vfs_open+0x105/0x220 fs/open.c:891
 do_last fs/namei.c:3425 [inline]
 path_openat+0x8bd/0x3f70 fs/namei.c:3566
 do_filp_open+0x18e/0x250 fs/namei.c:3600
 do_sys_open+0x2c5/0x430 fs/open.c:1084
 SYSC_open fs/open.c:1102 [inline]
 SyS_open+0x2d/0x40 fs/open.c:1097
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x7fea7afa2120
RSP: 002b:00007ffc47ab3fa8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fea7afa2120
RDX: 00007ffc47ab5f41 RSI: 0000000000000000 RDI: 00007ffc47ab5f41
RBP: 0000000000000000 R08: 0000000000000078 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000001f42030
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000005

Showing all locks held in the system:
1 lock held by khungtaskd/1013:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffff81486408>] debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4541
1 lock held by rsyslogd/6740:
 #0:  (&f->f_pos_lock){+.+.}, at: [<ffffffff81943dfb>] __fdget_pos+0xab/0xd0 fs/file.c:769
2 locks held by getty/6861:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c08c3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f1e6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6862:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c08c3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f1e6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6863:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c08c3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f1e6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6864:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c08c3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f1e6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6865:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c08c3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f1e6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6866:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c08c3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f1e6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6867:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c08c3>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f1e6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
1 lock held by syz-executor.0/8766:
 #0:  (&bdev->bd_mutex){+.+.}, at: [<ffffffff819a89bb>] blkdev_put+0x2b/0x510 fs/block_dev.c:1814
2 locks held by syz-executor.0/8774:
 #0:  (&type->s_umount_key#65/1){+.+.}, at: [<ffffffff818e0f61>] alloc_super fs/super.c:251 [inline]
 #0:  (&type->s_umount_key#65/1){+.+.}, at: [<ffffffff818e0f61>] sget_userns+0x551/0xc30 fs/super.c:516
 #1:  (&lo->lo_ctl_mutex/1){+.+.}, at: [<ffffffff837397ff>] lo_ioctl+0x8f/0x1ce0 drivers/block/loop.c:1404
3 locks held by syz-executor.1/8778:
 #0:  (&lo->lo_ctl_mutex/1){+.+.}, at: [<ffffffff837397ff>] lo_ioctl+0x8f/0x1ce0 drivers/block/loop.c:1404
 #1:  (&bdev->bd_mutex){+.+.}, at: [<ffffffff82cadbef>] blkdev_reread_part+0x1f/0x40 block/ioctl.c:192
 #2:  (&type->s_umount_key#70){.+.+}, at: [<ffffffff818e037b>] __get_super.part.0+0x1cb/0x280 fs/super.c:678
1 lock held by syz-executor.1/8806:
 #0:  (&bdev->bd_mutex){+.+.}, at: [<ffffffff819a79b5>] __blkdev_get+0x145/0x1120 fs/block_dev.c:1457
1 lock held by blkid/8781:
 #0:  (&bdev->bd_mutex){+.+.}, at: [<ffffffff819a79b5>] __blkdev_get+0x145/0x1120 fs/block_dev.c:1457

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

NMI backtrace for cpu 0
CPU: 0 PID: 1013 Comm: khungtaskd Not tainted 4.14.143 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x138/0x197 lib/dump_stack.c:53
 nmi_cpu_backtrace.cold+0x57/0x94 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x141/0x189 lib/nmi_backtrace.c:62
 arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
 trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline]
 watchdog+0x5e7/0xb90 kernel/hung_task.c:274
 kthread+0x319/0x430 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 5 Comm: kworker/u4:0 Not tainted 4.14.143 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880a9cc2140 task.stack: ffff8880a9cd0000
RIP: 0010:task_css include/linux/cgroup.h:481 [inline]
RIP: 0010:task_ca kernel/sched/cpuacct.c:54 [inline]
RIP: 0010:cpuacct_charge+0xe7/0x360 kernel/sched/cpuacct.c:360
RSP: 0018:ffff8880a9cd7bf8 EFLAGS: 00000046
RAX: dffffc0000000000 RBX: ffff8880a9cc2140 RCX: 1ffffffff0ea63a9
RDX: 1ffff11015398641 RSI: ffffffff869d2e40 RDI: ffff8880a9cc3208
RBP: ffff8880a9cd7c28 R08: 0000000000000000 R09: ffff8880a9cc2a08
R10: ffff8880a9cc29e8 R11: ffff8880a9cc2140 R12: ffffffff877ad280
R13: 0000000000005434 R14: ffff8880a9cc2210 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000130 CR3: 000000008c630000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 update_curr+0x2d9/0x6a0 kernel/sched/fair.c:856
 dequeue_entity+0x1e/0xfd0 kernel/sched/fair.c:3805
 dequeue_task_fair+0x60/0x4a0 kernel/sched/fair.c:5007
 dequeue_task kernel/sched/core.c:773 [inline]
 deactivate_task+0xd3/0x340 kernel/sched/core.c:789
 __schedule+0x2c4/0x1cd0 kernel/sched/core.c:3332
 schedule+0x92/0x1c0 kernel/sched/core.c:3427
 worker_thread+0x15e/0x1050 kernel/workqueue.c:2269
 kthread+0x319/0x430 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Code: 00 00 48 8d bb c8 10 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 57 02 00 00 4c 8b a3 c8 10 00 00 <e8> 24 00 06 00 85 c0 74 0d 80 3d d1 69 da 06 00 0f 84 65 01 00 

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/09/14 01:55 linux-4.14.y e2cd24b62938 32d59357 .config console log report ci2-linux-4-14
2019/04/17 18:19 linux-4.14.y 58b454ebf81e b0e8efcb .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.