[JDEV] Memory leak in jabberd 1.4.2
Eugeny Korekin
az at ftc.ru
Fri Mar 14 01:33:02 CST 2003
I've found outh, that there is a memory leak in jabberd 1.4.2 and
jabberd14 from cvs. When jabberd is using external xdb authentification
module(i use xdb_auth_cpile), and user tries to login with _wrong_
password, jabberd aallocates some memory, and do not frees it after auth
attempt. When user uses right password, all is ok. After many
unsuccesful auth attempts jabberd crashes.
Leak is reproducible on Solaris 2.8, 2.9, Redhat Linux 7.1 and Altlinux
Master 2.2
Here is backtrace of the last crash(latest jabberd14 from cvs):
az at reks ~/src/jabberd $ gdb -core core jabberd/jabberd
GNU gdb ALT Linux (5.2.1-alt2)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i586-alt-linux"...
Core was generated by `./jabberd/jabberd -D'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/local/lib/libpth.so.20...done.
Loaded symbols for /usr/local/lib/libpth.so.20
Reading symbols from /lib/i686/libdl.so.2...done.
Loaded symbols for /lib/i686/libdl.so.2
Reading symbols from /lib/i686/libresolv.so.2...done.
Loaded symbols for /lib/i686/libresolv.so.2
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from ./jsm/jsm.so...done.
Loaded symbols for ./jsm/jsm.so
Reading symbols from ./xdb_file/xdb_file.so...done.
Loaded symbols for ./xdb_file/xdb_file.so
Reading symbols from ./pthsock/pthsock_client.so...done.
Loaded symbols for ./pthsock/pthsock_client.so
Reading symbols from ./dnsrv/dnsrv.so...done.
Loaded symbols for ./dnsrv/dnsrv.so
Reading symbols from ./dialback/dialback.so...done.
Loaded symbols for ./dialback/dialback.so
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0 0x40080ba1 in kill () from /lib/i686/libc.so.6
(gdb) bt
#0 0x40080ba1 in kill () from /lib/i686/libc.so.6
#1 0x40080968 in raise () from /lib/i686/libc.so.6
#2 0x4008216d in abort () from /lib/i686/libc.so.6
#3 0x08058229 in pmalloc (p=0x0, size=16) at pool.c:168
#4 0x0805ac3a in spool_new (p=0x0) at str.c:119
#5 0x0805678e in jid_full (id=0x830fca8) at jid.c:167
#6 0x0805491b in xdb_act (xc=0x80cf698, owner=0x830fca8, ns=0x4002ac50
"jabber:iq:auth", act=0x4002ac4a "check", match=0x0, data=0x8380980) at
xdb.c:283
#7 0x4001c872 in mod_auth_plain_jane (m=0x8146d28, arg=0x0) at
mod_auth_plain.c:70
#8 0x40017d28 in js_mapi_call (si=0x80cf648, e=5, packet=0x83818d0,
user=0x830fce8, s=0x0) at modules.c:160
#9 0x40018116 in js_authreg (arg=0x83818d0) at authreg.c:70
#10 0x08054c6b in mtq_main (arg=0x8136ad8) at mtq.c:151
#11 0x40037d18 in pth_spawn_trampoline () from
/usr/local/lib/libpth.so.20
#12 0x4009b124 in makecontext () from /lib/i686/libc.so.6
#13 0x08146bf8 in ?? ()
Cannot access memory at address 0x38b
I am trying to find the cause of leak now, but my poor knowledge of C
and pth prevents me from success...
Any help would be greatly appreciated.
WBW, Eugeny <az at ftc ru>
More information about the JDev
mailing list