THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#385 - Possible memory leak when processing sht_reload
User who did this - i (takeshi)

----------
Just in case you want to see them, I have re-uploaded the logs as:
http://wikisend.com/download/342330/kamailio.log.gz  

About latest master, I tested with it, but it failed in the first reload 
attempt.
So I checked with cgdb and I can see you changed the code to use pkg mem 
instead of shm:

 493│         nht.entries = 
(ht_entry_t*)pkg_malloc(nht.htsize*sizeof(ht_entry_t));
 494│         if(nht.entries == NULL)
 495│         {
 496│                 ht_db_close_con();
 497├>                return init_mi_tree(500, MI_ERR_RELOAD, 
MI_ERR_RELOAD_LEN);
 498│         }

So, the problem now is that I don't have enough pkg memory as I am using 
default pkg memory size (4MB) and the reload will require about 25MB:
(gdb) p (nht.htsize*sizeof(ht_entry_t))
$6 = 25165824

So I have rebuilt kamailio with 50MB of PKG memory:
  -#define PKG_MEM_SIZE 4
  +#define PKG_MEM_SIZE 50 
And after that I don't see the problem anymore:

root@LAB-TEST:sip-router# for i in $(seq 0 10000); do echo $i; kamctl fifo 
sht_reload domain;done
... abridged ...
9994
9995
9996
9997
9998
9999
10000

So all seems fine now.
Thanks a lot. And happy new year!
----------

More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=385#comment1262

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.

_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to