Re: INFO: task hung in wait_on_page_bit_common

From: Dmitry Vyukov
Date: Tue Dec 12 2017 - 11:52:45 EST


On Wed, Dec 6, 2017 at 1:41 PM, syzbot
<bot+ef061880e2ff14267d6cbd3720791ee739c73540@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
> Hello,
>
> syzkaller hit the following crash on
> 328b4ed93b69a6f2083d52f31a240a09e5de386a
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached
> Raw console output is attached.
>
> Unfortunately, I don't have any reproducer for this bug yet.
>
>
> INFO: task syz-executor7:31107 blocked for more than 120 seconds.
> Not tainted 4.15.0-rc2+ #209
> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> syz-executor7 D19408 31107 3309 0x00000004
> Call Trace:
> context_switch kernel/sched/core.c:2799 [inline]
> __schedule+0x8eb/0x2060 kernel/sched/core.c:3375
> schedule+0xf5/0x430 kernel/sched/core.c:3434
> io_schedule+0x1c/0x70 kernel/sched/core.c:5042
> wait_on_page_bit_common+0x4b3/0x770 mm/filemap.c:1100
> wait_on_page_bit mm/filemap.c:1133 [inline]
> wait_on_page_locked include/linux/pagemap.h:530 [inline]
> __lock_page_or_retry+0x3fd/0x500 mm/filemap.c:1311
> lock_page_or_retry include/linux/pagemap.h:510 [inline]
> filemap_fault+0xcdc/0x1c20 mm/filemap.c:2533
> __do_fault+0xeb/0x319 mm/memory.c:3196
> do_read_fault mm/memory.c:3606 [inline]
> do_fault mm/memory.c:3706 [inline]
> handle_pte_fault mm/memory.c:3936 [inline]
> __handle_mm_fault+0x1e9e/0x3e20 mm/memory.c:4060
> handle_mm_fault+0x334/0x8d0 mm/memory.c:4097
> faultin_page mm/gup.c:502 [inline]
> __get_user_pages+0x50c/0x15f0 mm/gup.c:699
> populate_vma_page_range+0x20e/0x2f0 mm/gup.c:1216
> __mm_populate+0x23a/0x450 mm/gup.c:1266
> mm_populate include/linux/mm.h:2226 [inline]
> vm_mmap_pgoff+0x241/0x280 mm/util.c:338
> SYSC_mmap_pgoff mm/mmap.c:1533 [inline]
> SyS_mmap_pgoff+0x462/0x5f0 mm/mmap.c:1491
> SYSC_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
> SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:91
> entry_SYSCALL_64_fastpath+0x1f/0x96
> RIP: 0033:0x452a39
> RSP: 002b:00007fbdad43ac58 EFLAGS: 00000212 ORIG_RAX: 0000000000000009
> RAX: ffffffffffffffda RBX: 00007fbdad43b700 RCX: 0000000000452a39
> RDX: 0000000000000003 RSI: 0000000000001000 RDI: 0000000020e5b000
> RBP: 0000000000000000 R08: 0000000000000015 R09: 0000000000000000
> R10: 0000000000002011 R11: 0000000000000212 R12: 0000000000000000
> R13: 0000000000a6f7ff R14: 00007fbdad43b9c0 R15: 0000000000000000
>
> Showing all locks held in the system:
> 2 locks held by khungtaskd/674:
> #0: (rcu_read_lock){....}, at: [<00000000319a6af1>]
> check_hung_uninterruptible_tasks kernel/hung_task.c:175 [inline]
> #0: (rcu_read_lock){....}, at: [<00000000319a6af1>] watchdog+0x1c5/0xd60
> kernel/hung_task.c:249
> #1: (tasklist_lock){.?.?}, at: [<00000000a9e72599>]
> debug_show_all_locks+0xd3/0x400 kernel/locking/lockdep.c:4554
> 2 locks held by login/3056:
> #0: (&tty->ldisc_sem){++++}, at: [<00000000824f8dbe>]
> ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
> #1: (&tty->atomic_write_lock){+.+.}, at: [<00000000a7570bad>]
> tty_write_lock+0x21/0x60 drivers/tty/tty_io.c:875
> 2 locks held by getty/3057:
> #0: (&tty->ldisc_sem){++++}, at: [<00000000824f8dbe>]
> ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
> #1: (&ldata->atomic_read_lock){+.+.}, at: [<000000005dd73ff5>]
> n_tty_read+0x2f2/0x1a10 drivers/tty/n_tty.c:2131
> 2 locks held by getty/3058:
> #0: (&tty->ldisc_sem){++++}, at: [<00000000824f8dbe>]
> ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
> #1: (&ldata->atomic_read_lock){+.+.}, at: [<000000005dd73ff5>]
> n_tty_read+0x2f2/0x1a10 drivers/tty/n_tty.c:2131
> 2 locks held by getty/3059:
> #0: (&tty->ldisc_sem){++++}, at: [<00000000824f8dbe>]
> ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
> #1: (&ldata->atomic_read_lock){+.+.}, at: [<000000005dd73ff5>]
> n_tty_read+0x2f2/0x1a10 drivers/tty/n_tty.c:2131
> 2 locks held by getty/3060:
> #0: (&tty->ldisc_sem){++++}, at: [<00000000824f8dbe>]
> ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
> #1: (&ldata->atomic_read_lock){+.+.}, at: [<000000005dd73ff5>]
> n_tty_read+0x2f2/0x1a10 drivers/tty/n_tty.c:2131
> 2 locks held by getty/3061:
> #0: (&tty->ldisc_sem){++++}, at: [<00000000824f8dbe>]
> ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
> #1: (&ldata->atomic_read_lock){+.+.}, at: [<000000005dd73ff5>]
> n_tty_read+0x2f2/0x1a10 drivers/tty/n_tty.c:2131
> 2 locks held by getty/3062:
> #0: (&tty->ldisc_sem){++++}, at: [<00000000824f8dbe>]
> ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365
> #1: (&ldata->atomic_read_lock){+.+.}, at: [<000000005dd73ff5>]
> n_tty_read+0x2f2/0x1a10 drivers/tty/n_tty.c:2131
>
> =============================================
>
> NMI backtrace for cpu 0
> CPU: 0 PID: 674 Comm: khungtaskd Not tainted 4.15.0-rc2+ #209
> 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+0x194/0x257 lib/dump_stack.c:53
> nmi_cpu_backtrace+0x1d2/0x210 lib/nmi_backtrace.c:103
> nmi_trigger_cpumask_backtrace+0x122/0x180 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+0x90c/0xd60 kernel/hung_task.c:249
> kthread+0x37a/0x440 kernel/kthread.c:238
> ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:441
> 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


+loop maintainers

#syz dup: INFO: task hung in lo_ioctl


> ---
> This bug is generated by a dumb bot. It may contain errors.
> See https://goo.gl/tpsmEJ for details.
> Direct all questions to syzkaller@xxxxxxxxxxxxxxxxx
> Please credit me with: Reported-by: syzbot <syzkaller@xxxxxxxxxxxxxxxx>
>
> syzbot will keep track of this bug report.
> Once a fix for this bug is committed, please reply to this email with:
> #syz fix: exact-commit-title
> To mark this as a duplicate of another syzbot report, please reply with:
> #syz dup: exact-subject-of-another-report
> If it's a one-off invalid bug report, please reply with:
> #syz invalid
> Note: if the crash happens again, it will cause creation of a new bug
> report.
> Note: all commands must start from beginning of the line in the email body.
>
> --
> You received this message because you are subscribed to the Google Groups
> "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to syzkaller-bugs+unsubscribe@xxxxxxxxxxxxxxxxx
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/syzkaller-bugs/001a113ece8c935efd055fab4367%40google.com.
> For more options, visit https://groups.google.com/d/optout.