Thomas (boggyb) wrote,

  • Mood:
  • Music:

The debugger isn't supposed to crash

Epic technology fail it is! Today's fail makes for a short post, but that doesn't make it any less annoying.

I wanted to help debug a colleague's program at work recently to try and track down a threading issue (I suspected one thread of freeing memory being used by another thread). Since this program runs on Linux, this unfortunately means using gdb. So I fire up gdb, tell it to run the program, and am greeted by something like this:

linux-nat.c:546: internal-error: wait returned unexpected status 0x100
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n)

Yes, that's the debugger crashing. That's not supposed to happen.

Some searching threw up this bug from oh, about 4 years ago, as being the most likely cause. Now, the title of this bug implies that you should only see this if you have on the order of seven thousand threads, which is such a ridiculously large number that you'd never expect to run into it. It also suggests that even then this bug only happens occasionally.

Except the program we were trying to debug had a grand total of 4 threads. And gdb would reliably crash whenever I tried to run that program. At which point I was rather stuck, because while there's a whole bunch of debuggers available for Linux (off the top of my head I can think of ddd, Eclipse, or KDbg), what they all are is actually just a frontend for gdb. In the end we worked round it by adding lots of logging, waiting for it to crash, and then puzzling through the pieces, but that was a lot of hassle I could have done without.

Tags: computers, fail, nablopomo, rant

  • How not to get people to use a new feature

    What I want to do: use my laptop. What I actually end up doing: go digging through the settings to find out why I have a new "Meet Now" icon in the…

  • Of carpentry and networking

    So, I'm not sure if I've bought a wifi router or a Cylon Raider here... Work colleague: Cylon raider. So say we all. Housegroup friend: Or a…

  • Foam filter 1, case fan 0

    Did you know that a foam dust filter is capable of milling away the leading edges of a PC case fan? That particular fan was mounted to the top…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.