Re: CPU Lockups in KVM with deferred hrtimer rearming

Verma, Vishal L
2026-04-20T22:24:44Z

On Tue, 2026-04-21 at 00:19 +0200, Thomas Gleixner wrote:
> On Mon, Apr 20 2026 at 20:57, Verma, Vishal L wrote:
> > On Mon, 2026-04-20 at 17:00 +0200, Thomas Gleixner wrote:
> > >
> > > This code should never be reached with a rearm pending. Something else
> > > went wrong earlier. So while the patch "works" it papers over the
> > > underlying problem.
> > >
> > > Can you please do the following:
> > >
> > >     1) Apply the patch below
> > >
> > >     2) Enable function tracing and the hrtimer* trace events
> > >
> > >     3) Enable tracing if it has been disabled already
> > >
> > >        echo 1 >/sys/kernel/tracing/tracing_on
> > >
> > >     4) Run the tests and wait for /sys/kernel/tracing/tracing_on to
> > >        become 0, which means the problem triggered.
> > >
> > >     5) Retrieve the trace from /sys/kernel/tracing/trace and provide it
> > >        somewhere to download from or send it to me compressed offlist.
> >
> > Hi Thomas,
> >
> > I've uploaded the trace here (~75MB compressed):
> > https://drive.proton.me/urls/B9PY61XQ0C#07XwTVhE46eB
> >
> > As for:
> >
> > 1f5ffc672165 ("Fix mismerge of the arm64 / timer-core interrupt handling changes")
> >
> > I already had that commit in the branch that was tested and it didn't
> > fix it.
>
> Thanks for the update. Can you try to provide the information I asked
> for above?
>
Ah sorry - I should've said that with your patch applied, tracing_on
did become 0, so the problem was triggered.

The trace from that is in the URL above.

This is how I collected it:

tracefs=/sys/kernel/tracing
echo 4096 > "$tracefs"/buffer_size_kb
echo function > "$tracefs"/current_tracer
echo 1 > "$tracefs"/events/hrtimer/enable
echo 1 > "$tracefs"/tracing_on

<run the test>

tracing_on="$(cat "$tracefs"/tracing_on)"
if [ "$tracing_on" -eq 0 ]; then
echo "Debug patch triggered, collecting trace"
cat "$tracefs"/trace | gzip > /tmp/hrtimer_rearm_trace.gz
else
echo "Debug patch did not trigger (tracing_on still 1)"
fi