4 ms·
I've read this story dozens of times and this is the first time SunOS jumped out at me. Around 2001 or so there was a Solaris release (2.7 maybe?) that had a bu
by js2 9y ago
I've read this story dozens of times and this is the first time SunOS jumped out at me. Around 2001 or so there was a Solaris release (2.7 maybe?) that had a bug in a particular patch release where sleep() returned instantly. That would have exhibited all sorts of interesting symptoms such as this story.
- shakna 9y agoI had the joy of re-engineering a terrible in-house web server because of that bug. It had used the system sleep to pause execution between the fake threads in their awful program. Suddenly everything was hitting race problems, instead of about 10%. Not something I really understood why it was going so bad, so I just dumped the inhouse implementation of threads, and took up the Solaris one, which was a joy by comparison.
- mikeash 9y agoSleep() returns early if a signal is delivered to the program, so doesn't your code need to handle this case anyway? Of course, this is super rare, so incorrect code could survive for a long time on a correctly implemented system.
- corprew 9y agothis is the point of that terrible 'threading' strategy, actually, if i guess what they are doing correctly.
- geocar 9y agoYou should always handle your errors, but people trust in exceptions and "what works" often enough that we have a culture that doesn't. http://geocar.sdf1.org/close.html http://geocar.sdf1.org/close.html