From youngh at caida.org Thu Feb 18 16:05:40 2010 From: youngh at caida.org (Young Hyun) Date: Thu, 18 Feb 2010 13:05:40 -0800 Subject: [Rev-talk] catching I/O exceptions Message-ID: rev failed with an uncaught I/O exception: # at .../rev-0.3.2/lib/rev/io.rb:108:in `read_nonblock' .../rev-0.3.2/lib/rev/io.rb:108:in `on_readable' ... I have long-running connections (up for months at a time) that are subjected to all manner of corner cases in network failure. Rev::IO#on_readable and on_writable should probably also catch SocketError, IOError, and SystemCallError. You may also want to catch Errno::EINTR. In general, it would be useful for "mission critical" applications if on_readable and on_writable were more fault tolerant, such as reporting unexpected exceptions and then dropping the connection. Currently the uncaught exception percolates up to the application in an unpredictable way, since the rev API is callback based. --Young From tony at medioh.com Thu Feb 18 22:49:57 2010 From: tony at medioh.com (Tony Arcieri) Date: Thu, 18 Feb 2010 20:49:57 -0700 Subject: [Rev-talk] catching I/O exceptions In-Reply-To: References: Message-ID: On Thu, Feb 18, 2010 at 2:05 PM, Young Hyun wrote: > rev failed with an uncaught I/O exception: > > # > > at > > .../rev-0.3.2/lib/rev/io.rb:108:in `read_nonblock' > .../rev-0.3.2/lib/rev/io.rb:108:in `on_readable' > ... > > I have long-running connections (up for months at a time) that are > subjected to all manner of corner cases in network failure. > Rev::IO#on_readable and on_writable should probably also catch SocketError, > IOError, and SystemCallError. You may also want to catch Errno::EINTR. > Thanks for pointing this out. Would you mind putting together a patch? Otherwise I'll fix it when I have time. -- Tony Arcieri Medioh! A Kudelski Brand -------------- next part -------------- An HTML attachment was scrubbed... URL: From youngh at caida.org Fri Feb 19 14:46:48 2010 From: youngh at caida.org (Young Hyun) Date: Fri, 19 Feb 2010 11:46:48 -0800 Subject: [Rev-talk] catching I/O exceptions In-Reply-To: References: Message-ID: I've attached a patch for catching more exceptions. --Young -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Changed-Rev-IO-to-catch-more-I-O-exceptions.patch Type: application/octet-stream Size: 1204 bytes Desc: not available URL: -------------- next part -------------- From tony at medioh.com Mon Feb 22 02:21:05 2010 From: tony at medioh.com (Tony Arcieri) Date: Mon, 22 Feb 2010 00:21:05 -0700 Subject: [Rev-talk] catching I/O exceptions In-Reply-To: References: Message-ID: On Fri, Feb 19, 2010 at 12:46 PM, Young Hyun wrote: > I've attached a patch for catching more exceptions. > Committed. If I don't hear about additional issues in the near future I'll go ahead and push this out in a release. -- Tony Arcieri Medioh! A Kudelski Brand -------------- next part -------------- An HTML attachment was scrubbed... URL: