[asterisk-bugs] [Asterisk 0014157]: Asterisk revision 166901 segfault during park using Aastra SPRE function to park extension

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jan 12 14:42:13 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14157 
====================================================================== 
Reported By:                aragon
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   14157
Category:                   Features/Parking
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.23-rc3 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 166901 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-12-31 16:32 CST
Last Modified:              2009-01-12 14:42 CST
====================================================================== 
Summary:                    Asterisk revision 166901 segfault during park using
Aastra SPRE function to park extension
Description: 
features.conf
parkext=700

Aastra programmable key configured as spre:700

Aastra phone answers incoming call from another SIP extension.
Aastra user presses PFK to send caller to park orbit.
Aastra phone automatically grabs line 2 key puts line 1 on hold and plays
back park extension 701 on line 2.
Asterisk segfaults
Line 1 remains on hold and blinking on Aastra phone for a short time.




Asterisk segfaults


====================================================================== 

---------------------------------------------------------------------- 
 (0097525) aragon (reporter) - 2009-01-12 14:42
 http://bugs.digium.com/view.php?id=14157#c97525 
---------------------------------------------------------------------- 
Hi Murf

Updated to Asterisk revision 168494

Reproduced segfault with SIP transfer or spre SIP transfer

Here is Asterisk CLI during spre transfer (I had to park a few calls to
segfault Asterisk)

 Extension Changed 6002[default-local] new state InUse for Notify User
6001
 Extension Changed 6002[default-local] new state InUse for Notify User
6010
 Extension Changed 6002[default-local] new state InUse for Notify User
6002
    -- Executing [6001 at default-super:1] GotoIf("SIP/6002-b7d28240", "0?3")
in new stack
    -- Executing [6001 at default-super:2] Set("SIP/6002-b7d28240",
"GROUP(OUTGOING)=6002") in new stack
    -- Executing [6001 at default-super:3] Set("SIP/6002-b7d28240",
"OUTBOUND_GROUP_ONCE=6001 at INCOMING") in new stack
    -- Executing [6001 at default-super:4] Set("SIP/6002-b7d28240",
"GROUPCOUNT=0") in new stack
    -- Executing [6001 at default-super:5] Set("SIP/6002-b7d28240",
"GROUPCOUNT2=0") in new stack
    -- Executing [6001 at default-super:6] Set("SIP/6002-b7d28240",
"DB(default/wrapup/6001/lastcall)=1231792614.11") in new stack
    -- Executing [6001 at default-super:7] Macro("SIP/6002-b7d28240",
"default-dial|SIP/6001|6001|default|20|en|b6001 at default|twWkKM(all-tapi^1231792614.11)||default||Local/0 at default-local-devices|vm")
in new stack
    -- Executing [s at macro-default-dial:1] NoOp("SIP/6002-b7d28240", ""CALL
TO LOCAL EXTENSION FROM 6002(Reception 6002)"") in new stack
    -- Executing [s at macro-default-dial:2] UserEvent("SIP/6002-b7d28240",
"TAPI|TAPIEVENT: LINE_NEWCALL default") in new stack
    -- Executing [s at macro-default-dial:3] UserEvent("SIP/6002-b7d28240",
"TAPI|TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_OFFERING") in new stack
    -- Executing [s at macro-default-dial:4] UserEvent("SIP/6002-b7d28240",
"TAPI|TAPIEVENT: SET CALLERID ") in new stack
    -- Executing [s at macro-default-dial:5] UserEvent("SIP/6002-b7d28240",
"TAPI|TAPIEVENT: LINE_CALLINFO LINECALLINFOSTATE_CALLERID") in new stack
    -- Executing [s at macro-default-dial:6] AGI("SIP/6002-b7d28240",
"/var/www/scopserv/telephony/scripts/agi/dial.php") in new stack
    -- Launched AGI Script
/var/www/scopserv/telephony/scripts/agi/dial.php
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: Added extension
'6001' to extension map.
    -- AGI Script Executing Application: (SetMusicOnHold) Options:
(default)
    -- AGI Script Executing Application: (MixMonitor) Options:
