Stories
Slash Boxes
Comments

SoylentNews is people

posted by Cactus on Saturday March 08 2014, @02:00AM   Printer-friendly
from the is-it-plugged-in? dept.

martyb writes:

"Remember that one bug that had you tearing your hair out and banging your head against the wall for the longest time? And how it felt when you finally solved it? Here's a chance to share your greatest frustration and triumph with the community.

One that I vividly recall occurred back in the early 90's at a startup that was developing custom PBX hardware and software. There was the current development prototype rack and another rack for us in Quality Assurance (QA). Our shipping deadline for a major client was fast approaching, and the pressure level was high as development released the latest hardware and software for us to test. We soon discovered that our system would not boot up successfully. We were getting all kinds of errors; different errors each time. Development's machine booted just fine, *every* time. We swapped out our hard disks, the power supply, the main processing board, the communications boards, and finally the entire backplane in which all of these were housed. The days passed and the system still failed to boot up successfully and gave us different errors on each reboot.

What could it be? We were all stymied and frustrated as the deadline loomed before us. It was then that I noticed the power strips on each rack into which all the frames and power supplies were plugged. The power strip on the dev server was 12-gauge (i.e. could handle 20 amps) but the one on the QA rack was only 14-gauge (15 amps). The power draw caused by spinning up the drives was just enough to leave the system board under-powered for bootup.

We swapped in a new $10 power strip and it worked perfectly. And we made the deadline, too!

So, fellow Soylents, what have you got? Share your favorite tale of woe and success and finally bask in the glory you deserve."

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by c0lo on Saturday March 08 2014, @04:45AM

    by c0lo (156) Subscriber Badge on Saturday March 08 2014, @04:45AM (#13095) Journal
    Can't remember the version, but it was one of the earliest g++ versions (approx 1994-1995 in my memory serves). The bug was in the implementation of the how the "return by value" and "value assignment" was implemented (even when a copy constructor would have been available): essentially, the content of returned value (except this) was memcopied from the stack into the left-hand value.

    So, something like, on constructor, register (this) in some global registry, on destructor unregister (this) was going on the path of:
    a. when created (inside a function), the instance would register a certain (this) value
    b. the content of the ret value was memcopied from the stack and the (this) silently changed to the value of the left-hand side
    c. the destructor of the ret value was never called
    d. when the destructor of the left-hand of the assignment was called, the application coredumped.

    Took me 4 days to discover the bug, mainly because I couldn't imagine a compiler being buggy. After getting the explanation, took another 3 day to change the code from "work with values and on the stack" on "work with pointers and dynamic memory allocation"

    --
    https://www.youtube.com/watch?v=aoFiw2jMy-0 https://soylentnews.org/~MichaelDavidCrawford
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2