~/talk

Debugging one layer deeper

Talkat NDC Oslo 2021 · 2021-11-29..12-03· [security]
slides:none on file

Production crashes once per day lead to WinDbg memory dumps and SOS-assisted stacks, disassembly mapping native CLR code back to C++ and object headers, and a concrete repro built in Visual Studio that triggers the fault. Root cause is a promoted thin-lock whose syncblk stores -1 in m_holding_thread because the thread id is missing from the id->thread table after thread finalization; header space is only 26 bits, and investigation uses WinDbg and SOS to trace registers, offsets (notably 0x2c) and the sync block promotion.

AI-written summary · about

  1. 0:00Intro
  2. 1:15Three steps
  3. 4:58Symptoms
  4. 5:46Memory dump
  5. 9:35Monitor that is entered
  6. 10:36Source code
  7. 11:38Checking source code
  8. 13:52Checking the calling convention
  9. 21:33Refining the theories
  10. 25:21The source code
  11. 27:40Checking the source code
  12. 30:15Checking the instruction code
  13. 34:39Verifying offset2c
  14. 36:29Guess thread owning monitor lock
  15. 41:05Analyzing the source code
  16. 47:09Unresolved questions
  17. 50:19Conclusion
~/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.