[Home]

Summary:ASTERISK-23650: Intermittent segfault in string functions
Reporter:Roel van Meer (rolek)Labels:
Date Opened:2014-04-22 10:31:59Date Closed:2014-05-21 16:39:33
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Functions/func_strings
Versions:SVN 1.8.26.1 12.2.0 Frequency of
Occurrence
Frequent
Related
Issues:
Environment:Slackware linux 13.1, 64-bit, kernel 3.10.24, kernel 3.10.34 Attachments:( 0) backtrace_ast12_2.txt
( 1) backtrace_ast12.txt
( 2) backtrace.txt
( 3) extensions.conf
( 4) mmlog.txt
( 5) valgrind.txt
Description:When an incoming SIP call is received, asterisk crashes. This happens intermittently, sometimes often, sometimes only seldom. The crash seems to happen at or just after a specific entry in my dialplan, which is:
{noformat}
exten => call-queue1,n,Log(NOTICE,${CALLID}: ---${REPLACE(REPLACE(QUEUE_MEMBER_LIST(${INCOMING_ACTION}),"Local/@phoneSIP"),",", )}---)
{noformat}

If the crash occurs, there is no result of the Log() in the asterisk log.

I have been able to distill this to the following reproduction case:
{noformat}
exten => test,1,Set(TEST=Local/220@phone,1)
exten => test,n,Log(NOTICE,---${REPLACE(REPLACE(TEST,"Local/@phoneSIP"),",", )}---)
{noformat}

Note that the original string from the queue memberships was longer: Local/220@phone,SIP/714,Local/210@phone,SIP/195.
Shortening the string makes the crash go away at some point.

The two dialplan lines shown above are a constant reproducer for me.
Comments:By: Roel van Meer (rolek) 2014-04-22 10:33:30.101-0500

backtrace.txt

By: Roel van Meer (rolek) 2014-04-22 10:35:25.771-0500

Dialplan snippet

By: Roel van Meer (rolek) 2014-04-22 10:56:07.462-0500

Valgrind output.

By: Roel van Meer (rolek) 2014-04-23 08:29:01.927-0500

I cannot reproduce this with asterisk 11.7.0.

By: Rusty Newton (rnewton) 2014-04-25 09:42:44.425-0500

Reproduced in Asterisk 12. Took about six calls to get the crash. backtrace_ast12.txt attached.

By: Rusty Newton (rnewton) 2014-04-25 12:42:13.592-0500

Attaching another trace, backtrace_ast12_2.txt with accompanying mmlog.txt gathered with the MALLOC_DEBUG compiler option.

By: Scott Griepentrog (sgriepentrog) 2014-05-21 14:01:10.665-0500

Reported by: Roel van Meer

By: Scott Griepentrog (sgriepentrog) 2014-05-21 14:10:11.038-0500

Reported by: Roel van Meer

By: Scott Griepentrog (sgriepentrog) 2014-05-21 14:10:11.770-0500

Reported by: Roel van Meer

By: Scott Griepentrog (sgriepentrog) 2014-05-21 14:10:12.399-0500

Reported by: Roel van Meer