Re: [BUG] sched/fair: divide error in __calc_prop_weight() from the enqueue path (flat-hierarchy series)
From: Jake Steinman
Date: Mon Aug 24 2026 - 23:38:45 EST
Another report of this, same divide but reached from the idle path rather
than fork. https://github.com/CachyOS/linux-cachyos/issues/985
Oops: divide error: 0000 [#1] SMP NOPTI
CPU: 7 UID: 0 PID: 0 Comm: swapper/7 Tainted: G C 7.2.0-1-cachyos #1
RIP: 0010:enqueue_task_fair+0x87c/0x2150
Call Trace:
<TASK>
sched_ttwu_pending+0x204/0x590
flush_smp_call_function_queue+0x169/0x250
? cpuidle_enter_state+0xc2/0x230
cpu_startup_entry+0x2f6/0x3d0
start_secondary+0x9a/0xa0
common_startup_64+0x13e/0x150
</TASK>
Kernel panic - not syncing: Attempted to kill the idle task!
An idle CPU takes a wakeup IPI and faults enqueuing the woken task. In
swapper there is nothing to kill, so it panics immediately instead of
oopsing first.
Symbolised against linux-cachyos-dbg it lands where mine did:
__calc_prop_weight fair.c:4728:10
inlined at enqueue_hierarchy fair.c:7891:12
inlined at enqueue_task_fair fair.c:7949:11
Still nothing on what empties the cpuset. Their machine looks like mine —
concur mode, no empty effective masks, no partitions.
They have offered to run the tg_cpus() floor or a debug build with
WARN_ON_ONCE(!cfs_rq->load.weight). They reproduce more readily than I do,
so that is probably the machine to instrument.
Thanks,
Jake