Bugs item #2968918, was opened at 2010-03-11 21:05
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2968918&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: load_tm update for dispatcher
Initial Comment:
The dispatcher module is still using
find_export/load_tm instead of load_tm_api
Without that the "probing" of gateways doesnt; work since the tm module can;t be pulled in.
I manaully patched the code and now i can see the OPTIONS/INFO requests on the wire.
my patch is too messy to submit. It's a simple patch though...
-bill
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2968918&group_…
Module: sip-router
Branch: kamailio_3.0
Commit: 0822a9caf751d2fb28ac398fd60cc2583308aa94
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0822a9c…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Mar 11 21:08:20 2010 +0100
mem: fix f_malloc big fragments bug
In some situation, when dealing with several big free fragments
(>16k) f_malloc would wrongly choose a fragment with a smaller
size then requested. This would create the impression that someone
arbitrarily overwrites the memory.
First symptoms were some tls crashes reported by
Klaus Darilion klaus.darilion(a)nic.at.
Reproduced using the malloc_test module.
(cherry picked from commit c7099d0a1204120277cf662cc05ab35180d89538)
---
mem/f_malloc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mem/f_malloc.c b/mem/f_malloc.c
index c49a252..2c05fe6 100644
--- a/mem/f_malloc.c
+++ b/mem/f_malloc.c
@@ -337,7 +337,7 @@ void* fm_malloc(struct fm_block* qm, unsigned long size)
hash=fm_bmp_first_set(qm, GET_HASH(size));
if (likely(hash>=0)){
f=&(qm->free_hash[hash].first);
- if (likely(hash<=F_MALLOC_OPTIMIZE)) /* return first match */
+ if (likely(hash<=F_MALLOC_OPTIMIZE/ROUNDTO)) /* return first match */
goto found;
for(;(*f); f=&((*f)->u.nxt_free))
if ((*f)->size>=size) goto found;
@@ -346,7 +346,7 @@ void* fm_malloc(struct fm_block* qm, unsigned long size)
for(hash=GET_HASH(size);hash<F_HASH_SIZE;hash++){
f=&(qm->free_hash[hash].first);
#if 0
- if (likely(hash<=F_MALLOC_OPTIMIZE)) /* return first match */
+ if (likely(hash<=F_MALLOC_OPTIMIZE/ROUNDTO)) /* return first match */
goto found;
#endif
for(;(*f); f=&((*f)->u.nxt_free))
Module: sip-router
Branch: sr_3.0
Commit: b8592ad5ea877cf1299519ed209110cc59e87995
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b8592ad…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Mar 11 21:08:20 2010 +0100
mem: fix f_malloc big fragments bug
In some situation, when dealing with several big free fragments
(>16k) f_malloc would wrongly choose a fragment with a smaller
size then requested. This would create the impression that someone
arbitrarily overwrites the memory.
First symptoms were some tls crashes reported by
Klaus Darilion klaus.darilion(a)nic.at.
Reproduced using the malloc_test module.
(cherry picked from commit c7099d0a1204120277cf662cc05ab35180d89538)
---
mem/f_malloc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mem/f_malloc.c b/mem/f_malloc.c
index c49a252..2c05fe6 100644
--- a/mem/f_malloc.c
+++ b/mem/f_malloc.c
@@ -337,7 +337,7 @@ void* fm_malloc(struct fm_block* qm, unsigned long size)
hash=fm_bmp_first_set(qm, GET_HASH(size));
if (likely(hash>=0)){
f=&(qm->free_hash[hash].first);
- if (likely(hash<=F_MALLOC_OPTIMIZE)) /* return first match */
+ if (likely(hash<=F_MALLOC_OPTIMIZE/ROUNDTO)) /* return first match */
goto found;
for(;(*f); f=&((*f)->u.nxt_free))
if ((*f)->size>=size) goto found;
@@ -346,7 +346,7 @@ void* fm_malloc(struct fm_block* qm, unsigned long size)
for(hash=GET_HASH(size);hash<F_HASH_SIZE;hash++){
f=&(qm->free_hash[hash].first);
#if 0
- if (likely(hash<=F_MALLOC_OPTIMIZE)) /* return first match */
+ if (likely(hash<=F_MALLOC_OPTIMIZE/ROUNDTO)) /* return first match */
goto found;
#endif
for(;(*f); f=&((*f)->u.nxt_free))
Module: sip-router
Branch: master
Commit: c7099d0a1204120277cf662cc05ab35180d89538
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c7099d0…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Mar 11 21:08:20 2010 +0100
mem: fix f_malloc big fragments bug
In some situation, when dealing with several big free fragments
(>16k) f_malloc would wrongly choose a fragment with a smaller
size then requested. This would create the impression that someone
arbitrarily overwrites the memory.
First symptoms were some tls crashes reported by
Klaus Darilion klaus.darilion(a)nic.at.
Reproduced using the malloc_test module.
---
mem/f_malloc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mem/f_malloc.c b/mem/f_malloc.c
index c49a252..2c05fe6 100644
--- a/mem/f_malloc.c
+++ b/mem/f_malloc.c
@@ -337,7 +337,7 @@ void* fm_malloc(struct fm_block* qm, unsigned long size)
hash=fm_bmp_first_set(qm, GET_HASH(size));
if (likely(hash>=0)){
f=&(qm->free_hash[hash].first);
- if (likely(hash<=F_MALLOC_OPTIMIZE)) /* return first match */
+ if (likely(hash<=F_MALLOC_OPTIMIZE/ROUNDTO)) /* return first match */
goto found;
for(;(*f); f=&((*f)->u.nxt_free))
if ((*f)->size>=size) goto found;
@@ -346,7 +346,7 @@ void* fm_malloc(struct fm_block* qm, unsigned long size)
for(hash=GET_HASH(size);hash<F_HASH_SIZE;hash++){
f=&(qm->free_hash[hash].first);
#if 0
- if (likely(hash<=F_MALLOC_OPTIMIZE)) /* return first match */
+ if (likely(hash<=F_MALLOC_OPTIMIZE/ROUNDTO)) /* return first match */
goto found;
#endif
for(;(*f); f=&((*f)->u.nxt_free))
Module: sip-router
Branch: master
Commit: 0ff010fa5777a2c9c8ef477079323828e2362781
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0ff010f…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Mar 11 19:38:04 2010 +0100
malloc_test: new module for testing/debugging memory problems
malloc_test is a new module for stressing the memory allocators
and easily simulating out-of-memory conditions or memory leaks.
Implemented RPCs:
mt.mem_alloc size - allocates size bytes
mt.mem_free [size] - frees at least size bytes. If size is missing
frees everything allocated by any malloc_test test function.
mt.mem_used - amount of currently allocated mem. by malloc_test.
mt.mem_rnd_alloc min max total [unit] - allocates total
<unit> bytes in chunks with the size randomly chosen between min
and max. <unit> is optional and can be one of b-bytes, k - kb,
m - mb, g -gb.
mt.mem_test_start min max total min_int max_int total_time [unit]
starts a malloc test that will take total_time to execute.
Memory allocations will be performed at intervals randomly
chosen between min_int and max_int (in ms). Each allocation will
have a randomly chosen size between min and max <unit> bytes.
After total <unit> bytes are allocated, everything is
released/freed again and the allocations are restarted. The
total_time is expressed in milliseconds.
Several tests can be run in the same time.
mt.mem_test_stop id - stops the test identified by id.
mt.mem_test_destroy id - destroys the test identified by id
(besides stopping it, it also frees all the data, including the
statistics).
mt.mem_test_destroy_all - destroys all the running or stopped
tests.
mt.mem_test_list [id] - Prints data about test id (running time,
total allocations, errors a.s.o.). If id is missing, it will lists
all the tests.
Script functions:
mt_mem_alloc(size) - equivalent to the mt.mem_alloc RPC.
mt_mem_free(size) - equivalent to the mt.mem_free RPC.
---
modules/malloc_test/Makefile | 15 +
modules/malloc_test/doc/Makefile | 4 +
modules/malloc_test/doc/functions.xml | 56 ++
modules/malloc_test/doc/malloc_test.xml | 47 ++
modules/malloc_test/doc/params.xml | 48 ++
modules/malloc_test/malloc_test.c | 887 +++++++++++++++++++++++++++++++
6 files changed, 1057 insertions(+), 0 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=0ff…