(6002:_1231792614.11.WAV|b)
  == Begin MixMonitor Recording SIP/6002-b7d28240
  == Parsing '/etc/asterisk/manager.conf': Found
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: Extension State
for '6001' is '0'.
    -- AGI Script Executing Application: (NoOp) Options: (STATUS:)
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php:
-------------------------------------------------------------------------------
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: Doing the action
dial
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: Caller ID number
is '6002'
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: DbSet
default/6001/CallTrace to 6002
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: Dial string is
SIP/6001|20|twWkKM(all-tapi^1231792614.11)T|.
    -- AGI Script Executing Application: (Dial) Options:
(SIP/6001|20|twWkKM(all-tapi^1231792614.11)T|)
 Extension Changed 6001[default-local] new state Ringing for Notify User
6001
 Extension Changed 6001[default-local] new state Ringing for Notify User
6002
 Extension Changed 6001[default-local] new state Ringing for Notify User
6010
    -- Called 6001
    -- SIP/6001-08d5dfa0 is ringing
    -- SIP/6001-08d5dfa0 answered SIP/6002-b7d28240
 Extension Changed 6001[default-local] new state InUse for Notify User
6001
 Extension Changed 6001[default-local] new state InUse for Notify User
6002
 Extension Changed 6001[default-local] new state InUse for Notify User
6010
    -- Executing [s at macro-all-tapi:1] UserEvent("SIP/6001-08d5dfa0",
"TAPI|TAPIEVENT [~1231792614.11] LINE_CALLSTATE LINECALLSTATE_CONNECTED")
in new stack
 Extension Changed 6001[default-local] new state Hold for Notify User
6001
 Extension Changed 6001[default-local] new state Hold for Notify User
6002
 Extension Changed 6001[default-local] new state Hold for Notify User
6010
    -- Started music on hold, class 'default', on SIP/6002-b7d28240
    -- Executing [7000 at default-super:1] Park("SIP/6001-b7d6d090", "") in
new stack
  == Parked SIP/6001-b7d6d090 on 7001 at parkedcalls. Will timeout back to
extension [default-super] s, 1 in 45 seconds
    -- Added extension '7001' priority 1 to parkedcalls
    -- <SIP/6001-b7d6d090> Playing 'digits/7' (language 'en')
    -- <SIP/6001-b7d6d090> Playing 'digits/0' (language 'en')
    -- <SIP/6001-b7d6d090> Playing 'digits/0' (language 'en')
    -- <SIP/6001-b7d6d090> Playing 'digits/1' (language 'en')
    -- Started music on hold, class 'default', on SIP/6001-b7d6d090
  == Spawn extension (default-super, s, 1) exited non-zero on
'SIP/6001-b7d6d090'
    -- Stopped music on hold on SIP/6001-b7d6d090
  == Parking: f=(nil) and type=-100
  == SIP/6001-b7d6d090 got tired of being parked
[Jan 12 15:37:03] NOTICE[8572]: cdr.c:431 check_post: CDR on channel
'SIP/6001-b7d6d090' already posted
[Jan 12 15:37:03] NOTICE[8572]: cdr.c:431 check_post: CDR on channel
'SIP/6001-b7d6d090' already posted
[Jan 12 15:37:03] ERROR[8572]: channel.c:1229 ast_channel_free: Unable to
find channel in list to free. Assuming it has already been done.
[Jan 12 15:37:03] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:428
__ast_pthread_mutex_lock: channel.c line 1233 (ast_channel_free): Error
obtaining mutex: Invalid argument
[Jan 12 15:37:03] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:511
__ast_pthread_mutex_unlock: channel.c line 1234 (ast_channel_free): mutex
'&chan->lock' freed more times than we've locked!
[Jan 12 15:37:03] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:528
__ast_pthread_mutex_unlock: channel.c line 1234 (ast_channel_free): Error
releasing mutex: Invalid argument
[Jan 12 15:37:03] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:428
__ast_pthread_mutex_lock: channel.c line 1243 (ast_channel_free): Error
obtaining mutex: Invalid argument
[Jan 12 15:37:03] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:511
__ast_pthread_mutex_unlock: channel.c line 1244 (ast_channel_free): mutex
'&chan->lock' freed more times than we've locked!
[Jan 12 15:37:03] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:528
__ast_pthread_mutex_unlock: channel.c line 1244 (ast_channel_free): Error
releasing mutex: Invalid argument
[Jan 12 15:37:03] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:316
__ast_pthread_mutex_destroy: channel.c line 1301 (ast_channel_free): Error:
attempt to destroy invalid mutex '&chan->lock'.
[Jan 12 15:37:03] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:511
__ast_pthread_mutex_unlock: channel.c line 1305 (ast_channel_free): mutex
'&(&channels)->lock' freed more times than we've locked!
[Jan 12 15:37:03] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:528
__ast_pthread_mutex_unlock: channel.c line 1305 (ast_channel_free): Error
releasing mutex: Operation not permitted
    -- Registered IAX2 to '99.229.92.69', who sees us as
