Go Compiler Bug Story
When I read this article, another bug tracing story, I found I really like to follow these kinds of stories. Because I enjoy seeing the progress, and moreover I can understand what they are doing, and I also would do the same things if I were them. Summaries are:
- Very rare kernel panic happened, but initially pretty hard to find any pattern
- They cross checked Go issue tracking and found same issues
- More and more cases accumulated, and finally they see the pattern
- Netlink.Receive was the routine causing the panic
- But code review brought nothing, so they go deeper, in to disassembling
- And found suspicious Splitted Operation for Stack Pointer
- During modifying the SP, if that routine preempted, the SP is not correct
- Async preemption, as it is preempted because it is entering the I/O
- This SP corruption is happening during unwinding the stack, but garbage collector requires the correct SP even during unwinding
How we found a bug in Go's arm64 compilerThis was a very fun problem to debug. We don’t often see bugs where you can accurately blame the compiler. |