syzbot


INFO: task hung in unlink_file_vma

Status: closed as invalid on 2022/02/07 19:19
Subsystems: kasan mm
[Documentation on labels]
First crash: 1037d, last: 980d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 INFO: task hung in unlink_file_vma 1 2031d 1925d 0/3 auto-closed as invalid on 2019/06/26 19:37
android-414 INFO: task hung in unlink_file_vma 14 1691d 1926d 0/1 auto-closed as invalid on 2020/04/01 21:27

Sample crash report:
INFO: task syz-executor.4:23504 blocked for more than 143 seconds.
      Not tainted 5.15.0-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.4  state:D stack:27968 pid:23504 ppid:  7248 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4969 [inline]
 __schedule+0xa9a/0x4940 kernel/sched/core.c:6250
 schedule+0xd2/0x260 kernel/sched/core.c:6323
 rwsem_down_write_slowpath+0x761/0x1130 kernel/locking/rwsem.c:1117
 __down_write_common kernel/locking/rwsem.c:1272 [inline]
 __down_write_common kernel/locking/rwsem.c:1269 [inline]
 __down_write kernel/locking/rwsem.c:1281 [inline]
 down_write+0x135/0x150 kernel/locking/rwsem.c:1528
 i_mmap_lock_write include/linux/fs.h:498 [inline]
 unlink_file_vma+0x7d/0x110 mm/mmap.c:169
 free_pgtables+0x1b3/0x2f0 mm/memory.c:427
 exit_mmap+0x1df/0x630 mm/mmap.c:3171
 __mmput+0x122/0x4b0 kernel/fork.c:1113
 mmput+0x56/0x60 kernel/fork.c:1134
 exit_mm kernel/exit.c:507 [inline]
 do_exit+0xb27/0x2b40 kernel/exit.c:819
 do_group_exit+0x125/0x310 kernel/exit.c:929
 get_signal+0x47d/0x2220 kernel/signal.c:2830
 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
 exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fa781144ae9
RSP: 002b:00007fa77e678218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: 0000000000000000 RBX: 00007fa7812580e8 RCX: 00007fa781144ae9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fa7812580e8
RBP: 00007fa7812580e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa7812580ec
R13: 00007fa78178bb2f R14: 00007fa77e678300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
3 locks held by kworker/u4:1/10:
1 lock held by khungtaskd/27:
 #0: ffffffff8b983a20 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6458
1 lock held by systemd-journal/2967:
1 lock held by in:imklog/6220:
1 lock held by syz-executor.1/6555:
 #0: ffff888145bddcf8 (&mapping->i_mmap_rwsem){++++}-{3:3}, at: i_mmap_lock_write include/linux/fs.h:498 [inline]
 #0: ffff888145bddcf8 (&mapping->i_mmap_rwsem){++++}-{3:3}, at: unlink_file_vma+0x7d/0x110 mm/mmap.c:169
1 lock held by syz-executor.4/6558:
 #0: ffff888145bddcf8 (&mapping->i_mmap_rwsem){++++}-{3:3}, at: i_mmap_lock_write include/linux/fs.h:498 [inline]
 #0: ffff888145bddcf8 (&mapping->i_mmap_rwsem){++++}-{3:3}, at: unlink_file_vma+0x7d/0x110 mm/mmap.c:169
1 lock held by syz-executor.4/23504:
 #0: ffff888145bddcf8 (&mapping->i_mmap_rwsem){++++}-{3:3}, at: i_mmap_lock_write include/linux/fs.h:498 [inline]
 #0: ffff888145bddcf8 (&mapping->i_mmap_rwsem){++++}-{3:3}, at: unlink_file_vma+0x7d/0x110 mm/mmap.c:169
3 locks held by syz-executor.1/23543:

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:105
 nmi_trigger_cpumask_backtrace+0x1ae/0x220 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xc1d/0xf50 kernel/hung_task.c:295
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 10 Comm: kworker/u4:1 Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:list_add include/linux/list.h:88 [inline]
RIP: 0010:__add_wait_queue include/linux/wait.h:181 [inline]
RIP: 0010:prepare_to_wait_event+0x2e2/0x690 kernel/sched/wait.c:321
Code: d6 48 8d 68 e8 49 39 c0 74 20 48 89 c2 48 89 e8 48 c1 e8 03 0f b6 04 08 84 c0 74 08 3c 03 0f 8e e5 01 00 00 f6 45 00 20 75 bb <48> b8 00 00 00 00 00 fc ff df 48 89 f2 48 c1 ea 03 80 3c 02 00 0f
RSP: 0018:ffffc90000cf7c00 EFLAGS: 00000046
RAX: dffffc0000000000 RBX: 0000000000000402 RCX: dffffc0000000000
RDX: ffffffff8bacd240 RSI: ffffffff8bacd240 RDI: ffffc90000cf7b70
RBP: ffffffff8bacd228 R08: ffffffff8bacd240 R09: 0000000000000003
R10: fffff5200019ef6e R11: 0000000000000000 R12: ffffc90000cf7c88
R13: ffffffff8bacd200 R14: 0000000000000286 R15: ffffc90000cf7ca0
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f10d5270000 CR3: 000000000b68e000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
 <TASK>
 toggle_allocation_gate mm/kfence/core.c:739 [inline]
 toggle_allocation_gate+0x321/0x390 mm/kfence/core.c:724
 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2298
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	48 8d 68 e8          	lea    -0x18(%rax),%rbp
   4:	49 39 c0             	cmp    %rax,%r8
   7:	74 20                	je     0x29
   9:	48 89 c2             	mov    %rax,%rdx
   c:	48 89 e8             	mov    %rbp,%rax
   f:	48 c1 e8 03          	shr    $0x3,%rax
  13:	0f b6 04 08          	movzbl (%rax,%rcx,1),%eax
  17:	84 c0                	test   %al,%al
  19:	74 08                	je     0x23
  1b:	3c 03                	cmp    $0x3,%al
  1d:	0f 8e e5 01 00 00    	jle    0x208
  23:	f6 45 00 20          	testb  $0x20,0x0(%rbp)
  27:	75 bb                	jne    0xffffffe4
* 29:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax <-- trapping instruction
  30:	fc ff df
  33:	48 89 f2             	mov    %rsi,%rdx
  36:	48 c1 ea 03          	shr    $0x3,%rdx
  3a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
  3e:	0f                   	.byte 0xf

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/13 17:05 upstream 66f4beaa6c1d 83f5c9b5 .config console log report info ci-upstream-kasan-gce INFO: task hung in unlink_file_vma
2021/10/31 03:17 upstream 119c85055d86 098b5d53 .config console log report info ci-upstream-kasan-gce-selinux-root INFO: task hung in unlink_file_vma
2021/09/17 14:38 upstream bdb575f87217 5b989942 .config console log report info ci-upstream-kasan-gce INFO: task hung in unlink_file_vma
* Struck through repros no longer work on HEAD.