syzbot


INFO: task hung in cgroup_can_fork

Status: upstream: reported on 2024/10/05 02:23
Reported-by: syzbot+6280d81c2b2d852afbd3@syzkaller.appspotmail.com
First crash: 59d, last: 59d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in cgroup_can_fork 1 41d 41d 0/3 upstream: reported on 2024/10/22 16:24
upstream INFO: task hung in cgroup_can_fork cgroups C error error 6 1056d 1076d 0/28 auto-obsoleted due to no activity on 2023/09/02 21:24

Sample crash report:
INFO: task kworker/u4:0:9 blocked for more than 143 seconds.
      Not tainted 5.15.167-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:0    state:D stack:20160 pid:    9 ppid:     2 flags:0x00004000
Workqueue: events_unbound call_usermodehelper_exec_work
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 percpu_rwsem_wait+0x3e1/0x470 kernel/locking/percpu-rwsem.c:160
 __percpu_down_read+0xd0/0x100 kernel/locking/percpu-rwsem.c:174
 percpu_down_read include/linux/percpu-rwsem.h:65 [inline]
 cgroup_threadgroup_change_begin include/linux/cgroup-defs.h:723 [inline]
 cgroup_css_set_fork kernel/cgroup/cgroup.c:6197 [inline]
 cgroup_can_fork+0xc56/0xd60 kernel/cgroup/cgroup.c:6311
 copy_process+0x2210/0x3ef0 kernel/fork.c:2307
 kernel_clone+0x210/0x960 kernel/fork.c:2604
 kernel_thread+0x168/0x1e0 kernel/fork.c:2656
 call_usermodehelper_exec_sync kernel/umh.c:135 [inline]
 call_usermodehelper_exec_work+0x93/0x220 kernel/umh.c:166
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
INFO: task jbd2/sda1-8:2990 blocked for more than 143 seconds.
      Not tainted 5.15.167-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:jbd2/sda1-8     state:D stack:24952 pid: 2990 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 io_schedule+0x88/0x100 kernel/sched/core.c:8481
 bit_wait_io+0xe/0xc0 kernel/sched/wait_bit.c:209
 __wait_on_bit+0xb9/0x180 kernel/sched/wait_bit.c:49
 out_of_line_wait_on_bit+0x1d0/0x250 kernel/sched/wait_bit.c:64
 wait_on_buffer include/linux/buffer_head.h:390 [inline]
 journal_wait_on_commit_record fs/jbd2/commit.c:175 [inline]
 jbd2_journal_commit_transaction+0x3ddf/0x6820 fs/jbd2/commit.c:921
 kjournald2+0x4ae/0x940 fs/jbd2/journal.c:213
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
INFO: task kworker/u4:10:3693 blocked for more than 144 seconds.
      Not tainted 5.15.167-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:10   state:D stack:21856 pid: 3693 ppid:     2 flags:0x00004000
Workqueue: events_unbound call_usermodehelper_exec_work
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 percpu_rwsem_wait+0x3e1/0x470 kernel/locking/percpu-rwsem.c:160
 __percpu_down_read+0xd0/0x100 kernel/locking/percpu-rwsem.c:174
 percpu_down_read include/linux/percpu-rwsem.h:65 [inline]
 cgroup_threadgroup_change_begin include/linux/cgroup-defs.h:723 [inline]
 cgroup_css_set_fork kernel/cgroup/cgroup.c:6197 [inline]
 cgroup_can_fork+0xc56/0xd60 kernel/cgroup/cgroup.c:6311
 copy_process+0x2210/0x3ef0 kernel/fork.c:2307
 kernel_clone+0x210/0x960 kernel/fork.c:2604
 kernel_thread+0x168/0x1e0 kernel/fork.c:2656
 call_usermodehelper_exec_sync kernel/umh.c:135 [inline]
 call_usermodehelper_exec_work+0x93/0x220 kernel/umh.c:166
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

Showing all locks held in the system:
3 locks held by kworker/u4:0/9:
 #0: ffff888017079138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90000ce7d20 ((work_completion)(&sub_info->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8c945790 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: copy_process+0x2210/0x3ef0 kernel/fork.c:2307
1 lock held by khungtaskd/27:
 #0: ffffffff8c91fc60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
1 lock held by dhcpcd/3239:
 #0: ffffffff8c945790 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: copy_process+0x2210/0x3ef0 kernel/fork.c:2307
2 locks held by getty/3326:
 #0: ffff88802a0f2098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc9000208e2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
3 locks held by kworker/u4:6/3661:
 #0: ffff8880b903a318 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475
 #1: ffffffff8c91fc60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311
 #2: ffff8880b9028098 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x120/0x260 kernel/time/timer.c:946
