syzbot


INFO: task hung in hugetlb_wp

Status: upstream: reported on 2024/09/12 08:40
Reported-by: syzbot+4a456608540217ad018a@syzkaller.appspotmail.com
First crash: 70d, last: 70d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in hugetlb_wp mm C done 94 21h33m 96d 0/28 upstream: reported C repro on 2024/08/16 11:06

Sample crash report:
INFO: task syz.1.292:4724 blocked for more than 143 seconds.
      Not tainted 6.1.109-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.1.292       state:D stack:25000 pid:4724  ppid:3638   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x143f/0x4570 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6693
 __mutex_lock_common kernel/locking/mutex.c:679 [inline]
 __mutex_lock+0x6b9/0xd80 kernel/locking/mutex.c:747
 hugetlb_wp+0x11f0/0x3090 mm/hugetlb.c:5655
 hugetlb_fault+0x13a4/0x2c50 mm/hugetlb.c:6207
 handle_mm_fault+0x3218/0x5340 mm/memory.c:5273
 do_user_addr_fault arch/x86/mm/fault.c:1340 [inline]
 handle_page_fault arch/x86/mm/fault.c:1431 [inline]
 exc_page_fault+0x26f/0x620 arch/x86/mm/fault.c:1487
 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0033:0x7f614fd4597c
RSP: 002b:00007ffe9a8d5f68 EFLAGS: 00010246
RAX: 0000000020000d00 RBX: 0000000000000004 RCX: 8000000000000010
RDX: 0000000000000010 RSI: 00007f614f6005d5 RDI: 0000000020000d00
RBP: 00007f614ff37a80 R08: 00007f614fa00000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000009 R12: 000000000001b10f
R13: 00007ffe9a8d6070 R14: 0000000000000032 R15: fffffffffffffffe
 </TASK>
INFO: task syz.1.292:4725 blocked for more than 144 seconds.
      Not tainted 6.1.109-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.1.292       state:D stack:25680 pid:4725  ppid:3638   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x143f/0x4570 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6693
 __mutex_lock_common kernel/locking/mutex.c:679 [inline]
 __mutex_lock+0x6b9/0xd80 kernel/locking/mutex.c:747
 hugetlb_fault+0x63e/0x2c50 mm/hugetlb.c:6105
 handle_mm_fault+0x3218/0x5340 mm/memory.c:5273
 do_user_addr_fault arch/x86/mm/fault.c:1340 [inline]
 handle_page_fault arch/x86/mm/fault.c:1431 [inline]
 exc_page_fault+0x26f/0x620 arch/x86/mm/fault.c:1487
 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0010:copy_user_enhanced_fast_string+0xa/0x40 arch/x86/lib/copy_user_64.S:166
Code: ff c9 75 f2 89 d1 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 31 c0 0f 01 ca c3 8d 0c ca 89 ca eb 20 0f 01 cb 83 fa 40 72 38 89 d1 <f3> a4 31 c0 0f 01 ca c3 89 ca eb 0a 66 2e 0f 1f 84 00 00 00 00 00
RSP: 0018:ffffc90017df7a90 EFLAGS: 00050246
RAX: ffffffff84396801 RBX: 00007fffffffefc0 RCX: 0000000000000040
RDX: 0000000000000040 RSI: ffffc90017df7b20 RDI: 0000000020015fc0
RBP: ffffc90017df7bd0 R08: dffffc0000000000 R09: fffff52002fbef6c
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000040
R13: 0000000000015980 R14: 0000000020015fc0 R15: ffffc90017df7b20
 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline]
 _copy_to_user+0xe9/0x130 lib/usercopy.c:41
 copy_to_user include/linux/uaccess.h:169 [inline]
 rng_dev_read+0x39b/0x6b0 drivers/char/hw_random/core.c:267
 do_iter_read+0x500/0xc80 fs/read_write.c:798
 vfs_readv fs/read_write.c:916 [inline]
 do_preadv+0x20e/0x350 fs/read_write.c:1008
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f614fd7def9
RSP: 002b:00007f6150ad6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 00007f614ff35f80 RCX: 00007f614fd7def9
RDX: 0000000000000002 RSI: 0000000020000580 RDI: 0000000000000005
RBP: 00007f614fdf0b76 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f614ff35f80 R15: 00007ffe9a8d5e08
 </TASK>
INFO: task syz.1.292:4729 blocked for more than 145 seconds.
      Not tainted 6.1.109-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.1.292       state:D stack:23880 pid:4729  ppid:3638   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x143f/0x4570 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 io_schedule+0x88/0x100 kernel/sched/core.c:8786
 folio_wait_bit_common+0x878/0x1290 mm/filemap.c:1296
 __filemap_get_folio+0x47c/0xe80 mm/filemap.c:1931
 pagecache_get_page+0x28/0x250 mm/folio-compat.c:110
 find_lock_page include/linux/pagemap.h:621 [inline]
 hugetlb_fault+0x92f/0x2c50 mm/hugetlb.c:6162
 handle_mm_fault+0x3218/0x5340 mm/memory.c:5273
 do_user_addr_fault arch/x86/mm/fault.c:1340 [inline]
 handle_page_fault arch/x86/mm/fault.c:1431 [inline]
 exc_page_fault+0x26f/0x620 arch/x86/mm/fault.c:1487
 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0010:__put_user_nocheck_8+0x3/0x21
