syzbot
INFO: task hung in lo_ioctl
Status:
fixed on 2019/03/06 07:43
Subsystems:
block
[Documentation on labels]
Reported-by: syzbot+abdba5bc6de135d7622f00756da97998425b6de5@syzkaller.appspotmail.com
Fix commit:
04906b2f542c
blockdev: Fix livelocks on loop device
First crash: 3161d, last: 3036d
Sample crash report:
buffer_io_error: 766 callbacks suppressed
Buffer I/O error on dev loop0, logical block 0, async page read
INFO: task syz-executor6:4522 blocked for more than 120 seconds.
Not tainted 4.16.0+ #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor6 D21192 4522 1 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2848 [inline]
__schedule+0x807/0x1e40 kernel/sched/core.c:3490
schedule+0xef/0x430 kernel/sched/core.c:3549
schedule_preempt_disabled+0x10/0x20 kernel/sched/core.c:3607
__mutex_lock_common kernel/locking/mutex.c:833 [inline]
__mutex_lock+0xe38/0x17f0 kernel/locking/mutex.c:893
mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
lo_ioctl+0x90/0x1e30 drivers/block/loop.c:1355
__blkdev_driver_ioctl block/ioctl.c:303 [inline]
blkdev_ioctl+0x9b6/0x2020 block/ioctl.c:601
block_ioctl+0xee/0x130 fs/block_dev.c:1875
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x1cf/0x1650 fs/ioctl.c:684
ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701
SYSC_ioctl fs/ioctl.c:708 [inline]
SyS_ioctl+0x24/0x30 fs/ioctl.c:706
do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x455147
RSP: 002b:00007ffeede1ed28 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000000000d0 RCX: 0000000000455147
RDX: 0000000000000000 RSI: 0000000000004c01 RDI: 0000000000000013
RBP: 0000000000000013 R08: 0000000000000000 R09: 000000000000000a
R10: 0000000000000075 R11: 0000000000000246 R12: 0000000000000013
R13: 0000000000000000 R14: 00000000006fe780 R15: 0000000000001380
Showing all locks held in the system:
2 locks held by khungtaskd/878:
#0: 000000004296613b (rcu_read_lock){....}, at: check_hung_uninterruptible_tasks kernel/hung_task.c:175 [inline]
#0: 000000004296613b (rcu_read_lock){....}, at: watchdog+0x1ff/0xf60 kernel/hung_task.c:249
#1: 0000000003d91ba8 (tasklist_lock){.+.+}, at: debug_show_all_locks+0xde/0x34a kernel/locking/lockdep.c:4470
1 lock held by rsyslogd/4351:
#0: 000000008aaf0349 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x1a9/0x1e0 fs/file.c:766
2 locks held by getty/4441:
#0: 00000000eae3a5d6 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 0000000046e80cd5 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4442:
#0: 0000000044765a01 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 00000000ae1b3658 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4443:
#0: 000000006d10de68 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 00000000225b0f13 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4444:
#0: 00000000c53b5f74 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 0000000087e64c54 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4445:
#0: 00000000095fa70f (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 00000000e305f634 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4446:
#0: 000000008f9419f1 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 00000000647ffeac (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
2 locks held by getty/4447:
#0: 0000000055a000ee (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
#1: 0000000058acb58e (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131
1 lock held by syz-executor6/4522:
#0: 00000000771a1456 (&lo->lo_ctl_mutex/1){+.+.}, at: lo_ioctl+0x90/0x1e30 drivers/block/loop.c:1355
1 lock held by syz-executor7/14157:
#0: 00000000771a1456 (&lo->lo_ctl_mutex/1){+.+.}, at: lo_ioctl+0x90/0x1e30 drivers/block/loop.c:1355
1 lock held by syz-executor7/14192:
#0: 00000000771a1456 (&lo->lo_ctl_mutex/1){+.+.}, at: lo_ioctl+0x90/0x1e30 drivers/block/loop.c:1355
=============================================
NMI backtrace for cpu 0
CPU: 0 PID: 878 Comm: khungtaskd Not tainted 4.16.0+ #1
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+0x1b9/0x29f lib/dump_stack.c:53
nmi_cpu_backtrace.cold.4+0x19/0xce lib/nmi_backtrace.c:103
nmi_trigger_cpumask_backtrace+0x151/0x192 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:138 [inline]
check_hung_task kernel/hung_task.c:132 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:190 [inline]
watchdog+0xc10/0xf60 kernel/hung_task.c:249
kthread+0x345/0x410 kernel/kthread.c:238
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:411
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at native_safe_halt+0x6/0x10 arch/x86/include/asm/irqflags.h:54
* Struck through repros no longer work on HEAD.