3 locks held by kworker/u4:7/3681:
 #0: ffff888017079138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90003eb7d20 ((work_completion)(&sub_info->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8c945790 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: copy_process+0x2210/0x3ef0 kernel/fork.c:2307
3 locks held by kworker/u4:10/3693:
 #0: ffff888017079138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90003f37d20 ((work_completion)(&sub_info->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8c945790 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: copy_process+0x2210/0x3ef0 kernel/fork.c:2307
3 locks held by kworker/u4:12/3712:
 #0: ffff888017079138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc9000117fd20 ((work_completion)(&sub_info->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8c945790 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: copy_process+0x2210/0x3ef0 kernel/fork.c:2307
2 locks held by syz-executor/6915:
1 lock held by syz.4.637/7078:
2 locks held by syz.3.639/7082:
1 lock held by syz-executor/7087:
 #0: ffffffff8c945790 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: do_exit+0x285/0x2480 kernel/exit.c:830
6 locks held by syz-executor/7088:
1 lock held by udevd/7141:
 #0: ffffffff8c945790 (cgroup_threadgroup_rwsem){++++}-{0:0}, at: do_exit+0x285/0x2480 kernel/exit.c:830

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.167-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 7082 Comm: syz.3.639 Not tainted 5.15.167-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:lockdep_enabled kernel/locking/lockdep.c:91 [inline]
RIP: 0010:lock_acquire+0x134/0x4f0 kernel/locking/lockdep.c:5599
Code: 65 8b 05 9f ca 9f 7e 85 c0 0f 85 88 01 00 00 65 48 8b 1d 4f c1 9f 7e 48 81 c3 ec 0a 00 00 48 89 d8 48 c1 e8 03 42 0f b6 04 28 <84> c0 0f 85 c4 02 00 00 83 3b 00 0f 85 5c 01 00 00 4c 8d bc 24 80
RSP: 0018:ffffc90000dd0c40 EFLAGS: 00000803
RAX: 0000000000000000 RBX: ffff88807903a8ac RCX: ffffffff8162ae1c
RDX: 0000000000000000 RSI: ffffffff8ad904a0 RDI: ffffffff8ad90460
RBP: ffffc90000dd0d88 R08: dffffc0000000000 R09: fffffbfff1bd2c16
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920001ba190
R13: dffffc0000000000 R14: 0000000000000000 R15: 1ffff920001ba1b4
FS:  00007fcd5511d6c0(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002006b000 CR3: 000000007679a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 seqcount_lockdep_reader_access+0xf8/0x220 include/linux/seqlock.h:103
 ktime_get_update_offsets_now+0x38/0x420 kernel/time/timekeeping.c:2300
 hrtimer_update_base kernel/time/hrtimer.c:631 [inline]
 hrtimer_interrupt+0x12f/0x980 kernel/time/hrtimer.c:1796
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1085 [inline]
 __sysvec_apic_timer_interrupt+0x139/0x470 arch/x86/kernel/apic/apic.c:1102
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1096
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:202
Code: 51 67 f6 ff 90 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 4e ed 24 f7 48 89 df e8 26 41 26 f7 e8 f1 f4 48 f7 fb bf 01 00 00 00 <e8> 06 87 19 f7 65 8b 05 87 89 c4 75 85 c0 74 02 5b c3 e8 54 a6 c2
RSP: 0018:ffffc90002e57bc0 EFLAGS: 00000282
RAX: 6621859608345700 RBX: ffff88801a7b3780 RCX: ffffffff96868f03
RDX: dffffc0000000000 RSI: ffffffff8a8b2b00 RDI: 0000000000000001
RBP: 0000000000000000 R08: ffffffff8186db50 R09: ffffed10034f66f1
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000021
R13: dffffc0000000000 R14: ffff88801a7b3c18 R15: ffff88801a7b3780
 spin_unlock_irq include/linux/spinlock.h:413 [inline]
 get_signal+0x13ee/0x14e0 kernel/signal.c:2900
 arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:867
 handle_signal_work kernel/entry/common.c:154 [inline]
 exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:178
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fcd56ca4ff7
Code: ff ff 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 a8 ff ff ff f7 d8 64 89
RSP: 002b:00007fcd5511d038 EFLAGS: 00000246
RAX: 0000000000000049 RBX: 00007fcd56e5cf80 RCX: 00007fcd56ca4ff9
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000008
RBP: 00007fcd56d17296 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fcd56e5cf80 R15: 00007fff6f094688
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/05 02:22 linux-5.15.y 3a5928702e71 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in cgroup_can_fork
* Struck through repros no longer work on HEAD.