3 ms·
https://www.usenix.org/system/files/1311_05-08_mickens.pdf https://www.usenix.org/system/files/1311_05-08_mickens.pdf "Perhaps the worst thing about being a sy
by dralley 2y ago
https://www.usenix.org/system/files/1311_05-08_mickens.pdf https://www.usenix.org/system/files/1311_05-08_mickens.pdf
"Perhaps the worst thing about being a systems person is that
other, non-systems people think that they understand the daily
tragedies that compose your life. For example, a few weeks ago,
I was debugging a new network file system that my research
group created. The bug was inside a kernel-mode component,
so my machines were crashing in spectacular and vindic-
tive ways. After a few days of manually rebooting servers, I
had transformed into a shambling, broken man, kind of like a
computer scientist version of Saddam Hussein when he was
pulled from his bunker, all scraggly beard and dead eyes and
florid, nonsensical ramblings about semi-imagined enemies.
As I paced the hallways, muttering Nixonian rants about my
code, one of my colleagues from the HCI group asked me what
my problem was. I described the bug, which involved concur-
rent threads and corrupted state and asynchronous message
delivery across multiple machines, and my coworker said,
“Yeah, that sounds bad. Have you checked the log files for
errors?” I said, “Indeed, I would do that if I hadn’t broken every
component that a logging system needs to log data. I have a
network file system, and I have broken the network, and I have
broken the file system, and my machines crash when I make
eye contact with them. I HAVE NO TOOLS BECAUSE I’VE
DESTROYED MY TOOLS WITH MY TOOLS. My only logging
option is to hire monks to transcribe the subjective experience
of watching my machines die as I weep tears of blood.”
- Arrath 2y agoThat's beautiful.
- qingcharles 2y agoAh, the joys of trying to come up with creative ways to get feedback from your code when literally nothing is available. Can I make the beeper beep in morse code? Can I just put a variable delay in the code and time it with a stopwatch to know which value was returned from that function? Ughh.
- suzzer99 2y agoI call this "throwing dye in the water".
- dr_kiszonka 2y agoI certainly used beeping for debugging more than once! : - )
- YZF 2y agoSome of us have worked on embedded systems or board bringup. Scope and logic analyzer ... Serial port a luxury. IIRC Windows has good support for debugging device drivers via the serial port. Overall the tooling for dealing with device drivers in windows is not bad including some special purpose static analysis tool and some pretty good testing.
- mjevans 2y agoThis is why power users want that standard old two digit '7 segment' display to show off that ONE hex code the BIOS writes to at various steps... When stuff breaks, not if, WHEN it breaks, this at least gives a fighting chance at isolating the issue.
- AnimalMuppet 2y agoYeah. Been there, done that. Write to an unused address decode to trigger the logic analyzer when I got to a specific point in the code, so I could scroll back through the address bus and figure out what the program counter had done for me to get to that piece of code.
- _tom_ 2y agoOld school guys at my first job could send the contents of the program counter to the speaker, and diagnose problems by the sound of it. Definitely Old School Cool
- killerstorm 2y agoThis is an interesting piece of creative writing, but virtual machines already existed in 2013. There are very few reasons to experiment on your dev machine.
- rcbdev 2y agoOS / driver development needs to be done on bare metal sometimes.
- grishka 2y agoSometimes you have to debug on a real machine. When you do, you'd usually use a serial port for your debug output. Everything has one.
- pjmorris 2y agoAt the time, Mickens worked at Microsoft Research, and with the Windows kernel development team. There may only be a few reasons to experiment on your dev machine, but that's one environment where they have those reasons.
- dwattttt 2y agoQuoting James Mickens is always the winning move. I recommend the entire collection of his wisdom, https://mickens.seas.harvard.edu/wisdom-james-mickens https://mickens.seas.harvard.edu/wisdom-james-mickens
- rkagerer 2y agoSomebody get this man a serial port, or maybe a PC Speaker to Morse out diagnostics signals.