Code: 00 00 48 39 d9 73 34 0f 01 cb 89 01 31 c9 0f 01 ca c3 66 0f 1f 44 00 00 48 bb f9 ef ff ff ff 7f 00 00 48 39 d9 73 14 0f 01 cb <48> 89 01 31 c9 0f 01 ca c3 0f 1f 44 00 00 0f 01 ca b9 f2 ff ff ff
RSP: 0018:ffffc9001758f8b8 EFLAGS: 00050297
RAX: 0000000000800000 RBX: 00007fffffffeff9 RCX: 0000000020000020
RDX: 0000000000000000 RSI: ffffffff8b0c13e0 RDI: ffffffff8b5d69c0
RBP: ffffc9001758fee8 R08: dffffc0000000000 R09: fffffbfff1d33b6e
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92002eb1f7f
R13: ffff888075328f00 R14: 0000000020199000 R15: 0000000000800000
 userfaultfd_copy fs/userfaultfd.c:1762 [inline]
 userfaultfd_ioctl+0x216a/0x5990 fs/userfaultfd.c:2037
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f614fd7def9
RSP: 002b:00007f6150ab5038 EFLAGS: 00000246
 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f614ff36058 RCX: 00007f614fd7def9
RDX: 0000000020000000 RSI: 00000000c028aa03 RDI: 0000000000000009
RBP: 00007f614fdf0b76 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f614ff36058 R15: 00007ffe9a8d5e08
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d32b190 (
rcu_tasks.tasks_gp_mutex
){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:517
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8d32b990 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:517
1 lock held by khungtaskd/28:
 #0: 
ffffffff8d32afc0
 (
rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
2 locks held by getty/3395:
 #0: ffff88801ae7b098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2198
2 locks held by kworker/1:4/3680:
 #0: ffff888017c72138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc900044bfd20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
4 locks held by kworker/u4:11/4202:
 #0: ffff888017e1e938 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc9000bdbfd20 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffffffff8e4ecb90 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0xf1/0xb60 net/core/net_namespace.c:566
 #3: ffffffff8d3305b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:291 [inline]
 #3: ffffffff8d3305b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x4f0/0x930 kernel/rcu/tree_exp.h:962
2 locks held by syz.1.292/4724:
 #0: ffff888075329058
 (
&mm->mmap_lock
){++++}-{3:3}, at: mmap_read_lock_killable+0x1d/0x60 include/linux/mmap_lock.h:126
 #1: ffff888141ae2338 (&hugetlb_fault_mutex_table[i]){+.+.}-{3:3}, at: hugetlb_wp+0x11f0/0x3090 mm/hugetlb.c:5655
2 locks held by syz.1.292/4725:
 #0: 
ffff888075329058 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_lock_killable+0x1d/0x60 include/linux/mmap_lock.h:126
 #1: ffff888141ae2338 (&hugetlb_fault_mutex_table[i]){+.+.}-{3:3}, at: hugetlb_fault+0x63e/0x2c50 mm/hugetlb.c:6105
3 locks held by syz.1.292/4729:
 #0: ffff888075329058 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline]
 #0: ffff888075329058 (&mm->mmap_lock){++++}-{3:3}, at: get_mmap_lock_carefully mm/memory.c:5303 [inline]
 #0: ffff888075329058 (&mm->mmap_lock){++++}-{3:3}, at: lock_mm_and_find_vma+0x2e/0x2e0 mm/memory.c:5365
 #1: ffff888141ae2338 (&hugetlb_fault_mutex_table[i]){+.+.}-{3:3}, at: hugetlb_fault+0x63e/0x2c50 mm/hugetlb.c:6105
 #2: ffff88805b6e8ce8 (&resv_map->rw_sema){.+.+}-{3:3}, at: hugetlb_fault+0x6cd/0x2c50 mm/hugetlb.c:6116
1 lock held by syz.1.962/7051:
 #0: ffffffff8d330480
 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x48/0x5f0 kernel/rcu/tree.c:4019

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

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.109-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1ae/0x3f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
 watchdog+0xf88/0xfd0 kernel/hung_task.c:377
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 151 Comm: kworker/0:2 Not tainted 6.1.109-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Workqueue: events_power_efficient wg_ratelimiter_gc_entries
RIP: 0010:lock_acquire+0x208/0x5a0 kernel/locking/lockdep.c:5664
Code: 48 8b 4c 24 30 4c 8b 44 24 38 6a 00 6a 00 ff 75 10 ff 74 24 40 e8 e8 04 00 00 48 83 c4 20 48 c7 c7 e0 13 0c 8b e8 a8 40 3c 09 <b8> ff ff ff ff 65 0f c1 05 9b f4 97 7e 83 f8 01 0f 85 a4 01 00 00
RSP: 0018:ffffc90002d2fa80 EFLAGS: 00000082
RAX: 0000000000000000 RBX: ffffc90002d2fae0 RCX: ffffffff816b3c52
RDX: dffffc0000000000 RSI: ffffffff8b0c13e0 RDI: ffffffff8b5d69c0
RBP: ffffc90002d2fbe0 R08: dffffc0000000000 R09: fffffbfff223b660
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920005a5f58
R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000246
FS:  0000000000000000(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc8b7507ab8 CR3: 0000000073a4e000 CR4: 00000000003526f0
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
 _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:351 [inline]
 wg_ratelimiter_gc_entries+0x5c/0x470 drivers/net/wireguard/ratelimiter.c:63
 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/12 08:39 linux-6.1.y 5ca5b389fddf d94c83d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in hugetlb_wp
* Struck through repros no longer work on HEAD.