syzbot


INFO: task hung in __ia32_sys_io_uring_enter

Status: fixed on 2019/06/23 12:03
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+96642d282922abc6ef90@syzkaller.appspotmail.com
Fix commit: b19062a56726 io_uring: fix possible deadlock between io_uring_{enter,register}
First crash: 2003d, last: 2001d
Discussions (1)
Title Replies (including bot) Last reply
INFO: task hung in __ia32_sys_io_uring_enter 0 (1) 2019/04/14 11:28

Sample crash report:
INFO: task syz-executor.0:12143 blocked for more than 143 seconds.
      Not tainted 5.1.0-rc5 #68
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.0  D29912 12143   7858 0x20020004
Call Trace:
 context_switch kernel/sched/core.c:2877 [inline]
 __schedule+0x813/0x1cc0 kernel/sched/core.c:3518
 schedule+0x92/0x180 kernel/sched/core.c:3562
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3620
 __mutex_lock_common kernel/locking/mutex.c:1002 [inline]
 __mutex_lock+0x726/0x1310 kernel/locking/mutex.c:1072
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087
 __do_sys_io_uring_enter fs/io_uring.c:2678 [inline]
 __se_sys_io_uring_enter fs/io_uring.c:2637 [inline]
 __ia32_sys_io_uring_enter+0x67f/0xac0 fs/io_uring.c:2637
 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline]
 do_fast_syscall_32+0x281/0xc98 arch/x86/entry/common.c:397
 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139
RIP: 0023:0xf7f2f869
Code: Bad RIP value.
RSP: 002b:00000000f5d2b0cc EFLAGS: 00000296 ORIG_RAX: 00000000000001aa
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000005280
RDX: 0000000000000101 RSI: 0000000000000002 RDI: 0000000020000000
RBP: 00000000ffffff96 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
INFO: task syz-executor.0:12148 blocked for more than 143 seconds.
      Not tainted 5.1.0-rc5 #68
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.0  D30320 12148   7858 0x20020004
Call Trace:
 context_switch kernel/sched/core.c:2877 [inline]
 __schedule+0x813/0x1cc0 kernel/sched/core.c:3518
 schedule+0x92/0x180 kernel/sched/core.c:3562
 schedule_timeout+0x8ca/0xfd0 kernel/time/timer.c:1779
 do_wait_for_common kernel/sched/completion.c:83 [inline]
 __wait_for_common kernel/sched/completion.c:104 [inline]
 wait_for_common kernel/sched/completion.c:115 [inline]
 wait_for_completion+0x29c/0x440 kernel/sched/completion.c:136
 __io_uring_register+0xb6/0x1fd0 fs/io_uring.c:2929
 __do_sys_io_uring_register fs/io_uring.c:2979 [inline]
 __se_sys_io_uring_register fs/io_uring.c:2961 [inline]
 __ia32_sys_io_uring_register+0x193/0x1f0 fs/io_uring.c:2961
 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline]
 do_fast_syscall_32+0x281/0xc98 arch/x86/entry/common.c:397
 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139
RIP: 0023:0xf7f2f869
Code: Bad RIP value.
RSP: 002b:00000000f5d0a0cc EFLAGS: 00000296 ORIG_RAX: 00000000000001ab
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000000000
RDX: 0000000020001440 RSI: 0000000000000004 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Showing all locks held in the system:
1 lock held by khungtaskd/1042:
 #0: 00000000d5f79c7c (rcu_read_lock){....}, at: debug_show_all_locks+0x5f/0x27e kernel/locking/lockdep.c:5056
2 locks held by getty/7820:
 #0: 000000004bdec3d8 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
 #1: 00000000946b84c4 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/7821:
 #0: 000000008e3326c8 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
 #1: 00000000f0e4c0eb (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/7822:
 #0: 0000000080040184 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
 #1: 000000009f4a980a (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/7823:
 #0: 00000000d3916385 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
 #1: 000000002183ac73 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/7824:
 #0: 00000000fb853faf (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
 #1: 00000000288a5c70 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/7825:
 #0: 00000000263b87f4 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
 #1: 000000000494ef69 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
2 locks held by getty/7826:
 #0: 000000005967cef5 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341
 #1: 0000000016484777 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x232/0x1b70 drivers/tty/n_tty.c:2156
1 lock held by syz-executor.0/12143:
 #0: 00000000ca0d8f0e (&ctx->uring_lock){+.+.}, at: __do_sys_io_uring_enter fs/io_uring.c:2678 [inline]
 #0: 00000000ca0d8f0e (&ctx->uring_lock){+.+.}, at: __se_sys_io_uring_enter fs/io_uring.c:2637 [inline]
 #0: 00000000ca0d8f0e (&ctx->uring_lock){+.+.}, at: __ia32_sys_io_uring_enter+0x67f/0xac0 fs/io_uring.c:2637
1 lock held by syz-executor.0/12148:
 #0: 00000000ca0d8f0e (&ctx->uring_lock){+.+.}, at: __do_sys_io_uring_register fs/io_uring.c:2978 [inline]
 #0: 00000000ca0d8f0e (&ctx->uring_lock){+.+.}, at: __se_sys_io_uring_register fs/io_uring.c:2961 [inline]
 #0: 00000000ca0d8f0e (&ctx->uring_lock){+.+.}, at: __ia32_sys_io_uring_register+0x182/0x1f0 fs/io_uring.c:2961

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

NMI backtrace for cpu 1
CPU: 1 PID: 1042 Comm: khungtaskd Not tainted 5.1.0-rc5 #68
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+0x172/0x1f0 lib/dump_stack.c:113
 nmi_cpu_backtrace.cold+0x63/0xa4 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1be/0x236 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:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:204 [inline]
 watchdog+0x9b7/0xec0 kernel/hung_task.c:288
 kthread+0x357/0x430 kernel/kthread.c:253
 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352
Sending NMI from CPU 1 to CPUs 0:

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/04/15 14:20 upstream dc4060a5dc25 505ab413 .config console log report ci-upstream-kasan-gce-386
2019/04/13 09:29 upstream 8ee15f324866 c402d8f1 .config console log report ci-upstream-kasan-gce-386
* Struck through repros no longer work on HEAD.