HeadlinesBriefing favicon HeadlinesBriefing.com

How Superluminal's eBPF Spinlock Bug Exposed Linux Kernel Limits

Hacker News •
×

Superluminal, a CPU profiler, faced periodic system freezes during captures on Fedora 42 with kernel 6.17.4-200. The issue stemmed from eBPF programs interacting during context switches and sampling events, causing kernel freezes lasting 250+ milliseconds. Initial attempts to reproduce failed in VMs but succeeded on physical hardware using serial port debugging cards.

Kernel debugging proved difficult as the debugger froze during freezes. Narrowing the problem, the team created a minimal repro with two eBPF programs reserving and discarding ring buffer entries, revealing a critical interaction between eBPF context switch and sampling code. This fix highlights eBPF's complexity in modern kernels.