I have an eventmachine based server which is crashing on a semi- regular basis with the following error: ruby: ssl.cpp:162: SslContext_t::SslContext_t(bool, const std::string&, const std::string&): Assertion `e > 0'' failed. Aborted Has anybody else seen this? Thanks, Ian
On Jan 4, 2009, at 9:30 PM, Ian Ragsdale wrote:> I have an eventmachine based server which is crashing on a semi- > regular basis with the following error: > > ruby: ssl.cpp:162: SslContext_t::SslContext_t(bool, const > std::string&, const std::string&): Assertion `e > 0'' failed. > Aborted > > Has anybody else seen this?Ian, what version of Eventmachine? What ruby version? What OS version? What is the server doing when it goes down. You say semi-regular... does that mean you can trigger it or is it random? cr
On Jan 4, 2009, at 23:20, Chuck Remes wrote: > On Jan 4, 2009, at 9:30 PM, Ian Ragsdale wrote: > > > I have an eventmachine based server which is crashing on a semi- > > regular basis with the following error: > > > > ruby: ssl.cpp:162: SslContext_t::SslContext_t(bool, const > > std::string&, const std::string&): Assertion `e > 0'' failed. > > Aborted > > > > Has anybody else seen this? > > Ian, > > what version of Eventmachine? What ruby version? What OS version? What > is the server doing when it goes down. You say semi-regular... does > that mean you can trigger it or is it random? > Sorry, I guess that was a shoddy bug report. :) I''m currently running EM 0.12.2 on CentOS 5.0 (on a EC2 instance). I haven''t yet figured out how to trigger it reliably. I''ve written an IMAP server which we are beta testing with a few users, and this happens every few days, bringing down the entire process. - Ian
The best way to debug this is using gdb. # enable debugging symbols in EM DIR=`gem which eventmachine | tail -1` cd `dirname $DIR`/../ext sudo sed -i -e ''s,; strip $@,,'' Makefile sudo rm rubyeventmachine.* sudo make sudo cp rubyeventmachine.* ../lib # run your ruby app ruby some_em_daemon.rb # attach gdb to the process PID=`ps aux | grep some_em_daemon | grep -v grep | awk ''{print $2}''` gdb `which ruby` $PID Then you can wait for the process to die and use gdb to get a backtrace (by typing bt), (gdb) bt #0 0x00002ae592d58803 in select () from /lib/libc.so.6 #1 0x00002ae59265bb51 in rb_thread_select () from /usr/lib64/libruby18.so.1.8 #2 0x00002ae593fd29cf in EventMachine_t::_RunSelectOnce () from /usr/lib64/ruby/gems/1.8/gems/eventmachine-0.12.2/lib/rubyeventmachine.so #3 0x00002ae593fd3838 in EventMachine_t::_RunOnce () from /usr/lib64/ruby/gems/1.8/gems/eventmachine-0.12.2/lib/rubyeventmachine.so #4 0x00002ae593fd4dcf in EventMachine_t::Run () from /usr/lib64/ruby/gems/1.8/gems/eventmachine-0.12.2/lib/rubyeventmachine.so #5 0x00002ae593fdf294 in evma_run_machine () Aman On Mon, Jan 5, 2009 at 4:03 AM, Ian Ragsdale <ian.ragsdale at gmail.com> wrote:> On Jan 4, 2009, at 23:20, Chuck Remes wrote: > >> On Jan 4, 2009, at 9:30 PM, Ian Ragsdale wrote: >> >> > I have an eventmachine based server which is crashing on a semi- >> > regular basis with the following error: >> > >> > ruby: ssl.cpp:162: SslContext_t::SslContext_t(bool, const >> > std::string&, const std::string&): Assertion `e > 0'' failed. >> > Aborted >> > >> > Has anybody else seen this? >> >> Ian, >> >> what version of Eventmachine? What ruby version? What OS version? What >> is the server doing when it goes down. You say semi-regular... does >> that mean you can trigger it or is it random? >> > > Sorry, I guess that was a shoddy bug report. :) I''m currently running EM > 0.12.2 on CentOS 5.0 (on a EC2 instance). I haven''t yet figured out how to > trigger it reliably. I''ve written an IMAP server which we are beta testing > with a few users, and this happens every few days, bringing down the entire > process. > > - Ian > > _______________________________________________ > Eventmachine-talk mailing list > Eventmachine-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/eventmachine-talk >
Looks like its failing on this: int e; if (privkeyfile.length() > 0) e = SSL_CTX_use_PrivateKey_file (pCtx, privkeyfile.c_str(), SSL_FILETYPE_PEM); else e = SSL_CTX_use_PrivateKey (pCtx, DefaultPrivateKey); assert (e > 0); When it dies, would be interesting to get the values of e and privkeyfile via gdb. You can do this by typing `p e`, `p privkeyfile` etc. Unfortunately the SSL_CTX_use_PrivateKey man page isn''t very helpful about the different error states or how to debug them: RETURN VALUES On success, the functions return 1. Otherwise check out the error stack to find out the reason. Aman On Sun, Jan 4, 2009 at 11:20 PM, Chuck Remes <cremes.devlist at mac.com> wrote:> > On Jan 4, 2009, at 9:30 PM, Ian Ragsdale wrote: > >> I have an eventmachine based server which is crashing on a semi-regular >> basis with the following error: >> >> ruby: ssl.cpp:162: SslContext_t::SslContext_t(bool, const std::string&, >> const std::string&): Assertion `e > 0'' failed. >> Aborted >> >> Has anybody else seen this? > > Ian, > > what version of Eventmachine? What ruby version? What OS version? What is > the server doing when it goes down. You say semi-regular... does that mean > you can trigger it or is it random? > > cr > > _______________________________________________ > Eventmachine-talk mailing list > Eventmachine-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/eventmachine-talk >