Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171551 - net-im/ejabberd-1.1.3 segmentation fault on client connection
Summary: net-im/ejabberd-1.1.3 segmentation fault on client connection
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Tony Vroon (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-20 12:54 UTC by Benjamin Gehrels
Modified: 2007-04-13 08:11 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Gehrels 2007-03-20 12:54:57 UTC
since today morning ejabberd allways crashes on the first client connection.

Reproducible: Always

Steps to Reproduce:
1. env HOME=/var/run/jabber start-stop-daemon --start --quiet --chuid jabber:jabber --exec /usr/bin/beam --startas /usr/bin/ejabberd -- -noshell
2. Start Psi
3. Try to connect to the server

Actual Results:  
Sometimes it spits out something like this:
*** glibc detected *** /usr/lib/erlang/erts-5.5.1/bin/beam: munmap_chunk(): invalid pointer: 0x402001e3 *** 

When I try to start it with
env HOME=/var/run/jabber start-stop-daemon --start --quiet --chuid jabber:jabber --exec /usr/bin/beam --startas /usr/bin/ejabberd -- -noshell
(without --detach) There an then try to connect to the server it says:

angela agavenwurm # env HOME=/var/run/jabber start-stop-daemon --start --quiet --chuid jabber:jabber --exec /usr/bin/beam --startas /usr/bin/ejabberd -- -noshell
dets: file "/var/spool/jabber/offline_msg.DAT" not properly closed, repairing ...

=INFO REPORT==== 20-Mar-2007::13:39:54 ===
I(<0.214.0>:ejabberd_listener:90): (#Port<0.304>) Accepted connection {{84,175,150,153},62881} -> {{83,125,32,181},5223}

=INFO REPORT==== 20-Mar-2007::13:39:54 ===
I(<0.255.0>:ejabberd_c2s:382): ({tlssock,#Port<0.304>,#Port<0.308>}) Accepted legacy authentication for benjamin@jabber.gehrels.info/Psi

=INFO REPORT==== 20-Mar-2007::13:39:55 ===
I(<0.257.0>:ejabberd_s2s_out:106): started: {"jabber.gehrels.info",
                                             "aim.jabber.gehrels.info",
                                             {new,"3524843974"}}

=INFO REPORT==== 20-Mar-2007::13:39:55 ===
I(<0.258.0>:ejabberd_s2s_out:106): started: {"jabber.gehrels.info",
                                             "icq.jabber.gehrels.info",
                                             {new,"1550302565"}}

=INFO REPORT==== 20-Mar-2007::13:39:55 ===
I(<0.259.0>:ejabberd_s2s_out:106): started: {"jabber.gehrels.info",
                                             "msn.jabber.gehrels.info",
                                             {new,"3394053000"}}

=INFO REPORT==== 20-Mar-2007::13:39:55 ===
I(<0.260.0>:ejabberd_s2s_out:106): started: {"jabber.gehrels.info",
                                             "jabber.ccc.de",
                                             {new,"3106108094"}}

=INFO REPORT==== 20-Mar-2007::13:39:55 ===
I(<0.261.0>:ejabberd_s2s_out:106): started: {"jabber.gehrels.info",
                                             "swissjabber.ch",
                                             {new,"3283460484"}}

=INFO REPORT==== 20-Mar-2007::13:39:55 ===
I(<0.258.0>:ejabberd_s2s_out:662): terminated: normal

=INFO REPORT==== 20-Mar-2007::13:39:55 ===
I(<0.257.0>:ejabberd_s2s_out:662): terminated: normal

=INFO REPORT==== 20-Mar-2007::13:39:55 ===
I(<0.259.0>:ejabberd_s2s_out:662): terminated: normal

=INFO REPORT==== 20-Mar-2007::13:39:55 ===
I(<0.261.0>:ejabberd_s2s_out:466): starttls: {"jabber.gehrels.info",
                                              "swissjabber.ch"}

=INFO REPORT==== 20-Mar-2007::13:39:55 ===
I(<0.260.0>:ejabberd_s2s_out:466): starttls: {"jabber.gehrels.info",
                                              "jabber.ccc.de"}

=INFO REPORT==== 20-Mar-2007::13:39:56 ===
I(<0.215.0>:ejabberd_listener:90): (#Port<0.343>) Accepted connection {{212,112,227,203},38974} -> {{83,125,32,181},5269}

=INFO REPORT==== 20-Mar-2007::13:39:56 ===
I(<0.266.0>:ejabberd_s2s_in:105): started: {gen_tcp,#Port<0.343>}

=INFO REPORT==== 20-Mar-2007::13:39:56 ===
I(<0.266.0>:ejabberd_s2s_in:222): starttls

=INFO REPORT==== 20-Mar-2007::13:39:56 ===
I(<0.215.0>:ejabberd_listener:90): (#Port<0.348>) Accepted connection {{217,10,9,40},41819} -> {{83,125,32,181},5269}

=INFO REPORT==== 20-Mar-2007::13:39:56 ===
I(<0.268.0>:ejabberd_s2s_in:105): started: {gen_tcp,#Port<0.348>}
/usr/bin/ejabberd: line 12: 17991 Segmentation fault      erl -pa /usr/lib/erlang/lib/ejabberd-1.1.3/ebin -sname ejabberd -s ejabberd -ejabberd config \"/etc/jabber/ejabberd.cfg\" log_path \"/var/log/jabber/ejabberd.log\" -kernel inetrc \"/etc/jabber/inetrc\" -sasl sasl_error_logger \{file,\"/var/log/jabber/sasl.log\"\} -mnesia dir \"/var/spool/jabber\" $@


Expected Results:  
serving xmpp

angela agavenwurm # emerge --info
Portage 2.1.2.2 (default-linux/x86/vserver, gcc-4.1.1, glibc-2.5-r0, 2.6.8-022stab078.14 i686)
=================================================================
System uname: 2.6.8-022stab078.14 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.6.14
Timestamp of tree: Tue, 20 Mar 2007 12:30:01 +0000
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s -z combreloc"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/root/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="bash-completion bitmap-fonts cli cracklib dri iconv isdnlog midi ncurses nptl pcre pppd readline reflection session spl ssl truetype-fonts type1-fonts unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mga neomagic nsc nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Tony Vroon (RETIRED) gentoo-dev 2007-03-20 13:23:19 UTC
A version number of the ejabberd ebuild that you are using would be helpful.
Comment 2 Timo Boettcher 2007-03-20 17:29:06 UTC
According to the ejabberd support-forum, this is a bug in openssl that disappears when compiling. I could verify that. openssl-0.9.8d, ejabberd-1.1.2, different versions of erlang(11.2.1, 11.2.2-r1). 
http://ejabberd.jabber.ru/node/1126
Comment 3 Timo Boettcher 2007-03-20 17:30:00 UTC
According to the ejabberd support-forum, this is a bug in openssl that disappears when compiling with USE="-zlib". I could verify that. openssl-0.9.8d, ejabberd-1.1.2, different versions of erlang(11.2.1, 11.2.2-r1). 
http://ejabberd.jabber.ru/node/1126
Comment 4 Bertrand Jacquin 2007-03-20 17:54:58 UTC
Got the same here with ejabberd 1.1.3 (vanilla)

^^ ROOT ^^ ~ # emerge --info                                                                                                            (toothrot) 20/03 18:53:56
Portage 2.1.2.2 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r5 i686)
=================================================================
System uname: 2.6.19-gentoo-r5 i686 VIA Esther processor 2000MHz
Gentoo Base System release 1.12.9
Timestamp of tree: Tue, 20 Mar 2007 15:50:01 +0000
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=i686 -Os -pipe -mmmx -msse -msse2 -msse3"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache1-php4/ext-active/ /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php4/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php4/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php4/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=i686 -Os -pipe -mmmx -msse -msse2 -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS=" http://ftp.dedibox.fr/gentoo/ ftp://ftp.dedibox.fr/gentoo/ #http://ftp.du.se/pub/os/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.blueyonder.co.uk http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://gentoo.ynet.sk/pub http://gentoo.intergenia.de http://gentoo.po.opole.pl http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.switch.ch/ftp/mirror/gentoo/ http://mirror.ovh.net/gentoo-distfiles/ http://mirror.gentoo.no/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ http://ds.thn.htu.se/linux/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="fr"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="bcmath bitmap-fonts bzip2 calendar cddb cli cracklib crypt curl dri exif flash fortran ftp gd gdbm gnutls hardened hardenedphp hash iconv idn imap isdnlog libg++ maildir mcal memlimit midi mmx mysql ncurses nptl nptlonly openssh pam pcntl pcre pdf ppds pppd readline reflection sasl session simplexml sockets spamassassin spl sse sse2 ssl tcpd tidy tiff tokenizer truetype truetype-fonts type1-fonts unicode x86 xmlreader xmlrpc xmlwriter zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mga neomagic nsc nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

resolved with compiling openssl without zlib USE flags as in http://ejabberd.jabber.ru/node/1126
Comment 5 Benjamin Gehrels 2007-03-21 17:06:55 UTC
(In reply to comment #1)
> A version number of the ejabberd ebuild that you are using would be helpful.
> 

d'oh! I've edited the summary - it now includes the version number (1.1.3)
Comment 6 Tony Vroon (RETIRED) gentoo-dev 2007-04-11 14:42:02 UTC
The 1.1.3-r1 ebuild will keep you from merging until you unset the zlib USE-flag for openssl (unless ofcourse you don't have the SSL USE-flag set). Also fixed up the dependencies.
Thank you to both Benjamin & Timo for creating a useful bug report. It is a rare treat to not have to hunt down the solution myself :)

(Whether the bug is in openssl or not is debatable, and as such the die message leaves it in the middle whose fault it is)
Comment 7 Albert Holm 2007-04-12 08:54:58 UTC
I ran into this a while back and could not determine if it was openssl but I solved it by not dynamically linking zlib in openssl. When I upgraded openssl to 0.9.8e I forgot to manually do this, but it seems to work with the troublesome clients anyway. With openssl-0.9.8e everything seem to work with USE="zlib", can anyone else confirm this?
Comment 8 Conrad Kostecki gentoo-dev 2007-04-13 08:11:06 UTC
Well, i don't have this problems with ejabberd 1.1.3 ssl/tls and openssl 0.9.8e with zlib ...