Screwing up my page tables
axleos.com
axleos.com
This really shows the glory, and the horror, of low-level systems programming. You make a seemingly-simple change, which surfaces a bug, which leads to gruesome crashes - the kind where the black box ends up in pieces - which you finally somehow trace back to an odd assembly instruction, which happened because you forgot to include a header so the C compiler simply hallucinated a function prototype! Because header files weren't free in the '70s, apparently!
It requires the kind of mind that can diagnose a leaky head gasket from a customer pantomiming goosh-goosh sounds.
I was unsure whether to write this post as, in one sense, it’s detective work in which I’m the investigator, and a slightly younger and more sloppy version of myself is the culprit. As you said, though, there's also more to it: the system takes on a life of its own, with different parts of the stack interacting in unexpected and complex ways, in an environment that doesn’t give me much help to write things correctly (and occasionally presents footguns on a silver platter).
It’s really gratifying to see people reading and identifying with it, and I’m also extending my thanks to the user who posted this to HN!
Often, the answer is “nothing special”, and extremely minor pieces of happenstance (such as the exact layout of address space requested by the kernel ELF) lead to something breaking way down the ladder.
It's really nice to hear that you enjoyed it!