216.235.8.130:24186 with no messages waiting

  == Parsing '/etc/asterisk/manager.conf': Found
  == Parsing '/etc/asterisk/manager.conf': Found
  == Parsing '/etc/asterisk/manager.conf': Found
 Extension Changed 6001[default-local] new state InUse for Notify User
6001
    -- Stopped music on hold on SIP/6002-b7d28240
 Extension Changed 6001[default-local] new state InUse for Notify User
6002
 Extension Changed 6001[default-local] new state InUse for Notify User
6010
    -- Executing [h at macro-default-dial:1] ResetCDR("SIP/6002-b7d28240",
"w") in new stack
    -- Executing [h at macro-default-dial:2] NoCDR("SIP/6002-b7d28240", "")
in new stack
    -- Executing [h at macro-default-dial:3] UserEvent("SIP/6002-b7d28240",
"TAPI|TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_IDLE") in new stack
    -- Executing [h at macro-default-dial:4] System("SIP/6002-b7d28240",
"/var/www/scopserv/telephony/scripts/billing/cdr.sh 1231792614.11") in new
stack
 Extension Changed 6001[default-local] new state Idle for Notify User
6001
 Extension Changed 6001[default-local] new state Idle for Notify User
6002
 Extension Changed 6001[default-local] new state Idle for Notify User
6010
    -- AGI Script /var/www/scopserv/telephony/scripts/agi/dial.php
completed, returning 0
    -- Executing [6001 at default-super:8] GotoIf("SIP/6002-b7d28240",
"1?9:10") in new stack
    -- Goto (default-super,6001,9)
    -- Executing [6001 at default-super:9] Hangup("SIP/6002-b7d28240", "") in
new stack
  == Spawn extension (default-super, 6001, 9) exited non-zero on
'SIP/6002-b7d28240'
 Extension Changed 6002[default-local] new state Idle for Notify User
6001
 Extension Changed 6002[default-local] new state Idle for Notify User
6010
 Extension Changed 6002[default-local] new state Idle for Notify User
6002
  == End MixMonitor Recording SIP/6002-b7d28240
    -- Saved useragent "SipSpkr v2.01" for peer 2001
 Extension Changed 6002[default-local] new state InUse for Notify User
6001
 Extension Changed 6002[default-local] new state InUse for Notify User
6010
 Extension Changed 6002[default-local] new state InUse for Notify User
6002
    -- Executing [6001 at default-super:1] GotoIf("SIP/6002-b7d2c928", "0?3")
