* bpf selftests timer_lockup intermittently locks up kernel
@ 2025-08-24 18:26 Vincent Li
2026-08-17 4:04 ` Tiezhu Yang
0 siblings, 1 reply; 3+ messages in thread
From: Vincent Li @ 2025-08-24 18:26 UTC (permalink / raw)
To: bpf
Cc: Alexei Starovoitov, Daniel Borkmann, Eduard Zingerman,
Martin KaFai Lau, loongarch
Hi,
I am running bpf selftests on a Loonarch PC and observed intermittent
kernel lockup by timer_lockup, then I can repeat the lockup just by
running the timer_lockup in while loop every 5 seconds, I could not
find a good x86 machine to test, and I think this might be
architecture independent. I don't have a good way to capture any
kernel log messages for the PC after the kernel hangs, and I had to
power reset the PC.
[root@fedora ~]# uname -a
Linux fedora 6.17.0-rc2+ #20 SMP PREEMPT_DYNAMIC Thu Aug 21 13:08:01
PDT 2025 loongarch64 GNU/Linux
[root@fedora bpf]# while true ; do ./test_progs -t timer_lockup
--watchdog-timeout=120; sleep 5; done
#458 timer_lockup:OK
Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED
#458 timer_lockup:OK
Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED
WATCHDOG: test case timer_lockup executes for 10 seconds...
WATCHDOG: test case timer_lockup executes for 120 seconds, terminating
with SIGSEGV
test_timer_lockup:PASS:timer_lockup__open_and_load 0 nsec
test_timer_lockup:PASS:pthread_create thread1 0 nsec
test_timer_lockup:PASS:pthread_create thread2 0 nsec
timer_lockup_thread:PASS:cpu affinity 0 nsec
timer_lockup_thread:PASS:cpu affinity 0 nsec
#458 timer_lockup:FAIL
Caught signal #11!
Stack trace:
./test_progs(crash_handler+0x28)[0x120555b04]
linux-vdso.so.1(__vdso_rt_sigreturn+0x0)[0x7ffffee55084]
/lib64/libc.so.6(+0x7d900)[0x7fffef9b1900]
/lib64/libc.so.6(+0x82cc0)[0x7fffef9b6cc0]
./test_progs(test_timer_lockup+0x3fc)[0x1204bce28]
./test_progs[0x120556244]
./test_progs(main+0x684)[0x120558234]
/lib64/libc.so.6(+0x2882c)[0x7fffef95c82c]
/lib64/libc.so.6(__libc_start_main+0xa8)[0x7fffef95c918]
./test_progs(_start+0x48)[0x12010f2d0]
Thanks,
Vincent
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bpf selftests timer_lockup intermittently locks up kernel
2025-08-24 18:26 bpf selftests timer_lockup intermittently locks up kernel Vincent Li
@ 2026-08-17 4:04 ` Tiezhu Yang
2026-08-17 4:38 ` Kumar Kartikeya Dwivedi
0 siblings, 1 reply; 3+ messages in thread
From: Tiezhu Yang @ 2026-08-17 4:04 UTC (permalink / raw)
To: Vincent Li, bpf
Cc: Alexei Starovoitov, Daniel Borkmann, Eduard Zingerman,
Martin KaFai Lau, loongarch
On 2025/8/25 上午2:26, Vincent Li wrote:
> Hi,
>
> I am running bpf selftests on a Loonarch PC and observed intermittent
> kernel lockup by timer_lockup, then I can repeat the lockup just by
> running the timer_lockup in while loop every 5 seconds, I could not
> find a good x86 machine to test, and I think this might be
> architecture independent. I don't have a good way to capture any
> kernel log messages for the PC after the kernel hangs, and I had to
> power reset the PC.
...
> #458 timer_lockup:FAIL
> Caught signal #11!
I recently spent some time investigating this and
managed to reliably reproduce the issue.
After adjusting some kernel configs and parameters,
I successfully captured the call trace.
The following patch fixes the issue, feel free to
test it:
LoongArch: Fix __smp_mb__{before,after}_atomic()
https://lore.kernel.org/loongarch/20260817035908.460-1-yangtiezhu@loongson.cn/
Thanks,
Tiezhu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bpf selftests timer_lockup intermittently locks up kernel
2026-08-17 4:04 ` Tiezhu Yang
@ 2026-08-17 4:38 ` Kumar Kartikeya Dwivedi
0 siblings, 0 replies; 3+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2026-08-17 4:38 UTC (permalink / raw)
To: Tiezhu Yang, Vincent Li, bpf
Cc: Alexei Starovoitov, Daniel Borkmann, Eduard Zingerman,
Martin KaFai Lau, loongarch
On Mon Aug 17, 2026 at 6:04 AM CEST, Tiezhu Yang wrote:
> On 2025/8/25 上午2:26, Vincent Li wrote:
>> Hi,
>>
>> I am running bpf selftests on a Loonarch PC and observed intermittent
>> kernel lockup by timer_lockup, then I can repeat the lockup just by
>> running the timer_lockup in while loop every 5 seconds, I could not
>> find a good x86 machine to test, and I think this might be
>> architecture independent. I don't have a good way to capture any
>> kernel log messages for the PC after the kernel hangs, and I had to
>> power reset the PC.
>
> ...
>
>> #458 timer_lockup:FAIL
>> Caught signal #11!
>
> I recently spent some time investigating this and
> managed to reliably reproduce the issue.
>
> After adjusting some kernel configs and parameters,
> I successfully captured the call trace.
>
> The following patch fixes the issue, feel free to
> test it:
>
> LoongArch: Fix __smp_mb__{before,after}_atomic()
> https://lore.kernel.org/loongarch/20260817035908.460-1-yangtiezhu@loongson.cn/
>
This looks correct to me. Also, nice that the test actually reproduces the issue
without that store-load barrier present, which is good validation for the kernel
side fix.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-17 4:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-24 18:26 bpf selftests timer_lockup intermittently locks up kernel Vincent Li
2026-08-17 4:04 ` Tiezhu Yang
2026-08-17 4:38 ` Kumar Kartikeya Dwivedi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox