Stop your eBPF kprobes from silently breaking when the kernel changes
By Saket Jain Published Linux/Unix
Stop your eBPF kprobes from silently breaking when the kernel changes
Technical Briefing | 8/11/2026
You spend all afternoon crafting the perfect eBPF program to trace a specific function call. It works in your lab on a 5.15 kernel, so you push it to production. A week later, you realize your dashboard has been flatlining for days. It didn’t error out; the kernel just stopped hitting your probe because the function signature moved or got inlined. This happens way more than it should, and most tooling won’t tell you the connection is dead.
Why kprobes are fundamentally fragile
Kprobes are essentially dynamic break-points. When you attach one to a function name, you are betting that the compiler won’t rename it or fold it into something else during a routine kernel update. If the symbol changes, your code stays silent. No segfault, no panic, just a big empty hole in your observability data. That is the worst kind of failure.
bpftool prog show | grep -E 'kprobe|kretprobe'
- Check your kallsyms map before attaching if you suspect the function might be getting inlined
- Use CO-RE features in BCC or libbpf to handle relocation dependencies
- Always verify that your probe is still attached to an active instruction address after an upgrade
Building a better sanity check
Don’t just assume your tracing pipeline is healthy because the service is running. Add a health-check script that cross-references your target symbol addresses against the current system map. If your probe is attached to an address that is no longer part of that symbol’s range, trigger an alert immediately. It’s the only way to catch these silent gaps before you really need the data.
The next time you wonder why your metrics look too quiet, check your symbol offsets. It’s a quick fix that saves you from debugging a phantom problem that only exists because the kernel moved the goalposts.
