syzbot


INFO: task hung in lru_add_drain_all (2)

Status: auto-closed as invalid on 2022/02/09 00:46
Reported-by: syzbot+77088d8906a19fec9e84@syzkaller.appspotmail.com
First crash: 915d, last: 915d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in lru_add_drain_all mm C done inconclusive 22 1082d 1379d 0/26 auto-obsoleted due to no activity on 2023/04/26 14:41
linux-4.19 INFO: task hung in lru_add_drain_all 1 1164d 1164d 0/1 auto-closed as invalid on 2021/06/04 15:54

Sample crash report:
Bluetooth: hci1: command 0x0406 tx timeout
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
wlan1: No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)
INFO: task syz-executor.5:14210 blocked for more than 140 seconds.
      Not tainted 4.19.210-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.5  D27840 14210   8145 0x00000004
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
 lru_add_drain_all+0x374/0x4d0 mm/swap.c:699
 migrate_prep+0xa/0x10 mm/migrate.c:71
 do_mbind+0x21d/0xd60 mm/mempolicy.c:1254
 kernel_mbind mm/mempolicy.c:1409 [inline]
 __do_sys_mbind mm/mempolicy.c:1416 [inline]
 __se_sys_mbind mm/mempolicy.c:1412 [inline]
 __x64_sys_mbind+0x235/0x290 mm/mempolicy.c:1412
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f75a114b8d9
Code: Bad RIP value.
RSP: 002b:00007f759e6c2188 EFLAGS: 00000246 ORIG_RAX: 00000000000000ed
RAX: ffffffffffffffda RBX: 00007f75a124ff60 RCX: 00007f75a114b8d9
RDX: 0000000000000004 RSI: 0000000000800000 RDI: 0000000020001000
RBP: 00007f75a11a5cb4 R08: 0000000000000000 R09: 0000000000000002
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcc0173d5f R14: 00007f759e6c2300 R15: 0000000000022000
INFO: task syz-executor.5:14252 blocked for more than 140 seconds.
      Not tainted 4.19.210-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.5  D28472 14252   8145 0x00000004
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_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
 __mutex_lock_common kernel/locking/mutex.c:1016 [inline]
 __mutex_lock+0x5f0/0x1190 kernel/locking/mutex.c:1078
 lru_add_drain_all+0x5a/0x4d0 mm/swap.c:681
 migrate_prep+0xa/0x10 mm/migrate.c:71
 do_mbind+0x21d/0xd60 mm/mempolicy.c:1254
 kernel_mbind mm/mempolicy.c:1409 [inline]
 __do_sys_mbind mm/mempolicy.c:1416 [inline]
 __se_sys_mbind mm/mempolicy.c:1412 [inline]
 __x64_sys_mbind+0x235/0x290 mm/mempolicy.c:1412
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f75a114b8d9
Code: Bad RIP value.
RSP: 002b:00007f759e680188 EFLAGS: 00000246 ORIG_RAX: 00000000000000ed
RAX: ffffffffffffffda RBX: 00007f75a12500e0 RCX: 00007f75a114b8d9
RDX: 0000000000000004 RSI: 0000000000800000 RDI: 0000000020001000
RBP: 00007f75a11a5cb4 R08: 0000000000000000 R09: 0000000000000002
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcc0173d5f R14: 00007f759e680300 R15: 0000000000022000

Showing all locks held in the system:
1 lock held by khungtaskd/1570:
 #0: 000000004d1348c9 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by systemd-journal/4693:
1 lock held by in:imklog/7810:
 #0: 0000000082d38dde (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
2 locks held by rs:main Q:Reg/7811:
 #0: 00000000884c08fa (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
 #1: 000000000fe2e7da (sb_writers#3){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline]
 #1: 000000000fe2e7da (sb_writers#3){.+.+}, at: vfs_write+0x463/0x540 fs/read_write.c:548
2 locks held by syz-executor.1/14171:
1 lock held by syz-executor.5/14210:
 #0: 0000000049242af6 (lock#6){+.+.}, at: lru_add_drain_all+0x5a/0x4d0 mm/swap.c:681
1 lock held by syz-executor.5/14252:
 #0: 0000000049242af6 (lock#6){+.+.}, at: lru_add_drain_all+0x5a/0x4d0 mm/swap.c:681
1 lock held by syz-executor.3/14267:
 #0: 000000000fe2e7da (sb_writers#3){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline]
 #0: 000000000fe2e7da (sb_writers#3){.+.+}, at: do_sendfile+0x97d/0xc30 fs/read_write.c:1446
