7 ms·
Linus Torvalds: Debugging hell
- gaius 18y agoIt's interesting that OSX is basically FreeBSD with bells on, and it can suspend/resume without too much difficulty. That is what needs to be fixed at the source (haha), not one-off hacks.
- davidw 18y agoHow many hardware platforms does OSX do suspend/resume on without too much difficulty?
- deleted 18y ago[deleted]
- eb 18y agoSaying that Mac OS X is basically FreeBSD is inaccurate and I wish that people would stop repeating it. Darwin is built around XNU, a hybrid kernel that's based on Mach, FreeBSD, and 4.3/4.4BSD code. It's true that a lot of code came from BSD, but Mac OS X is not FreeBSD. http://www.kernelthread.com/mac/osx/arch.html http://www.kernelthread.com/mac/osx/arch.html
- river_styx 18y agoWow, there's an enormous ego on that guy. Well deserved, but still...
- kirubakaran 18y agoEgo? Sounds like a simple statement of fact. If someone else can debug the issue, can he say what he did and not get called out? Also, it is funny that people who succeed in the first place due to what you call as ego, are expected to magically lose it and become "nice" once they are above a certain level of success. [edit: +1. Downvote is not from me.]
- river_styx 18y agoSo it's seriously a statement of fact that he's the only person in the entire community who could possibly debug that problem? I find that incredibly hard to believe.
- duhprey 18y agoIf there were someone else, it sure sounds like he would be happy to have sloughed off the work. It doesn't sound glamourous. It sounds like it sucks. So everyone else would rather work on something they think is cool, and Linus is stuck with the crap work that in the end nobody is willing to do. That is why he's the guy in charge. That is why he deserves the credit for Linux.
- ars 18y agoNot "could" - "will". It's not the same thing.
- jwilliams 18y agoHe even calls it "rare"... So I didn't get the ego angle. He's probably understating it if anything.
- JesseAldridge 18y ago"I have an ego the size of a small planet..." http://en.wikiquote.org/wiki/Linus_Torvalds http://en.wikiquote.org/wiki/Linus_Torvalds
- eru 18y ago
- danielh 18y agoDespite the risk of being voted down by the fanboys, I have to ask: how could this receive 12 votes within 40 minutes? What's so newsworthy about Linus being frustrated about debugging?
- abstractbill 18y agoI found it somewhat interesting to learn that on a modern architecture you can isolate the cpu from its peripherals to the extent that debugging is impossible.
- danielh 18y agoThere are some aspects that might be worth voting this article up. Like the one you noted, or the mere fact that even a genius like Linus gets frustrated about debugging. Still, I can't help suspecting that many voters wouldn't care if some John Doe had written this story.
- JesseAldridge 18y agoTrue. But the name Linus Torvalds helps the article pass through our "crap-filter". We invest more effort in looking for value because we have a reasonable assurance that value is there.
- Herring 18y agosounds.. bayesian.
- t0pj 18y agoI think some of us are simply scanning through the new section, tagging things we'd like to read at a later time. :)
- DTrejo 18y agowww.instapaper.com
- jodrellblank 18y agoDoes it unnerve anybody else that there are "Linus or nobody" sections of code, when GNU/Linux is often linked with the "open source / many eyes" security defense?
- yan 18y agoIt's also unnerving that there are huge projects (not just Linux) and huge operating systems that have sections that are "Subsystem maintainer/author or nobody." Open source projects get volunteers because volunteers find the work interesting and some esoteric parts can have very, very few people working on them. I don't really have a solution to this, but it's to be expected.
- JesseAldridge 18y agoGood point. When code is too hard to understand, open source is an illusion.
- eru 18y agoOpen Source is an 'illusion' most of the time. What open source gives you, is the possibility that someone could understand and take over the source if it's needed badly enough.
- astine 18y agoI don't think that it means that if Torvalds gets shot tomorrow that the Linux kernel will die. I think that what it means is that there are parts that only he is knowledgeable or invested in enough work on in order to fix certain bugs. That is, if he were to die tomorrow, other would be able to take his place, technically, but they would have to spend a while reverse engineering the code and might even make significant changes to suit there tastes. This happens all the time with commercial products.
- Hoff 18y agoHardware (driver- or OS-level) debug sucks. Commodity hardware debug sucks more. When working at this level, access to hardware probes and external monitoring and manufacturing taps can be invaluable. Boundary and edge conditions and timing races and part steppings and errata rule. For those cases where the errata was written down, or where the vendor deigned to describe what changed between the steppings. There are a number of device-level drivers and operating systems in use where only a very few folks really know the code sufficient to debug this level, too.
- elai 18y agoI've always wondered why linux has a hard time with suspend and hibernate, while on windows (and osx) there usually isn't any problems at all.
- kaens 18y agoBecause hardware vendors work directly with windows to make suspend / hibernate work correctly. Because for a long time, apple only had one architecture to worry about. Because linux has only gotten "big enough to pay attention to" in the last few years.
- Haskell 18y agoLinus once said that debuggers are for sissies. I knew he would regret saying that sometime. Here is another of his rants against debuggers. Just substitute 'kernel debugger' by 'simple chipset debugging facilities' (whatever that means) in that email and basically he has his response for why Intel isn't adding it. http://linuxmafia.com/faq/Kernel/linus-im-a-bastard-speech.html http://linuxmafia.com/faq/Kernel/linus-im-a-bastard-speech.h... Intel engineers are saying, 'simple chipset debugging facilities' are for sissies!
- Agathos 18y agoWell I know he said real men use printf, but it sounds like he's putting the system in a state where it can't print to anything.
- deleted 18y ago[deleted]
- Haskell 18y agoTherefore, he is putting himself in a state where he is not a real man. This is his logic, not mine.
- Agathos 18y agoHe put himself in a state where the only options were more difficult than printf. Therefore he exceeded his own standard for real manliness, and remains a real man. It seems like a simple transitive relation to me; are you saying his logic neglects transitivity?
- jacquesm 18y agothis is what you get for going macro kernel. in a micro kernel you'd just hook the debugger to the driver process.
- blasdel 18y agoThat's not true at all, have you ever actually done kernel development, especially dealing with bad hardware? A kernel panic is what it is no matter how many boxes there are in your flowchart.
- jacquesm 18y agoYes, and yes, and you're wrong about that. Anything else :) ? To elaborate: Yes, I've actually written an os, yes, bad hardware was my 'standard' in those days (a simple lack of money), imagine a pc built out of parts bolted to an old print-file trolley, more flakey than I care to remember. A kernel panic in a microkernel presumes a memory or a cpu error, anything else the kernel simply does not deal with so that would lead to driver process issues, not kernel panics. A faulty memory controller or cpu would lead to a kernel panic because of (apparent) datastructure inconsistencies. One of the hardest drivers to write (even in a microkernel environment) was an X.25 board that a friend of mine had designed around some comm chip, for one the X.25 spec is pretty convoluted and there were a lot of layers of the protocol to be implemented in a single driver. That thing was an absolute nightmare to debug, other than that most drivers (harddisk controller, network cards, graphic boards) were a walk in the park compared to doing the same under a macro kernel. Simply telnet in to the machine, start up the vga driver process and run it (under the debugger) until you manage to crash it. Most of the times a simple 'where' and close inspection of the source would be enough to solve the problem, recompile and run for the next iteration. No kernel panics.
- ars 18y agoSee update: http://news.ycombinator.com/item?id=388251 http://news.ycombinator.com/item?id=388251