Date: Tue, 10 Sep 2013 12:16:17 -0400 (EDT) From: Vivek Khera <vivek@khera.org> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/181994: ejabberd crashes with openssl+zlib Message-ID: <20130910161617.2E20517225B@lorax.kcilink.com> Resent-Message-ID: <201309101630.r8AGU2de003885@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 181994 >Category: ports >Synopsis: ejabberd crashes with openssl+zlib >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 10 16:30:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Vivek Khera >Release: FreeBSD 9.1-RELEASE-p2 amd64 >Organization: >Environment: System: FreeBSD lorax.kcilink.com 9.1-RELEASE-p2 FreeBSD 9.1-RELEASE-p2 #3 r249094: Thu Apr 4 09:05:07 EDT 2013 vivek@lorax.kcilink.com:/usr/obj/u/lorax1/usr9/src/sys/KCI64 amd64 >Description: I'm *really* not sure who's "fault" this is... but when ejabberd is built with openssl 1.0.1e from ports, it drops core every time it attempts to make a TLS s2s connection to proxy.eu.jabber.org. My reading of the gdb output shows it croaks in some function inside libz.so. I rebuilt openssl without support for zlib, and the problem went away. Comparing the configuration to the base system openssl, I see that zlib is also disabled there, so I feel confident that this is an acceptable solution. That said, none of my other applications had any problems with zlib support in openssl: apache, subversion, postfix, openvpn, opendkim, nrpe2, etc. but I don't know if they even tried to use compression. >How-To-Repeat: Here's what GDB had to say about the core dump (program exited signal 11) (gdb) where #0 0x0000000807faac62 in deflateCopy () from /usr/lib/libz.so #1 0x0000000807fab455 in deflateSetDictionary () from /usr/lib/libz.so #2 0x0000000807fabe97 in deflate () from /usr/lib/libz.so #3 0x000000080747dbae in zlib_stateful_compress_block () from /usr/local/lib/libcrypto.so.8 #4 0x000000080747ce22 in COMP_compress_block () from /usr/local/lib/libcrypto.so.8 #5 0x0000000807939eee in ssl3_do_compress () from /usr/local/lib/libssl.so.8 #6 0x000000080793a0b4 in do_ssl3_write () from /usr/local/lib/libssl.so.8 #7 0x000000080793a5ec in ssl3_write_bytes () from /usr/local/lib/libssl.so.8 #8 0x000000080793cb1d in ssl3_do_write () from /usr/local/lib/libssl.so.8 #9 0x0000000807936420 in ssl3_connect () from /usr/local/lib/libssl.so.8 #10 0x0000000807da2d93 in tls_drv_control () from /usr/local/lib/erlang/lib/ejabberd-2.1.13/priv/lib/tls_drv.so #11 0x000000000048641f in erts_port_control () #12 0x00000000004fd0cf in port_control_3 () #13 0x000000000052dd1e in process_main () #14 0x0000000000498b5c in erts_test_next_pid () #15 0x0000000000594ce9 in ethr_thr_join () #16 0x00000008010840a4 in pthread_getprio () from /lib/libthr.so.3 #17 0x0000000000000000 in ?? () Cannot access memory at address 0x7fffff7ed000 (gdb) >Fix: rebuild openssl port without zlib support. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130910161617.2E20517225B>