~/talk

Deterministically Debugging Go Programs

Talkat GopherCon 2020 · 2020-11-09..11-13· [testing]
links:none on file
slides:none on file

Deterministic debugging captures a failing Go run once and replays it exactly using Delve + rr backend, turning intermittent failures that occur maybe 1-in-100 or 1-in-1000 into repeatable sessions. It records syscalls (via ptrace shims), traps RDTS/CPU id, uses single-threaded replay with a user-space scheduler, and preserves memory layout so breakpoints and addresses match. Traces are portable artifacts that can be shared; you can also do reverse execution to step backward. Requires Linux and incurs runtime overhead during recording.

AI-written summary · about

  1. 0:00Introduction and welcome
  2. 1:21About the speaker
  3. 2:06What is deterministic debugging
  4. 3:53Groundhog Day analogy
  5. 6:46How it works technically
  6. 8:16Recording and replaying
  7. 10:37VM vs user space recording
  8. 11:56Pros and cons of VM recording
  9. 13:40User space recording
  10. 15:34The solution: Mozilla rr
  11. 17:16Eliminating non-determinism
  12. 18:22Controlling CPU instructions
  13. 20:28Thread scheduling
  14. 22:08Handling system calls
  15. 24:18Memory layout
  16. 25:02Shared memory and signals
  17. 26:25Uncontrollable factors
  18. 27:10Pros and cons of this approach
  19. 28:34Key benefits of rr
  20. 30:22Reverse execution
  21. 32:02Limitations of rr
  22. 34:27Using rr with Delve
  23. 36:01Installation requirements
  24. 37:11Replay workflow
  25. 38:38Integrated debugging
  26. 39:33Scripting Delve
  27. 41:30Demonstration
  28. 45:31Conclusion
~/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.