Debugging a Linux Kernel Bug That Causes Async-profiler Deadlocks
By
bluestreak
5mo ago· 19 min readenInsight
100/100
Golden Brown
Bagelometer↗
Fresh out the oven, still warm. Top of the tray.
Score100TypeanalysisSentimentneutral
Summary
A developer shares their experience debugging a kernel bug that caused their Linux machine to freeze when using async-profiler. The article details their investigation process, from initial symptoms to identifying the root cause as a kernel deadlock issue, and provides workarounds for others facing similar problems. The author describes their journey from encountering the problem to understanding the technical details of the kernel bug and how it interacted with the profiling tool.
Key quotes
· 5 pulledI've been a Linux user since the late 90s, starting with Slackware on an underpowered AMD K6.
Over the years I've hit plenty of bugs, but the last decade has been remarkably stable - until a kernel bug started freezing my machine whenever I used async-profiler.
I'm not a kernel developer, but I found myself diving deep into kernel internals to understand what was happening.
The bug manifested as a complete system freeze - no keyboard response, no network access, just a hard lock that required a power cycle.
After weeks of investigation, I discovered it was a deadlock in the kernel's signal handling code that only triggered under specific profiling conditions.
How I investigated and worked around a kernel bug that caused async-profiler to freeze my machine whenever I tried to use a profiler.
