ejabberd - Comments for "ejabberd segfaults on TLS connection from client" https://www.ejabberd.im/node/1126 en thanks https://www.ejabberd.im/node/1126#comment-3295 <p>I had the same problems, but also with S2S TLS connections (as posted on the ejabberd mailinglist). I disabled zlib support in openssl, now TLS works and doesn't kill the server daemon.(but it's surely not a nice solution)</p> Sun, 11 Mar 2007 11:32:46 +0000 nik@jabber.linuxlovers.at comment 3295 at https://www.ejabberd.im Dirty solution. https://www.ejabberd.im/node/1126#comment-2787 <p>I have the same problem on Gentoo linux.</p> <p>- ejabberd-1.1.2<br /> - openssl-0.9.7, openssl-0.9.8<br /> - almost any version of erlang from portage<br /> - zlib version 1.2.3 (or -r1, doesn't matter)</p> <p>After playing with gdb I've noticed, that bug appears in zlib module.</p> <p>When I emerge openssl without zlib use flag, this bug vanishes.</p> <p>I think this is ejabberd tls_drv.so bug, because other applications that use openssl work fine with stream compression.</p> Wed, 27 Dec 2006 23:01:43 +0000 zlobnyme comment 2787 at https://www.ejabberd.im Do you use Gentoo too? https://www.ejabberd.im/node/1126#comment-2573 <div class="quote-msg"> <div class="quote-author"><em>lars</em> wrote:</div> <p>I have this problem too on another ejabberd-node. Any debugging information I can provide?</p></div> <p>Do you use Gentoo, too? Which version of: ejabberd, erlang, xmpp4r, openssl libraries?</p> Tue, 21 Nov 2006 22:41:26 +0000 mfoss comment 2573 at https://www.ejabberd.im A work-around for XMPP4R https://www.ejabberd.im/node/1126#comment-2572 <p>I'm having the same problem for weeks now (server is Gentoo, too), sorry for not reporting.</p> <p>If the XMPP4R client is your own, try the following on a Jabber::Client instance:<br /> client.allow_tls = false</p> <p>Obviously ejabberd should be fixed, but you may ping me at xmpp:astro@spaceboyz.net for any bugs you find in XMPP4R's (not very complex) TLS code.</p> Tue, 21 Nov 2006 17:33:31 +0000 Astro comment 2572 at https://www.ejabberd.im Same problem here https://www.ejabberd.im/node/1126#comment-2571 <p>I have this problem too on another ejabberd-node. Any debugging information I can provide?</p> Tue, 21 Nov 2006 14:53:51 +0000 lars comment 2571 at https://www.ejabberd.im After some more monkeying https://www.ejabberd.im/node/1126#comment-2397 <p>After some more monkeying around I've noticed a different manifestation of the problem where glibc catches an invalid pointer and provides a backtrace. For different runs of the same problem I get mostly the segfault version and sometimes this. Something is well and truly botched.</p> <p>=INFO REPORT==== 12-Oct-2006::22:25:37 ===<br /> I(&lt;0.210.0&gt;:ejabberd_listener:90): (#Port&lt;0.317&gt;) Accepted connection<br /> {{127,0,0,1},53263} -&gt; {{127,0,0,1},5222}<br /> D(&lt;0.277.0&gt;:ejabberd_receiver:261) : Received XML on stream = ""<br /> D(&lt;0.276.0&gt;:ejabberd_c2s:1207) : Send XML on stream = "&lt;?xml<br /> version='1.0'?&gt;"<br /> D(&lt;0.276.0&gt;:ejabberd_c2s:1207) : Send XML on stream =<br /> "DIGEST-MD5PLAIN"<br /> D(&lt;0.277.0&gt;:ejabberd_receiver:261) : Received XML on stream = ""<br /> D(&lt;0.277.0&gt;:ejabberd_receiver:261) : Received XML on stream = []<br /> D(&lt;0.276.0&gt;:ejabberd_c2s:1207) : Send XML on stream = ""<br /> D(&lt;0.277.0&gt;:ejabberd_receiver:261) : Received XML on stream = []<br /> *** glibc detected *** /usr/lib/erlang/erts-5.5/bin/beam: free(): invalid<br /> pointer: 0x081748c0 ***<br /> =======<br /> Backtrace: =========<br /> /lib/libc.so.6[0xb7e1ab9b]<br /> /lib/libc.so.6(__libc_free+0x79)[0xb7e1c0d7]<br /> /usr/lib/erlang/erts-5.5/bin/beam[0x806861b]<br /> /lib/libz.so(inflateEnd+0x26)[0xb7f5dce1]<br /> /usr/lib/libcrypto.so.0.9.8[0xb6c4cdef]<br /> /usr/lib/libcrypto.so.0.9.8[0xb6bc3f92]<br /> /usr/lib/libcrypto.so.0.9.8(CRYPTO_free_ex_data+0x2f)[0xb6bc3c17]<br /> /usr/lib/libcrypto.so.0.9.8[0xb6c4cc60]<br /> /usr/lib/libcrypto.so.0.9.8(COMP_CTX_free+0x23)[0xb6c4c8d3]<br /> /usr/lib/libssl.so.0.9.8(ssl_clear_cipher_ctx+0x68)[0xb6762c54]<br /> /usr/lib/libssl.so.0.9.8(SSL_free+0xf5)[0xb6764452]<br /> /usr/lib/erlang/lib/ejabberd-1.1.2/priv/lib/tls_drv.so[0xb7f677f6]<br /> /usr/lib/erlang/erts-5.5/bin/beam[0x8089882]<br /> /usr/lib/erlang/erts-5.5/bin/beam(erts_do_exit_port+0x157)[0x808aa79]<br /> /usr/lib/erlang/erts-5.5/bin/beam(port_close_1+0x31)[0x80b43e9]<br /> /usr/lib/erlang/erts-5.5/bin/beam(process_main+0x39ee)[0x80bcb90]<br /> /usr/lib/erlang/erts-5.5/bin/beam(erl_start+0x854)[0x80731d3]<br /> /usr/lib/erlang/erts-5.5/bin/beam(main+0xe)[0x8067cce]<br /> /lib/libc.so.6(__libc_start_main+0xdc)[0xb7dcf864]<br /> /usr/lib/erlang/erts-5.5/bin/beam(sinh+0x7d)[0x8067c41]<br /> ======= Memory map: ========<br /> 08048000-08103000<br /> r-xp 00000000 08:13 4948676 /usr/lib/erlang/erts-5.5/bin/beam<br /> 08103000-0812c000<br /> rwxp 000ba000 08:13 4948676 /usr/lib/erlang/erts-5.5/bin/beam<br /> 0812c000-081d9000<br /> rwxp 0812c000 00:00 0 [heap]<br /> b6600000-b6608000<br /> rwxp b6600000 00:00 0<br /> b6608000-b6700000<br /> ---p b6608000 00:00 0<br /> b671d000-b6726000 r-xp 00000000 08:13<br /> 4604611 /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc_s.so.1<br /> b6726000-b6727000<br /> rwxp 00008000 08:13 4604611<br /> /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc_s.so.1<br /> b6727000-b6740000<br /> r-xp 00000000 08:13 4885461 /usr/lib/libexpat.so.1.5.0<br /> b6740000-b6742000<br /> rwxp 00019000 08:13 4885461 /usr/lib/libexpat.so.1.5.0<br /> b6742000-b6771000<br /> r-xp 00000000 08:13 4869504 /usr/lib/libssl.so.0.9.8<br /> b6771000-b6775000<br /> rwxp 0002e000 08:13 4869504 /usr/lib/libssl.so.0.9.8<br /> b6792000-b67bc000 r-xp<br /> 00000000 08:13 4767804<br /> /usr/lib/erlang/lib/ejabberd-1.1.2/priv/lib/stringprep_drv.so<br /> b67bc000-b67bd000<br /> rwxp 0002a000 08:13 4767804<br /> /usr/lib/erlang/lib/ejabberd-1.1.2/priv/lib/stringprep_drv.so<br /> b6924000-b6b8c000<br /> rwxp b6924000 00:00 0<br /> b6b8c000-b6c73000<br /> r-xp 00000000 08:13 4869480 /usr/lib/libcrypto.so.0.9.8<br /> b6c73000-b6c88000<br /> rwxp 000e6000 08:13 4869480 /usr/lib/libcrypto.so.0.9.8<br /> b6c88000-b6c8b000<br /> rwxp b6c88000 00:00 0<br /> b6c8b000-b6c8d000 r-xp 00000000 08:13 5374118<br /> /usr/lib/erlang/lib/crypto-1.5/priv/lib/crypto_drv.so<br /> b6c8d000-b6c8e000<br /> rwxp 00001000 08:13 5374118<br /> /usr/lib/erlang/lib/crypto-1.5/priv/lib/crypto_drv.so<br /> b6c8e000-b7291000<br /> rwxp b6c8e000 00:00 0<br /> b7291000-b7292000<br /> ---p b7291000 00:00 0<br /> b7292000-b7dba000<br /> rwxp b7292000 00:00 0<br /> b7dba000-b7eca000 r-xp 00000000 08:13 4575233<br /> /lib/libc-2.4.so<br /> b7eca000-b7ecc000<br /> r-xp 0010f000 08:13 4575233 /lib/libc-2.4.so<br /> b7ecc000-b7ece000<br /> rwxp 00111000 08:13 4575233 /lib/libc-2.4.so<br /> b7ece000-b7ed1000 rwxp<br /> b7ece000 00:00 0<br /> b7ed1000-b7ed8000<br /> r-xp 00000000 08:13 4575209 /lib/librt-2.4.so<br /> b7ed8000-b7eda000 rwxp 00006000 08:13 4575209 /lib/librt-2.4.so<br /> b7eda000-b7edb000<br /> rwxp b7eda000 00:00 0<br /> b7edb000-b7eea000<br /> r-xp 00000000 08:13 4575152 /lib/libpthread-2.4.so<br /> b7eea000-b7eeb000 r-xp 0000e000 08:13 4575152<br /> /lib/libpthread-2.4.so<br /> b7eeb000-b7eec000<br /> rwxp 0000f000 08:13 4575152 /lib/libpthread-2.4.so<br /> b7eec000-b7eee000<br /> rwxp b7eec000 00:00 0<br /> b7eee000-b7f1b000 r-xp 00000000 08:13<br /> 4884778 /lib/libncurses.so.5.5<br /> b7f1b000-b7f23000<br /> rwxp 0002c000 08:13 4884778 /lib/libncurses.so.5.5<br /> b7f23000-b7f24000 rwxp b7f23000 00:00 0<br /> b7f24000-b7f46000<br /> r-xp 00000000 08:13 4575148 /lib/libm-2.4.so<br /> b7f46000-b7f48000<br /> rwxp 00021000 08:13 4575148 /lib/libm-2.4.so<br /> b7f48000-b7f4a000 r-xp 00000000 08:13 4575149<br /> /lib/libdl-2.4.so<br /> b7f4a000-b7f4c000<br /> rwxp 00001000 08:13 4575149 /lib/libdl-2.4.so<br /> b7f51000-b7f52000<br /> r-xp 00000000 08:13 4767802<br /> /usr/lib/erlang/lib/ejabberd-1.1.2/priv/lib/iconv_erl.so<br /> b7f52000-b7f53000<br /> rwxp 00001000 08:13 4767802<br /> /usr/lib/erlang/lib/ejabberd-1.1.2/priv/lib/iconv_erl.so<br /> b7f53000-b7f56000 r-xp<br /> 00000000 08:13 4767792<br /> /usr/lib/erlang/lib/ejabberd-1.1.2/priv/lib/expat_erl.so<br /> b7f56000-b7f57000<br /> rwxp 00003000 08:13 4767792<br /> /usr/lib/erlang/lib/ejabberd-1.1.2/priv/lib/expat_erl.so<br /> b7f57000-b7f65000<br /> r-xp 00000000 08:13 4493993 /lib/libz.so.1.2.3<br /> b7f65000-b7f66000 rwxp 0000d000 08:13 4493993 /lib/libz.so.1.2.3<br /> b7f66000-b7f68000<br /> r-xp 00000000 08:13 4767809<br /> /usr/lib/erlang/lib/ejabberd-1.1.2/priv/lib/tls_drv.so<br /> b7f68000-b7f69000 rwxp 00001000 08:13/usr/bin/ejabberd: line 12:<br /> 14967 Aborted erl -pa /usr/lib/erlang/lib/ejabberd-1.1.2/ebin<br /> -sname ejabberd -s ejabberd -ejabberd config \"/etc/jabber/ejabberd.cfg\"<br /> log_path \"/var/log/jabber/ejabberd.log\" -kernel inetrc<br /> \"/etc/jabber/inetrc\" -sasl sasl_error_logger<br /> \{file,\"/var/log/jabber/sasl.log\"\} -mnesia dir \"/var/spool/jabber\" $@</p> Thu, 12 Oct 2006 22:01:01 +0000 sm3.142 comment 2397 at https://www.ejabberd.im Just for good measure, I https://www.ejabberd.im/node/1126#comment-2398 <p>Just for good measure, I also tried with Erlang/OTP R11B-1 and Erlang/OTP R10B-10. Makes no difference.</p> Thu, 12 Oct 2006 21:57:36 +0000 sm3.142 comment 2398 at https://www.ejabberd.im