Hello,

you can see the available pkg via sercmd, sending command pkg.stats (match the entry for the pid printing the error). If there is no free memory, then might be a leak.

You can attach with gdb to the pid printing these errors and walk to pkg, you see the commands for gdb at:

http://www.asipto.com/pub/kamailio-devel-guide/#c04troubleshooting

See if you have lot of allocated chunks from same place in source code (ignore those at the beginning, mainly related to cfg parsing) and send the details here.

Cheers,
Daniel

On 12/21/11 10:44 AM, laura testi wrote:
Hi,
we are using the PUA_XMPP and PUA modules from the master branch. When
the modules are started, everything are ok, the presence events from
XMPP are sent to kamailio SIP servers (PUBLISH/SUBSCRIBE) and cached
in the hash. But when there are several thousands records in the hash
tabel, the update_pua function called in the hashT_clean gives a lot
of "No memory left" error when the hashT_clean is waked up from the
time:

ERROR: pua [send_subscribe.c]: No memory left
ERROR: pua [pua.c]: while building tm dlg_t structure

The failed call is:
	td = (dlg_t*)pkg_malloc(size);
	if(td == NULL)
	{
		LM_ERR("No memory left\n");
		return NULL;
	}

in dlg_t* pua_build_dlg_t(ua_pres_t* presentity) function in
send_subscribe.c. The size is about 400 and something... It's
strange.....

Is it the memory leak in the PUA module?



I also try to increase the pkg_memory from 4MB default to 16MB, but it
doesn't help.


Any Idea?

Thanks in advanced

Laura

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda