Subject: [sup-talk] IMAP server restart causes Sup exception

From: [email-masked] (Kevin Riggle)
Date: Tue, 13 May 2008 21:23:58 -0400

Restarting my IMAP server caused the following Sup exception.

--- SystemExit from thread: main
closed stream
/usr/lib/ruby/1.8/openssl/buffering.rb:237:in `select'
./lib/sup/buffer.rb:31:in `nonblocking_getch'
bin/sup:227

Sup should really handle this more gracefully.

- Kevin
-- 
Kevin Riggle (kevinr at mit.edu) 
http://free-dissociation.com

---

From: [email-masked] (William Morgan)
Date: Mon, 19 May 2008 16:16:40 -0700

> ./lib/sup/buffer.rb:31:in `nonblocking_getch'

This backtrace doesn't really make any sense. There's no reason that
nonblocking_getch would be calling the openssl stuff, and openssl's
buffering.rb doesn't mention select at all. Weird.
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Marcus Williams)
Date: Tue, 20 May 2008 16:03:08 +0100

> buffering.rb doesn't mention select at all. Weird.

I should pipe up here as well - this exception was one of the reasons
I switched to offlineimap as I would get it randomly in sup during
imap actions. I couldnt figure out how they interacted with each other
though as it didnt happen enough to debug :(

Marcus

---

From: [email-masked] (William Morgan)
Date: Tue, 20 May 2008 09:05:59 -0700

> though as it didnt happen enough to debug :(

Interesting. I've had weird issues in the past with the Ruby IMAP
library and threading, so this might be related. I've definitely seen it
generate nonsensical backtraces by funny exception handling across
threads.

Simultaneous dependencies on 20 libaries of dubious quality---that's the
story of Sup.

Well once I get up the energy to write SupServer, I won't have to
support anything except for mbox anymore!
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Ben Walton)
Date: Tue, 20 May 2008 12:23:31 -0400

On Tue, May 20, 2008 at 12:05 PM, William Morgan
> generate nonsensical backtraces by funny exception handling across

I think you'll find that things get better if you do plain IMAP with
stunnel instead of relying on the ssl support in ruby/ruby-imap.  I
had horrible (to the point where I almost had to switch away from
ruby) problems with a project that relied on the ability to do imaps.
The imap library may be partially to blame (and the imap spec
requiring threading doesn't help...), but I found that things got much
better without ssl being handled by ruby.

-Ben
-- 
---------------------------------------------------------------------------------------------------------------------------
Ben Walton <bdwalton at gmail.com>

When one person suffers from a delusion, it is called insanity. When
many people suffer from a delusion it is called Religion.
Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance

---------------------------------------------------------------------------------------------------------------------------

---

From: [email-masked] (William Morgan)
Date: Sat, 24 May 2008 19:45:14 -0700

> better without ssl being handled by ruby.

Interesting. I didn't know about stunnel. Kevin, if you're seeing this
on a regular basis, you could try that... or switch to offlineimap like
everyone else has for performance reasons.

Sup's IMAP support leaves a lot to be desired and I'm happy to blame
this library. Irritatingly slow, and prone to insane errors like this
one. I don't want to disable it, though, and I sure as heck don't want
to write my own IMAP library. So for the time being we're stuck with it.
-- 
William <wmorgan-sup at masanjin.net>