1 lock held by syz-executor.3/14275:
 #0: 000000000fe2e7da (sb_writers#3){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline]
 #0: 000000000fe2e7da (sb_writers#3){.+.+}, at: do_sendfile+0x97d/0xc30 fs/read_write.c:1446

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

NMI backtrace for cpu 1
CPU: 1 PID: 1570 Comm: khungtaskd Not tainted 4.19.210-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 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 14171 Comm: syz-executor.1 Not tainted 4.19.210-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__sanitizer_cov_trace_pc+0x22/0x50 kernel/kcov.c:101
Code: 90 90 90 90 90 90 90 90 48 8b 34 24 65 48 8b 04 25 c0 df 01 00 65 8b 15 cc 59 9f 7e 81 e2 00 01 1f 00 75 2b 8b 90 60 13 00 00 <83> fa 02 75 20 48 8b 88 68 13 00 00 8b 80 64 13 00 00 48 8b 11 48
RSP: 0000:ffff888046b77b90 EFLAGS: 00000046
RAX: ffff888042c8c2c0 RBX: 0000000000000000 RCX: ffffffff8167a97c
RDX: 0000000000000000 RSI: ffffffff8167a985 RDI: 0000000000000005
RBP: ffff8880a50d7dc8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000022f37574 R12: 0000000000000000
R13: ffffffff88195079 R14: 000000000000000a R15: 00007fcb21d6e7b0
FS:  00007fcb1f347700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fcb21d77931 CR3: 000000002248d000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 trace_hardirqs_on+0x45/0x210 kernel/trace/trace_preemptirq.c:26
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
 _raw_spin_unlock_irqrestore+0x79/0xe0 kernel/locking/spinlock.c:184
 spin_unlock_irqrestore include/linux/spinlock.h:384 [inline]
 force_sig_info+0x297/0x3b0 kernel/signal.c:1311
 force_sig_info_fault.constprop.0+0x1e6/0x320 arch/x86/mm/fault.c:226
 __bad_area_nosemaphore+0x2c1/0x400 arch/x86/mm/fault.c:910
 __bad_area arch/x86/mm/fault.c:944 [inline]
 bad_area_access_error+0x25c/0x4a0 arch/x86/mm/fault.c:983
 __do_page_fault+0xb09/0xd60 arch/x86/mm/fault.c:1392
 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1205
RIP: 0033:0x7fcb21d77272
Code: ff e8 32 33 01 00 85 c0 0f 84 ba 01 00 00 64 f0 83 2c 25 b8 ff ff ff 01 e8 3b d1 00 00 48 8b 0c 24 8b 00 48 8b 99 80 00 00 00 <89> 81 88 00 00 00 85 c0 75 06 48 83 fb ff 74 18 48 63 44 24 14 48
RSP: 002b:00007fcb1f3471a0 EFLAGS: 00010203
RAX: 0000000000000013 RBX: 00000002be5741c3 RCX: 00007fcb21d778a9
RDX: 00007fcb21d7724e RSI: 0000000000000001 RDI: 00007fcb1f3475f0
RBP: 00007fcb21e2acb4 R08: 00007fcb1f3471a0 R09: 00007fcb21e2acb4
R10: 0000000000000014 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe44b49c8f R14: 00007fcb1f347300 R15: 0000000000022000
----------------
Code disassembly (best guess):
   0:	90                   	nop
   1:	90                   	nop
   2:	90                   	nop
   3:	90                   	nop
   4:	90                   	nop
   5:	90                   	nop
   6:	90                   	nop
   7:	90                   	nop
   8:	48 8b 34 24          	mov    (%rsp),%rsi
   c:	65 48 8b 04 25 c0 df 	mov    %gs:0x1dfc0,%rax
  13:	01 00
  15:	65 8b 15 cc 59 9f 7e 	mov    %gs:0x7e9f59cc(%rip),%edx        # 0x7e9f59e8
  1c:	81 e2 00 01 1f 00    	and    $0x1f0100,%edx
  22:	75 2b                	jne    0x4f
  24:	8b 90 60 13 00 00    	mov    0x1360(%rax),%edx
* 2a:	83 fa 02             	cmp    $0x2,%edx <-- trapping instruction
  2d:	75 20                	jne    0x4f
  2f:	48 8b 88 68 13 00 00 	mov    0x1368(%rax),%rcx
  36:	8b 80 64 13 00 00    	mov    0x1364(%rax),%eax
  3c:	48 8b 11             	mov    (%rcx),%rdx
  3f:	48                   	rex.W

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/12 00:45 linux-4.19.y e34184f53363 838e7e2c .config console log report info ci2-linux-4-19 INFO: task hung in lru_add_drain_all
* Struck through repros no longer work on HEAD.