[JDEV] Jabberd 1.4.2 - Memory Leak !

Bernino Lind lind at hlgroup.dk
Thu Jun 12 17:12:05 CDT 2003


The memory usage of jabber is a bit of pig, since all data is kept in
ram.

This is part of the architecture of jabber and makes things go faster.

Ram is cheap.

So, is this really a memory leak or is it just a consequence of the
design of jabber?

BTW an OS that crashes due to 100% RAM usage is a poor OS. I dont know
about linux but *BSD has kernel mechanisms to protect against such
foolish behaviour. An OS that crashes the process running wild in Ram is
very much sane, since the Ram needs to be used by very serious tasks as
well as userland apps, so:

Lets not panic...

best regards,
Bernino Lind




-----Original Message-----
From: jdev-admin at jabber.org [mailto:jdev-admin at jabber.org] On Behalf Of
Asif Ahsan
Sent: Tuesday, May 06, 2003 12:43 AM
To: jdev at jabber.org
Subject: [JDEV] Jabberd 1.4.2 - Memory Leak !


Hi All,

Denying registration from XDB FILE causes memory leak ! I am running 
Jabberd
1.4.2 with some modification to allow only certain users to the system. 
However
I've found out denying registration is causing accumulating memory leak

To validate me experiment, I've done some testing with original Jabber 
source code.
(1.4.2) without any modification elsewhere except xdb_file.c
To reproduce the bug please follow the instructions below (I've used 
RedHat 7.2).

1) Return NULL from function : xdb_file_full  and return r_ERR from 
xbd_file_phandler
(I've commented out the functions and added the returns)
2) Rebuild Jabberd
3) Run process viewer and see the memory usage of jabberd.
4) Now try to register for a new account - Make sure the account doesn't

exist.
5) Keep trying and you will see the memory utilization is going up
slowly.

It took me a lot (Few thousands) of  login attempt to consume 512 MB of 
my systems memory completely.
Then Jabberd crashed.

Anyone has any idea ! It is very critical for me since my setup will get

few thousand failed
login attempts everyday. Any help will be appreciated.


Thank you,
Asif Ahsan




_______________________________________________
jdev mailing list
jdev at jabber.org
http://mailman.jabber.org/listinfo/jdev




More information about the JDev mailing list