4 ms·
Being against a kernel debugger is one of the worst decision Linux ever made. Thankfully those days are behind us. https://lwn.net/Articles/270089/ https://lwn
by sanxiyn 3y ago
Being against a kernel debugger is one of the worst decision Linux ever made. Thankfully those days are behind us.
https://lwn.net/Articles/270089/ https://lwn.net/Articles/270089/
Linus Torvalds, in paraphrase:
> I happen to believe that stone knives and bear skins force people to think about their problem on a different level.
This is exactly as ridiculous as it sounds.
- JohnFen 3y agoYeah, I think he overstates the case. I do see people who have become overly dependent on debuggers and that has adversely affected their debugging skills -- but that isn't an indictment of debuggers.
- kbenson 3y agoIt's ridiculous, but at the simplest level, it's not wrong. Your tools or the lack thereof will change how you think about things, for better or worse depending on the situation. If your goal is putting venison on the table tonight, vs understanding deer behavior and herd migration and when deer are even in the area in enough numbers and so can even be thought of as a viable food source, a stone knife and a bear skin as tools might promote (or force through necessity) better understanding than a hunting rifle and a large puffy jacket. That doesn't mean it's "better" or that everyone should be using shitty tools, but it is food for thought, and that perhaps doing it a few times is a learning experience that isn't all negative.
- m463 3y agokernel debugging on linux sucks (IMHO) I've tried it and it is really hard to get even the most basic debug output - a symbol'd stack trace of a crash. If you can't get it at runtime, you need a kernel dump, and trying to get one is a mess. Once you have it, it is hard to match up the dump to the symbols. I believe some of the tools were kernel-version specific and I think when kernel 5 came out they didn't work.
- worthless-trash 3y agoI have run "crash" against a live kernel, i have run systemtap against a live kernel, kprobes and written my own C debugging linux kernel issues. I can't speak for other distros, but you install the relevant debuginfo(symbol files) and then use your tooling, and its been pretty straight forward, at least for the last 10 years. Hit me up if you ever need assistance doing it on standard x86-64, I'll do what i can to help.
- stcroixx 3y agoSo not at all ridiculous. I prefer the method of dev Linus follows.
- MobiusHorizons 3y agoHow is this ridiculous? I don't think the core of what he is saying (that tools affect how you think) is a matter of opinion. I can certainly see how people would disagree on his conclusion (therefore everyone must use the harder tools). Tools that force you to hold a model of what's going on in your head and reason about its state require you to think completely differently than tools which hold the state or context for you outside of your head. Think about how different it feels to compose a message in your head, or with a pencil and paper, compared to using a word processor. You can even notice this effect by just typing text with your eyes closed as compared to staring at the screen as you type. The amount of context in your head affects how you think about things. At least for me, the tools I use greatly affect how much context I absorb into my head, and as a result what kind of theory generation and problem solving I can do, especially when a problem is hard enough that it requires several sessions of debugging.