News for hackers. Stuff that matters.
Re:A collection of debugging stories by jpatokal on Sunday August 23, 2015 @06:45AM (#10105211)
Nice! Sent in a pull request to add mine: http://gyrovague.com/2015/07/29/crashes-only-on-wednesdays/
Re:A collection of debugging stories by lordnacho on Sunday August 23, 2015 @09:04AM (#10105395)
It happens quite often that bugs end up being obscure things like this.

The a-ha moment when you've figured one out is interesting. It's always a mixture of pleasure at having discovered a complex causal chain and horror at having written it.

Re:A collection of debugging stories by kranner on Sunday August 23, 2015 @11:38AM (#10105747)
A book-length, epic debugging story is in Ellen Ullman's novel The Bug:

http://www.amazon.com/The-Bug-Novel-Ellen-Ullman/dp/12500024...

Re:A collection of debugging stories by 101011 on Sunday August 23, 2015 @11:42AM (#10105761)
Another great read for debugging that was recommended to me years ago:

http://www.amazon.com/Debugging-Indispensable-Software-Hardw...

Re:A collection of debugging stories by egeozcan on Sunday August 23, 2015 @12:53PM (#10105976)
Great collection!

Maybe one could ask the authors if they could donate their debugging articles to a cc licensed repository so the articles themselves could be hosted instead of linking? That would be very nice I think.

Re:A collection of debugging stories by calhoun137 on Sunday August 23, 2015 @12:31PM (#10105909)
"This is the only time in my entire programming life that I've debugged a problem caused by quantum mechanics." [1]

This quote is amazing lol

[1] http://www.gamasutra.com/blogs/DaveBaggett/20131031/203788/M...

Re:A collection of debugging stories by tfigment on Sunday August 23, 2015 @05:18PM (#10106769)
Don't want to write a real post but my most memorable simple story was with a C optimizing compiler. I was using a something like struct Item { char name[12]; int flag; } with code that would would use this in a btree and use memcmp(x,y,sizeof(Item)) for ordering. The name could be non-unique but name+flag would be and give specific ordering. To fill Item I used something like (much simplified):

  x = (Item*)malloc(sizeof(Item));
  memset(x->name, 0, 12); 
  strcpy(x->name, name);
  x->flag = flag;
So the bits after name are now significant in compares but expected to be zero because of memset. Well the optimizer would effectively remove the memset in release builds due to the strcpy so the code worked most of the time in release but would occasionally break because the bytes after the null terminated name could be anything and would only come into play when name was the same for 2 items.
Re:A collection of debugging stories by digi_owl on Sunday August 23, 2015 @11:26AM (#10105718)
For some reason i love reading these kind of stories, especially when you get the feel the writer is venting after a deep dive of the OS guts.

A close equivalent is reading Derek Lowe's "things i won't work with" articles.

Re:A collection of debugging stories by spaar on Sunday August 23, 2015 @12:11PM (#10105839)
I absolutely loved the "Things I won't work with" articles, very enjoyable to read. And I even learned some things about chemistry in the process. I can only recommend everybody who is even slightly interested in chemistry to read them.
Re:A collection of debugging stories by wging on Sunday August 23, 2015 @05:10PM (#10106751)
Re:A collection of debugging stories by digi_owl on Monday August 24, 2015 @04:20AM (#10108518)
seems he has since moved to sciencemag, but i don't see any new articles in that category over there (and all his old corante stuff has been copied over).

http://blogs.sciencemag.org/pipeline/archives/category/thing...

Re:A collection of debugging stories by darasan on Tuesday September 01, 2015 @11:17AM (#10152919)
Sorry, but that first one:

http://nanxiao.me/en/an-experience-of-fixing-a-memory-corrup...

is really dumb. The moral is that you don't use global variables that are accessed by multiple threads (unless you're very careful). That's C programming 101.

Re:A collection of debugging stories by yjgyhj on Sunday August 23, 2015 @01:00PM (#10106003)
Great collection! Love these kinds of stories - hate to struggle with these kinds of problems.
Re:A collection of debugging stories by BtM909 on Sunday August 23, 2015 @10:21AM (#10105554)
No critism, but why would this be different than some of the contributions on the daily wtf?
Re:A collection of debugging stories by highwind on Sunday August 23, 2015 @10:52AM (#10105627)
It's OK to have similar/duplicate things on the Internet. (It often is the case.)
Re:A collection of debugging stories by Sir_Cmpwn on Sunday August 23, 2015 @08:53AM (#10105376)
Brought a smile to my face to see my story up there as #2 :)