filmov
tv
Debugging concurrency programs in Go

Показать описание
Recently the interest in concurrent programming has grown dramatically. Unfortunately, parallel programs do not always have reproducible behavior. Even when they are run with the same inputs, their results can be radically different. In this talk, I’ll show how to debug concurrency programs in Go.
I’ll start by showing how you can debug your goroutines using delve and gdb debuggers. Then I’ll try to visualize goroutines using different scenarios, sometimes it helps to better understand how things work. The next part of the topic will be about dumping a goroutine stack trace of your application while running and inspecting what each goroutine is doing. And I’ll demonstrate how to debug leaking goroutines by tracing how the scheduler runs goroutines on logical processors bound to a physical processor via the operating system thread attached.
As a bonus, I’ll cover debugging tips on finding deadlocks and avoiding race conditions in your application.
I’ll start by showing how you can debug your goroutines using delve and gdb debuggers. Then I’ll try to visualize goroutines using different scenarios, sometimes it helps to better understand how things work. The next part of the topic will be about dumping a goroutine stack trace of your application while running and inspecting what each goroutine is doing. And I’ll demonstrate how to debug leaking goroutines by tracing how the scheduler runs goroutines on logical processors bound to a physical processor via the operating system thread attached.
As a bonus, I’ll cover debugging tips on finding deadlocks and avoiding race conditions in your application.