~/talk

Deadlocks: The Dark Side of Concurrency

Talkat GopherCon UK 2021 · 2021-10-25..10-27· [concurrency]
links:none on file
slides:none on file

Concurrent Go code from rclone produces real deadlocks involving mutexes and channels; the runtime detector rarely fires because some goroutines stay active. Diagnostics use SIGQUIT or net/http/pprof traces and collapse helpers like panicparse; static detectors like go deadlock catch many mutex-ordering issues. Concrete fixes include shortening lock windows, making fields immutable, offloading channel sends to new goroutines, and avoiding recursive RW locks — the ultimate invariant is enforcing total lock ordering or reverting to a single-threaded engine.

AI-written summary · about

  1. 0:00Intro
  2. 2:54What is a deadlock?
  3. 5:04Simple deadlock
  4. 8:19Deadlock detector defeated
  5. 11:34File system example: in the beginning
  6. 12:46File system: locking needed in File
  7. 14:18File system: deadlock code
  8. 20:49HTTP debug handler output
  9. 24:44Channel deadlocks
  10. 30:00Read locks
  11. 36:55Total Lock ordering
  12. 40:54Go deadlock
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.