Live data from Hacker News

Ask HN: What's the hardest problem you've ever solved?

news.ycombinator.com

41–50 of 124 posts

Re: Ask HN: What's the hardest problem you've ever solved?

#41
All three of Octel's servers would become unresponsive for no apparent reason. Sometimes they crashed after a while but sometimes they would come back up after a while.

Late one night when no one else was there I ran "top" only to puzzle over that a bunch of identical command lines were consuming all the CPU:

    login -p Mkkuow....
I don't remember the exact username but this Mkkuow guy was trying to log into all the terminals on each box.

I dont clearly recall how I figured this out but it was the result of capacitive coupling - parasitic capacitance - between the transmit and receive rs232 wires. The OS would transmit "SunOS login:" then get garbage on the receive line. Then it would prompt for the password a few times, eventually to give up and transmit the login prompt again.

The actual username I saw is easy to figure out by graphing the ASCII voltage levels then considering how capacitance works.

The solution was to replace all the cables with a lower capacitance cable. Because that required all new connectors as well as my time to install them my manager Karen Coates required some convincing but in the end the new cable stopped the hangs.

Re: Ask HN: What's the hardest problem you've ever solved?

#43
I once found a mask error - a design flaw - in an embedded chip, but I was unable to work around it. I had to tell my client, a primary defense contractor that they selected the wrong part and would have to redesign their boards then respin their prototypes.

Re: Ask HN: What's the hardest problem you've ever solved?

#44
there are lot of hard bugs in embedded Linux development. But once solved, its not hard anymore :) For example, code porting for different architecture could be tricky in some places. Porting a device driver to your new chip could be tricky as well especially if your HW vendor isn't helpful.

Re: Ask HN: What's the hardest problem you've ever solved?

#46
post #24

Turning myself from a data driven nerd into an emphatic person who understands social interactions. Finally, I bring home girls :)

You can be emphatic and remain empirical. It's the difference between thinking nobody is wrong vs knowing someone is wrong but it not mattering under certain contexts.

Re: Ask HN: What's the hardest problem you've ever solved?

#47
I used to repair EEG systems and we had about a dozen "noisy" units. The boards all tested fine, but were noisy when hooked up to measure brainwaves.

It turned out people were running the SLA battery completely flat repeatedly, and subtly "wearing out" the battery.

Re: Ask HN: What's the hardest problem you've ever solved?

#48
The hardest bug I ever tracked to date resulted from a combination of me being a n00b at the time and legitimately being hard. It was a stack thrashing bug on an RTOS that ran on a system without MMU. To make things a little worse, GCC support for that platform was still very early at the time, so GDB would occasionally become confused, and did not support watches; besides, everything had gotten big enough at the time that there was no way to compile the whole system with debug symbols and no optimizations; the image was stripped and optimized for size.

The bug wasn't easy to reproduce: all we saw was that, every once in a while, when queried over $wirelessprotocol, the system would begin answering with crap values (it was supposed to measure some physical quantities, and crap values = meaningless, as in negative active power and hundreds of kV on a mains line), and if you kept on pounding it, it would eventually start "acting funny" -- randomly toggling LEDs and handling commands that were never given in the first place -- before eventually crashing. The problem was very far removed from its core; at first, all I was debugging was "system begins answering with thrashed values after a while".

I was two days into it when a more experienced colleague (I was a junior developer at the time) stepped in to help me. We began suspecting a process was smashing another process' stack when, after removing module after module, the bug was still not clearly reproducible by a particular sequence of steps, but the behaviour it triggered became fairly uniform.

We decided a good way to test this assumption was to modify the context switching routine to dump the current top of the stack over a serial line; unfortunately, that introduced additional delays that prevented the bug from occurring, so it didn't help us. We figured, however, that the handler for $wirelessprotocol's query was in the process that smashed the other process' stack, so we modified that handler to send the top of the stack over wireless (this is where not having a MMU helped, ironically :-) ). The base of the other process' stack could be obtained by just tracing context switches.

Sure enough, if enough commands piled up, that process (which was running some pretty intensive stuff, including floating point operations, on a very resource-constrained system) would smash into the next one's stack, messing up its context's registers.

In retrospect, this wasn't necessarily a difficult bug per se: the concept is well-understood and the theory behind it is trivial. The biggest problem is that it challenges the fundamental way we debug programs: when the CPU starts doing crap, we assume we've instructed it to do crap, and it's (correctly!) following consistently bad instructions. In this case, the CPU ended up following random instructions.

Re: Ask HN: What's the hardest problem you've ever solved?

#49
I think that this is such a tough question to definitively answer because the measure of difficulty of a problem is all relative to the particular point in time.

I am currently working on my thesis in artificial intelligence which to me seems tough because I have never written a thesis before. However, at work, I am dealing with technical software engineering problems that will seem easy after I have solved them.

My first industry project involved creating a generic form builder which could ultimately be used as a survey tool to draw statistics from. This seemed extremely challenging at the time, but now that all of the design decisions have been made, and complexities solved, I could redo it pretty easily (even though we shouldn't recreate the wheel)

Good thought provoking question though! Thanks!

Re: Ask HN: What's the hardest problem you've ever solved?

#50
Hard to pin down one in particular:

- Anything where you're looking for a race condition. It tends to be hard to reproduce, and instrumentation can make it go away entirely, leaving you with a need to conjecture about what might be happening. Quite satisfying when you find it, but again because it's rare you don't know if you're really solved it.

- Built a cross-platform, cross-language messaging system for trading. Combined UDP and TCP, had detection of downed servers. A lot of fiddling with network stuff, performance optimization on all platforms, both VM and native.

Post reply on HN