I say first C then a bit of A on top of that to prevent the situation that leads to that.


On Thu, Apr 17, 2008 at 3:51 PM, David Knell <dave@3c.co.uk> wrote:
Hi all -

Just had an interesting FS segfault.  switch_xml_free (called from
mod_xml_cdr) recursed 3500+ times
and, I guess, the thing ran out of stack space.

Having a look at the core dump shows that it's freeing a valid XML CDR
structure for a call which
wasn't cleared for ages; FS sat in a loop playing a prompt.  The net
result would have been a CDR
with a vast number of <application> lines, had the segfault not occurred.

Fixes:
(a) don't get in this situation in the first place;
(b) rewrite switch_xml_free to eliminate recursion;
(c) limit the number of children created in switch_ivr_generate_xml_cdr;
- and probably some more.

My favourite's (c) - any alternatives/objections?  If not, I'll pop this
with a patch in Jira.

Cheers --

Dave

--
David Knell, Director, 3C Limited
T: 020 8114 8901  F: 020 3002 7257  M: 001 415 630 3031
http://www.3c.co.uk


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



--
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org
pstn:213-799-1400