From: Abhigyan ghosh <zscript.team.zs@gmail.com>
To: jhladky@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Kernel panic in __migrate_swap_task() under stress-ng
Date: Thu, 19 Jun 2025 10:44:10 +0530 [thread overview]
Message-ID: <6FAF1A0D-540A-4E08-B358-3335BAD36BAC@gmail.com> (raw)
Hi Jirka,
Thanks again for the detailed logs and clarification.
Based on your trace and timing (often crashing around test 30+ out of 41, after long runtime), I suspect it could be a use-after-free or delayed wake-up race in the CPU stopper thread handling.
In particular, I noticed:
The RIP __migrate_swap_task+0x2f attempts to dereference +0x4c8 from a NULL task_struct pointer.
That offset is near task->se.cfs_rq or task->sched_info on some architectures — which makes me wonder if the task was already de-queued from its CPU’s rq during swap or sem cleanup.
Since stress-ng uses short timed sem/fork loops with varying threads, maybe the task was migrated mid-finalization?
As an experiment, I’ll try:
Looping stress-ng --sem --taskset 0-15
Watching perf top and tracing with ftrace on migrate_swap_stop and task_rq_lock
Let’s see if I can narrow it down further. If I get a hit, I’ll share the trace.
Thanks again —
Best regards,
Abhigyan Ghosh
zsml.zscript.org
aghosh
next reply other threads:[~2025-06-19 5:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 5:14 Abhigyan ghosh [this message]
2025-06-19 12:42 ` Jirka Hladky
[not found] ` <CAE4VaGDi3+aO8U5CoHGa2ichToyUbhkc+6NwAvCmwq5LS5Trew@mail.gmail.com>
2025-06-19 14:23 ` Abhigyan ghosh
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=6FAF1A0D-540A-4E08-B358-3335BAD36BAC@gmail.com \
--to=zscript.team.zs@gmail.com \
--cc=jhladky@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®