syzbot


INFO: task hung in drain_all_pages (2)

Status: auto-closed as invalid on 2022/02/03 14:38
Reported-by: syzbot+2955624dd194c311d803@syzkaller.appspotmail.com
First crash: 379d, last: 309d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 INFO: task hung in drain_all_pages (2) 2 829d 835d 0/1 auto-closed as invalid on 2020/09/01 16:02
linux-4.19 INFO: task hung in drain_all_pages C done 1 903d 934d 1/1 fixed on 2020/03/21 06:12
linux-4.14 INFO: task hung in drain_all_pages C done 1 898d 898d 1/1 fixed on 2020/03/26 13:10

Sample crash report:
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
INFO: task khugepaged:1577 blocked for more than 140 seconds.
      Not tainted 4.19.208-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
khugepaged      D26976  1577      2 0x80000000
Call Trace:
 context_switch kernel/sched/core.c:2828 [inline]
 __schedule+0x887/0x2040 kernel/sched/core.c:3517
 schedule+0x8d/0x1b0 kernel/sched/core.c:3561
 schedule_timeout+0x92d/0xfe0 kernel/time/timer.c:1794
 do_wait_for_common kernel/sched/completion.c:83 [inline]
 __wait_for_common kernel/sched/completion.c:104 [inline]
 wait_for_common+0x29c/0x470 kernel/sched/completion.c:115
 __flush_work+0x4bb/0x8b0 kernel/workqueue.c:2926
 drain_all_pages+0x39b/0x570 mm/page_alloc.c:2699
 __alloc_pages_direct_reclaim mm/page_alloc.c:3835 [inline]
 __alloc_pages_slowpath mm/page_alloc.c:4211 [inline]
 __alloc_pages_nodemask+0xde0/0x2890 mm/page_alloc.c:4419
 __alloc_pages include/linux/gfp.h:496 [inline]
 __alloc_pages_node include/linux/gfp.h:509 [inline]
 khugepaged_alloc_page+0x8a/0x180 mm/khugepaged.c:776
 collapse_huge_page mm/khugepaged.c:978 [inline]
 khugepaged_scan_pmd mm/khugepaged.c:1231 [inline]
 khugepaged_scan_mm_slot mm/khugepaged.c:1773 [inline]
 khugepaged_do_scan mm/khugepaged.c:1854 [inline]
 khugepaged+0x2b3f/0x4930 mm/khugepaged.c:1899
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Showing all locks held in the system:
2 locks held by kworker/u4:1/23:
1 lock held by khungtaskd/1570:
 #0: 0000000061cc6fe6 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by khugepaged/1577:
 #0: 00000000e8628d1f (pcpu_drain_mutex){+.+.}, at: drain_all_pages+0x4a/0x570 mm/page_alloc.c:2656
1 lock held by in:imklog/7798:
 #0: 000000007efbb4f2 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
3 locks held by kworker/1:1/23209:
5 locks held by syz-executor.2/25164:
1 lock held by syz-executor.0/25167:

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

NMI backtrace for cpu 0
CPU: 0 PID: 1570 Comm: khungtaskd Not tainted 4.19.208-syzkaller #0
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+0x1fc/0x2ef lib/dump_stack.c:118
 nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x1a6/0x1f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
 watchdog+0x991/0xe60 kernel/hung_task.c:287
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 25164 Comm: syz-executor.2 Not tainted 4.19.208-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:native_apic_mem_write+0x8/0x10 arch/x86/include/asm/apic.h:109
Code: 3d cc 17 3d 0b 01 7f 02 5d c3 89 ef 5d e9 65 e2 c9 06 48 c7 c7 00 97 65 8c e8 34 df 6f 00 eb df 66 90 89 ff 89 b7 00 c0 5f ff <c3> 0f 1f 80 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 53 89 fb 48
RSP: 0000:ffff8880ba107e98 EFLAGS: 00000046
RAX: dffffc0000000000 RBX: ffffffff89cfb1a0 RCX: 0000000000000020
RDX: 1ffffffff139f636 RSI: 00000000000001b8 RDI: 0000000000000380
RBP: ffff8880ba11e2c0 R08: ffffffff8c665058 R09: 0000000000000000
R10: 0000000000000007 R11: ffffffff8c66505b R12: 00000000000001b8
R13: 0000000000000000 R14: ffff8880ba124cc0 R15: ffff8880ba124d30
FS:  00007f72091df700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020a00000 CR3: 0000000235a6c000 CR4: 00000000003426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 apic_write arch/x86/include/asm/apic.h:389 [inline]
 lapic_next_event+0x4d/0x80 arch/x86/kernel/apic/apic.c:460
 clockevents_program_event+0x234/0x350 kernel/time/clockevents.c:344
 tick_program_event+0xac/0x140 kernel/time/tick-oneshot.c:48
 hrtimer_interrupt+0x40a/0x9e0 kernel/time/hrtimer.c:1598
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1071 [inline]
 smp_apic_timer_interrupt+0x10c/0x550 arch/x86/kernel/apic/apic.c:1096
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894
 </IRQ>
