Woohoo, thanks so much. Actually that lcr patch fixed it, everything
works great now. Also on a related note can qm_malloc cause SER hangs or
any other bad things? Does it actually fix memory leaks or just help
report them? Thanks again, you rock...
Matt
-----Original Message-----
From: Juha Heinanen [mailto:jh@tutpro.com]
Sent: Wednesday, May 04, 2005 8:30 AM
To: Matt Schulte
Subject: RE: [Serusers] LCR failure syntax
Matt Schulte writes:
FYI, I *finally* got around to doing this. A debug
shows that load_gw
is > in fact loading both gateways..
matt,
8(30980) DEBUG:load_gws(): Added AVP
<lcr_gw_addr,374650ce> >
8(30980) qm_malloc(0xf4edf000, 31) called from
usr_avp.c: add_avp(112)
8(30980) qm_malloc(0xf4edf000, 32) returns address
0xf509a3ec frag.
0xf509a3d4 (size=32) on 1 -th hit > 8(30980) DEBUG:load_gws(): Added
AVP
<lcr_gw_port,0> > 8(30980) qm_malloc(0xf4edf000, 31) called from
usr_avp.c: add_avp(112) > 8(30980) qm_malloc(0xf4edf000, 32) returns
address 0xf509a43c frag. > 0xf509a424 (size=32) on 1 -th hit >
8(30980) DEBUG:load_gws(): Added AVP <lcr_gw_addr,511f7d1> > 8(30980)
qm_malloc(0xf4edf000, 31) called from usr_avp.c: add_avp(112) >
8(30980) qm_malloc(0xf4edf000, 32) returns address 0xf509a48c frag. >
0xf509a474 (size=32) on 1 -th hit > 8(30980) DEBUG:load_gws(): Added
AVP <lcr_gw_port,0>
there was a bug in the debug output of DEBUG:load_gws(), which is fixed
on the current CVS HEAD version and also in current
https://tutpro.com/tmp/lcr-0.9.0.tgz. that, however, would not explain
why load_gw() loads two gws, but next_gw() calls succeed only once.
i checked next_gw() code and it calls search_first_avp
avp = search_first_avp(gw_ap_avp_name_str, addr_port_name, &val);
and if that returns an avp, destroys that avp
destroy_avp(avp);
after first saving its value for further processing. these are the only
function calls related to avps in next_gw() function. so there is no
way the second gw would disappear somewhere unless (1) you use the same
avp name/number for something else too or (2) there is a bug in ser
usr_avp code.
i suggest that you try once more with the current lcr backport.
regarding debugging, unless you are looking for memory leaks, i suggest
you turn off qm_malloc debugs by commenting
-DDBG_QM_MALLOC
in Makefile.defs.
-- juha