Unicorns die with bullets made of glitter
summary
Ruby process crashes come from two concrete problems: the MRI mark-and-sweep collector can miss internal buffers when native C extensions drop object pointers from the stack, causing the famous bundler crash; reproduction and fixes use garbage collector walks the raw C stack, enable GC stress + allocator perturbation, and run Valgrind/ASan to catch use-after-free. Timeouts fail on MRI 1.8 green threads and on 1.9+/GVL (need POSIX signals or release the GVL), and JRuby 1.6.7 has a bug where longer timeouts clobber shorter ones. GitHub runs ~12 frontends and ~30 file servers per tier.
AI-written summary · about
chapters (5)
- 0:00Introduction and background
- 2:02Mark and sweep garbage collector
- 13:02Timeout rabbit and Ruby timeouts
- 21:38Moral of the story
- 23:25Q&A session
related talks
32mOnce Upon a Time, Ruby
35mThe Hitchhiker's Guide to Ruby GC
42mRuby 124c41+
36mUnicorn Unix Magic Tricks
29mWhat causes Ruby memory bloat?
34mUnder the Hood of Ruby's Generational Garbage Collector
37mRubinius - tales from the trenches of developing a ruby implementation
55mComplex Ruby concepts dummified