RIP: 0010:atomic_notifier_call_chain+0x2/0x30 kernel/notifier.c:192
Code: 74 b6 22 00 48 c7 c2 20 80 69 88 be 74 02 00 00 48 c7 c7 80 80 69 88 c6 05 07 bb ce 09 01 e8 59 4b b3 06 e9 fb fe ff ff 41 55 <49> 89 d5 41 54 49 89 f4 55 48 89 fd e8 3d b6 22 00 4c 89 ea 4c 89
RSP: 0000:ffff888236acf910 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: 0000000000040000 RBX: 0000000000000000 RCX: ffffc9000a04a000
RDX: ffff888236acfa28 RSI: 0000000000000005 RDI: ffffffff8a51a660
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000ffff
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000605
R13: ffff8880b28208c0 R14: dffffc0000000000 R15: 0000000000000000
 do_con_write+0x48c/0x1d90 drivers/tty/vt/vt.c:2698
 con_write+0x22/0xb0 drivers/tty/vt/vt.c:3146
 process_output_block drivers/tty/n_tty.c:593 [inline]
 n_tty_write+0x3c0/0xff0 drivers/tty/n_tty.c:2331
 do_tty_write drivers/tty/tty_io.c:960 [inline]
 tty_write+0x496/0x810 drivers/tty/tty_io.c:1044
 __vfs_write+0xf7/0x770 fs/read_write.c:485
 vfs_write+0x1f3/0x540 fs/read_write.c:549
 ksys_write+0x12b/0x2a0 fs/read_write.c:599
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f720bc688d9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f72091df188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f720bd6cf60 RCX: 00007f720bc688d9
RDX: 00000000ffffff61 RSI: 0000000020000400 RDI: 0000000000000005
RBP: 00007f720bcc2cb4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc5201453f R14: 00007f72091df300 R15: 0000000000022000
----------------
Code disassembly (best guess):
   0:	3d cc 17 3d 0b       	cmp    $0xb3d17cc,%eax
   5:	01 7f 02             	add    %edi,0x2(%rdi)
   8:	5d                   	pop    %rbp
   9:	c3                   	retq
   a:	89 ef                	mov    %ebp,%edi
   c:	5d                   	pop    %rbp
   d:	e9 65 e2 c9 06       	jmpq   0x6c9e277
  12:	48 c7 c7 00 97 65 8c 	mov    $0xffffffff8c659700,%rdi
  19:	e8 34 df 6f 00       	callq  0x6fdf52
  1e:	eb df                	jmp    0xffffffff
  20:	66 90                	xchg   %ax,%ax
  22:	89 ff                	mov    %edi,%edi
  24:	89 b7 00 c0 5f ff    	mov    %esi,-0xa04000(%rdi)
* 2a:	c3                   	retq <-- trapping instruction
  2b:	0f 1f 80 00 00 00 00 	nopl   0x0(%rax)
  32:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  39:	fc ff df
  3c:	53                   	push   %rbx
  3d:	89 fb                	mov    %edi,%ebx
  3f:	48                   	rex.W

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-19 2021/10/06 14:37 linux-4.19.y c2276d585654 0a63fd36 .config log report info INFO: task hung in drain_all_pages
ci2-linux-4-19 2021/07/28 03:42 linux-4.19.y 4938296e03bd 17d6ab15 .config log report info INFO: task hung in drain_all_pages