In the world of software engineering, identifying and resolving system freezes can be a complex and time-consuming task. LinkedIn, a global professional networking platform, recently encountered a unique challenge that required innovative problem-solving. The issue was a recurring system freeze, lasting only 10-15 seconds, which left no helpful traces and recurred with no clear pattern or external trigger. This case study delves into the fascinating journey of how LinkedIn engineers, led by Pratikmohan Srivastav, uncovered the root cause using off-CPU profiling with eBPF. Personally, I find this story particularly intriguing because it highlights the power of innovative problem-solving and the importance of understanding the underlying causes of system issues. What makes this case study even more fascinating is the use of eBPF, a powerful tool for monitoring and profiling kernel-level behavior. By correlating the incidents with system memory behavior, the engineers discovered a momentary spike in memory allocation, which was the key to unlocking the mystery. However, the analysis based on conventional monitoring and metrics provided no hits at the root cause, which prompted the team to dig deeper into the OS and runtime-level behavior during the freezes. One thing that immediately stands out is the importance of off-CPU profiling in identifying the root cause of system issues. By building a trap and using an eBPF toolkit, the engineers were able to capture an off-CPU profile during a live freeze, which allowed them to observe the underlying cause. In my opinion, this case study is a great example of how innovative problem-solving and the use of advanced tools can help engineers identify and resolve complex system issues. The root cause was traced to a huge memory allocation, which triggered a kernel-level lock on the mmap_lock semaphore, effectively blocking all threads. This raises a deeper question: how can we prevent such issues from occurring in the future? One possible solution is to pre-allocate large data structures, as suggested by the LinkedIn engineers. This approach can help prevent sudden memory spikes in latency-sensitive paths and reduce the likelihood of system freezes. However, this solution comes at a cost, as it requires an additional ~3 GB of resident memory at startup. From my perspective, this case study highlights the importance of understanding the underlying causes of system issues and the need for innovative problem-solving. It also emphasizes the role of eBPF in monitoring and profiling kernel-level behavior, which can be a powerful tool for diagnosing complex system issues. What many people don't realize is that system freezes can be caused by a variety of factors, including memory allocation issues, kernel-level locks, and data structure resizing. By understanding these underlying causes, engineers can develop more effective solutions to prevent such issues from occurring in the future. In conclusion, this case study is a fascinating example of how innovative problem-solving and the use of advanced tools can help engineers identify and resolve complex system issues. It also emphasizes the importance of understanding the underlying causes of system issues and the need for a holistic approach to problem-solving. If you take a step back and think about it, this case study raises a deeper question: how can we prevent such issues from occurring in the future? By learning from this experience, we can develop more robust and reliable systems that can withstand the challenges of modern computing.