in new stack
    -- Executing [6001 at default-super:2] Set("SIP/6002-b7d2c928",
"GROUP(OUTGOING)=6002") in new stack
    -- Executing [6001 at default-super:3] Set("SIP/6002-b7d2c928",
"OUTBOUND_GROUP_ONCE=6001 at INCOMING") in new stack
    -- Executing [6001 at default-super:4] Set("SIP/6002-b7d2c928",
"GROUPCOUNT=0") in new stack
    -- Executing [6001 at default-super:5] Set("SIP/6002-b7d2c928",
"GROUPCOUNT2=0") in new stack
    -- Executing [6001 at default-super:6] Set("SIP/6002-b7d2c928",
"DB(default/wrapup/6001/lastcall)=1231792651.14") in new stack
    -- Executing [6001 at default-super:7] Macro("SIP/6002-b7d2c928",
"default-dial|SIP/6001|6001|default|20|en|b6001 at default|twWkKM(all-tapi^1231792651.14)||default||Local/0 at default-local-devices|vm")
in new stack
    -- Executing [s at macro-default-dial:1] NoOp("SIP/6002-b7d2c928", ""CALL
TO LOCAL EXTENSION FROM 6002(Reception 6002)"") in new stack
    -- Executing [s at macro-default-dial:2] UserEvent("SIP/6002-b7d2c928",
"TAPI|TAPIEVENT: LINE_NEWCALL default") in new stack
    -- Executing [s at macro-default-dial:3] UserEvent("SIP/6002-b7d2c928",
"TAPI|TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_OFFERING") in new stack
    -- Executing [s at macro-default-dial:4] UserEvent("SIP/6002-b7d2c928",
"TAPI|TAPIEVENT: SET CALLERID ") in new stack
    -- Executing [s at macro-default-dial:5] UserEvent("SIP/6002-b7d2c928",
"TAPI|TAPIEVENT: LINE_CALLINFO LINECALLINFOSTATE_CALLERID") in new stack
    -- Executing [s at macro-default-dial:6] AGI("SIP/6002-b7d2c928",
"/var/www/scopserv/telephony/scripts/agi/dial.php") in new stack
    -- Launched AGI Script
/var/www/scopserv/telephony/scripts/agi/dial.php
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: Added extension
'6001' to extension map.
    -- AGI Script Executing Application: (SetMusicOnHold) Options:
(default)
    -- AGI Script Executing Application: (MixMonitor) Options:
(6002:_1231792651.14.WAV|b)
  == Begin MixMonitor Recording SIP/6002-b7d2c928
  == Parsing '/etc/asterisk/manager.conf': Found
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: Extension State
for '6001' is '0'.
    -- AGI Script Executing Application: (NoOp) Options: (STATUS:)
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php:
-------------------------------------------------------------------------------
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: Doing the action
dial
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: Caller ID number
is '6002'
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: DbSet
default/6001/CallTrace to 6002
  ==  /var/www/scopserv/telephony/scripts/agi/dial.php: Dial string is
SIP/6001|20|twWkKM(all-tapi^1231792651.14)T|.
    -- AGI Script Executing Application: (Dial) Options:
(SIP/6001|20|twWkKM(all-tapi^1231792651.14)T|)
 Extension Changed 6001[default-local] new state Ringing for Notify User
6001
 Extension Changed 6001[default-local] new state Ringing for Notify User
6002
 Extension Changed 6001[default-local] new state Ringing for Notify User
6010
    -- Called 6001
    -- SIP/6001-08d5dfa0 is ringing
[Jan 12 15:37:32] NOTICE[8590]: chan_iax2.c:8974 __iax2_poke_noanswer:
Peer 'iaxmodem0' is now UNREACHABLE! Time: 1
 Extension Changed 6001[default-local] new state InUse for Notify User
6001
 Extension Changed 6001[default-local] new state InUse for Notify User
6002
 Extension Changed 6001[default-local] new state InUse for Notify User
6010
    -- SIP/6001-08d5dfa0 answered SIP/6002-b7d2c928
    -- Executing [s at macro-all-tapi:1] UserEvent("SIP/6001-08d5dfa0",
"TAPI|TAPIEVENT [~1231792651.14] LINE_CALLSTATE LINECALLSTATE_CONNECTED")
in new stack
 Extension Changed 6001[default-local] new state Hold for Notify User
6001
 Extension Changed 6001[default-local] new state Hold for Notify User
6002
 Extension Changed 6001[default-local] new state Hold for Notify User
6010
    -- Started music on hold, class 'default', on SIP/6002-b7d2c928
    -- Executing [7000 at default-super:1] Park("SIP/6001-b7d3c9a8", "") in
new stack
  == Parked SIP/6001-b7d3c9a8 on 7001 at parkedcalls. Will timeout back to
extension [default-super] s, 1 in 45 seconds
    -- Added extension '7001' priority 1 to parkedcalls
    -- <SIP/6001-b7d3c9a8> Playing 'digits/7' (language 'en')
    -- <SIP/6001-b7d3c9a8> Playing 'digits/0' (language 'en')
    -- <SIP/6001-b7d3c9a8> Playing 'digits/0' (language 'en')
    -- <SIP/6001-b7d3c9a8> Playing 'digits/1' (language 'en')
    -- Started music on hold, class 'default', on SIP/6001-b7d3c9a8
  == Spawn extension (default-super, s, 1) exited non-zero on
'SIP/6001-b7d3c9a8'
    -- Stopped music on hold on SIP/6001-b7d3c9a8
[Jan 12 15:37:39] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:428
__ast_pthread_mutex_lock: channel.c line 2489 (ast_indicate_data): Error
obtaining mutex: Invalid argument
[Jan 12 15:37:39] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:511
__ast_pthread_mutex_unlock: channel.c line 2493 (ast_indicate_data): mutex
'&chan->lock' freed more times than we've locked!
[Jan 12 15:37:39] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:528
__ast_pthread_mutex_unlock: channel.c line 2493 (ast_indicate_data): Error
releasing mutex: Invalid argument
[Jan 12 15:37:39] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:428
__ast_pthread_mutex_lock: channel.c line 2489 (ast_indicate_data): Error
obtaining mutex: Invalid argument
[Jan 12 15:37:39] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:511
__ast_pthread_mutex_unlock: channel.c line 2493 (ast_indicate_data): mutex
'&chan->lock' freed more times than we've locked!
[Jan 12 15:37:39] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:528
__ast_pthread_mutex_unlock: channel.c line 2493 (ast_indicate_data): Error
releasing mutex: Invalid argument
[Jan 12 15:37:39] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:428
__ast_pthread_mutex_lock: channel.c line 2489 (ast_indicate_data): Error
obtaining mutex: Invalid argument
[Jan 12 15:37:39] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:511
__ast_pthread_mutex_unlock: channel.c line 2493 (ast_indicate_data): mutex
'&chan->lock' freed more times than we've locked!
[Jan 12 15:37:39] ERROR[8572]:
/dar/build/asterisk-1.4.23/include/asterisk/lock.h:528
__ast_pthread_mutex_unlock: channel.c line 2493 (ast_indicate_data): Error
releasing mutex: Invalid argument
[Jan 12 15:37:42] NOTICE[8586]: chan_iax2.c:8053 socket_process: Peer
'iaxmodem0' is now REACHABLE! Time: 3
    -- Stopped music on hold on SIP/6002-b7d2c928
    -- Executing [h at macro-default-dial:1] ResetCDR("SIP/6002-b7d2c928",
"w") in new stack
    -- Executing [h at macro-default-dial:2] NoCDR("SIP/6002-b7d2c928", "")
in new stack
    -- Executing [h at macro-default-dial:3] UserEvent("SIP/6002-b7d2c928",
"TAPI|TAPIEVENT: LINE_CALLSTATE LINECALLSTATE_IDLE") in new stack
    -- Executing [h at macro-default-dial:4] System("SIP/6002-b7d2c928",
"/var/www/scopserv/telephony/scripts/billing/cdr.sh 1231792651.14") in new
stack
  == Spawn extension (macro-default-dial, s, 6) exited non-zero on
'SIP/6002-b7d2c928' in macro 'default-dial'
  == Spawn extension (default-super, 6001, 7) exited non-zero on
'SIP/6002-b7d2c928'
  == End MixMonitor Recording SIP/6002-b7d2c928
 Extension Changed 6001[default-local] new state Idle for Notify User
6001
 Extension Changed 6001[default-local] new state Idle for Notify User
6002
 Extension Changed 6001[default-local] new state Idle for Notify User
6010
 Extension Changed 6002[default-local] new state Idle for Notify User
6001
 Extension Changed 6002[default-local] new state Idle for Notify User
6010
 Extension Changed 6002[default-local] new state Idle for Notify User
6002

Disconnected from Asterisk server
Executing last minute cleanups

I will attach gdb as jan12spresegfault.txt and pcap 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-01-12 14:42 aragon         Note Added: 0097525                          
======================================================================




More information about the asterisk-bugs mailing list