News for hackers. Stuff that matters.
Re:Lamest bug we ever encountered by AndyKelley on Saturday December 10, 2011 @07:16PM (#3338875)
I'm not completely satisfied by the explanation. I still have that uneasy feeling that you get when you solve a bug, but an unsolved mystery remains. "Also, I still don't know why not all consoles connected to that PC froze."
Re:Lamest bug we ever encountered by radarsat1 on Saturday December 10, 2011 @11:22PM (#3339264)
He didn't mention how the logging was done but if it was over a TCP connection then the send() call probably blocked until it timed out since the sleeping computer didn't close the socket nicely, then it had to re-establish the connection. Although reliability is nice, if I were writing a remote logger for a something like a game, I think I'd use UDP.
Re:Lamest bug we ever encountered by Nick_C on Sunday December 11, 2011 @03:40AM (#3339643)
> although reliability is nice ... UDP

Would you not use send() with MSG_DONTWAIT? You get the reliability of TCP and you get feedback if there is any potential blocking. (But I certainly am not a socket guru.)

Re:Lamest bug we ever encountered by radarsat1 on Sunday December 11, 2011 @12:36PM (#3340481)
Definitely, asserting non-blocking flags for the socket options is also a good idea.
Re:Lamest bug we ever encountered by AndyKelley on Sunday December 11, 2011 @01:27AM (#3339445)
Are you trying to explain how it's possible for some of the consoles to freeze but others not while talking to the same sleeping computer? If so, I did not understand your explanation.
Re:Lamest bug we ever encountered by alexgartrell on Sunday December 11, 2011 @01:29AM (#3339447)
I believe socket writes don't block until you've filled the internal socket buffer, so it's likely that the unaffected machines simply hadn't done this yet.
Re:Lamest bug we ever encountered by AndyKelley on Sunday December 11, 2011 @03:30PM (#3340981)
ah, there's the missing piece of information. Now I got it, thanks.
Re:Lamest bug we ever encountered by radarsat1 on Sunday December 11, 2011 @12:37PM (#3340482)
It's just a hypothesis. Obviously I don't have enough information to know for sure.