[ejabberd] 0.9.8 segfaulting fairly often?

Brian Campbell bacam at z273.org.uk
Fri Oct 21 02:28:01 MSD 2005


On Thu, Oct 20, 2005 at 05:12:10PM -0400, Daniel Henninger wrote:
> Hi Brian, what version of OpenSSL are you using?  I'm wondering it  
> the latest greatest openssl fixed this?  (since the problem ceased  
> after I upgraded to the brand new series)  0.9.8a I think it is.   
> (hey, how convenient, it's the same version as ejabberd) Still, I've  
> only been running for a day now.  I'll keep an eye out.

I doubt it; OpenSSL wasn't designed to be unloaded, and I think that
making it handle them would require API changes.

> Is this dynamic unload a new thing?  I had never had this problem in  
> the past until I upgraded.  I think I was running 0.9.1 . . . maybe  
> 0.7.5.  (i think .5, not in front of me at the moment)

No, but normally you get away with it because the library gets loaded
at the same location as the first time.  If you're unlucky the dynamic
loader puts it somewhere else and it crashes.  This element of "luck"
means that unrelated changes to ejabberd can cause crashes to become
more frequent.

Oh, and I recreated the workaround.  I'll attach it.

  Brian

-------------- next part --------------
Index: src/ejabberd_app.erl
===================================================================
--- src/ejabberd_app.erl	(revision 424)
+++ src/ejabberd_app.erl	(working copy)
@@ -19,6 +19,7 @@
 -include("ejabberd.hrl").
 
 start(normal, _Args) ->
+    ok = erl_ddll:load_driver(ejabberd:get_so_path(), tls_drv),
     application:start(sasl),
     randoms:start(),
     db_init(),


More information about the ejabberd mailing list