From: Greg Fodor Date: 2007-07-20T17:20:06+09:00 Subject: Re: Ruby thread-dump Gem On Jul 20, 1:06 am, "Bill Kelly" wrote: > From: "Greg Fodor" > > > > > I've written a small C extension for Ruby that will send a list of > > threads and their current file/line number executing to STDERR upon > > receiving a SIGQUIT. > > Nice. I've wanted this ability a few times. > > > This helped us track down a nasty bug that was occuring due to the > > lack of a timeout in Net::HTTP during SSL connect, which still seems > > to be busted in ruby trunk. > > Could you describe this in more detail, or possibly post a diff > of the changes you made to fix the bug? (We're about to ship a > product with embedded ruby using Net::HTTP and SSL, so it would > be great to be able to eliminate any such lurking bug.) > > Thanks, > > Bill We didn't fix it directly, we worked around it by timing out all requests in the outer caller. The bug seems to be inside of def connect, there is a call to "s.connect" if ssl is enabled, and this call is not timed out. Some of our processes were hanging on this call.