From: Fernand Sieber <sieberf@amazon.com>
To: kernel test robot <oliver.sang@intel.com>
Cc: <oe-lkp@lists.linux.dev>, <lkp@intel.com>,
<linux-kernel@vger.kernel.org>, <x86@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
<aubrey.li@linux.intel.com>, <yu.c.chen@intel.com>
Subject: Re: [tip:sched/core] [sched/fair] 79104becf4: BUG:kernel_NULL_pointer_dereference,address
Date: Tue, 4 Nov 2025 23:04:55 +0200 [thread overview]
Message-ID: <20251104210456.652800-1-sieberf@amazon.com> (raw)
In-Reply-To: <202510211205.1e0f5223-lkp@intel.com>
Hi Peter,
I spent some time today investigating this report. The crash happens when
a proxy task yields.
Since it probably doesn't make sense that a task blocking the best pick
yields, a simple workaround is to ignore the yield in this case:
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8993,6 +8993,11 @@ static void yield_task_fair(struct rq *rq)
if (unlikely(rq->nr_running == 1))
return;
+ /* Don't yield if we're running a proxy task */
+ if (rq->donor && rq->donor != curr) {
+ return;
+ }
+
However, more generally, I am not sure that the logic in update_min_vruntime()
is sound when we are running a proxy task, which I suspect is the ultimate
root cause of the problem. It seems to assume that cfs_rq->curr is the
running task, which is not the case.
In my troubleshooting I have seen inconsistent calculations with underflows
of cfs_rq->avg_vruntime and avg_vruntime(cfs_rq) being lower than
min_vruntime. I'll see if I can invest more time diving into this, in the
meantime do you have any thoughts?
Thanks,
--Fernand
Amazon Development Centre (South Africa) (Proprietary) Limited
29 Gogosoa Street, Observatory, Cape Town, Western Cape, 7925, South Africa
Registration Number: 2004 / 034463 / 07
next prev parent reply other threads:[~2025-11-04 21:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 5:14 [tip:sched/core] [sched/fair] 79104becf4: BUG:kernel_NULL_pointer_dereference,address kernel test robot
2025-10-21 6:39 ` Chen, Yu C
2025-10-21 11:04 ` Peter Zijlstra
2025-10-27 12:54 ` Peter Zijlstra
2025-10-27 13:14 ` Chen, Yu C
2025-10-27 13:55 ` Peter Zijlstra
2025-10-27 14:07 ` Peter Zijlstra
2025-10-27 14:09 ` Peter Zijlstra
2025-10-28 2:30 ` Chen, Yu C
2025-11-05 11:00 ` Peter Zijlstra
2025-11-05 12:06 ` Philip Li
2025-11-07 10:16 ` Philip Li
2025-11-07 10:53 ` Peter Zijlstra
2025-11-04 21:04 ` Fernand Sieber [this message]
2025-11-05 8:43 ` Fernand Sieber
2025-11-05 11:03 ` Peter Zijlstra
2025-11-05 12:28 ` Peter Zijlstra
2025-11-06 10:54 ` Fernand Sieber
2025-11-06 23:57 ` John Stultz
2025-11-07 8:18 ` Fernand Sieber
-- strict thread matches above, loose matches on Subject: below --
2025-11-06 10:40 [PATCH] sched: Proxy yields to donor tasks Fernand Sieber
2025-11-06 10:57 ` Peter Zijlstra
2025-11-07 6:54 ` kernel test robot
2025-11-07 8:12 ` Fernand Sieber
2025-11-07 8:25 ` Peter Zijlstra
2025-11-11 11:37 ` [tip: sched/core] sched/proxy: Yield the donor task tip-bot2 for Fernand Sieber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251104210456.652800-1-sieberf@amazon.com \
--to=sieberf@amazon.com \
--cc=aubrey.li@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-lkp@lists.linux.dev \
--cc=oliver.sang@intel.com \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox