[asterisk-bugs] [JIRA] (ASTERISK-25804) asterisk crash related to pjsip endpoint reginstration

LEI FU (JIRA) noreply at issues.asterisk.org
Fri Feb 19 22:04:56 CST 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-25804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

LEI FU updated ASTERISK-25804:
------------------------------

    Description: 
I use pjsip for sip phone registration, asterisk restart randomly(about 10 times per day), since I have another server use pjsip to register to a SIP provide and no problem, I think it's something to do with registrar part. I tried centos 6.7, centos 7 and ubuntu 14, it's same, sometimes it's segmentation fault, sometimes it's bla bla magic number...

phone: yealink, grand stream

tried several asterisk 13, all same, tried clone from asterisk pjsip or download pjsip2.4.5 , same

pjsip

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:7060
local_net=127.0.0.1/32
local_net=10.105.127.0/18
external_media_address= **public ip**
external_signaling_address= **public ip**

[8001 at pbx.myrealm.net]
type = endpoint
transport = transport-udp
context = from_endpoint
dtmf_mode = rfc4733
disallow = all
allow = ulaw
direct_media = no
aors = 8001 at pbx.myrealm.net
auth = 8001 at pbx.myrealm.net
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
from_domain = pbx.myrealm.net
set_var= realm=pbx.myrealm.net
set_var= account=8001

[8001 at pbx.myrealm.net]
type = aor
max_contacts = 1
qualify_frequency = 300
remove_existing = true

[8001 at pbx.myrealm.net]
type = auth
auth_type = userpass
username = 8001
password = tiQALgyW9ix1123a
realm = pbx.myrealm.net

=========================
I enabled pjsip logger get the last sip message before asterisk crash

<--- Received SIP request (861 bytes) from UDP:113.227.136.146:5064 --->
REGISTER sip:pbx.cloudox.net SIP/2.0
Via: SIP/2.0/UDP 192.168.1.19:5064;branch=z9hG4bK1801254816;rport
From: <sip:8100 at pbx.myrealm.net>;tag=153708276
To: <sip:8100 at pbx.myrealm.net>
Call-ID: 1678985608-5064-1 at BJC.BGI.B.BJ
CSeq: 3694 REGISTER
Contact: <sip:8100 at 192.168.1.19:5064>;reg-id=3;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B822CEF4F>"
Authorization: Digest username="8100", realm="pbx.myrealm.net", nonce="1455940510/ee33a5e1303cdf893f015be21efae5ac", uri="sip:pbx.myrealm.net", response="4bbde86d5a022dd33eaab3c2f1de4318", algorithm=md5, cnonce="07765106", opaque="42cf2d0e0037626e", qop=auth, nc=00000002
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GXP2100 1.0.3.30
Supported: path
Expires: 3600
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


<--- Transmitting SIP response (474 bytes) to UDP:113.227.136.146:5064 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.19:5064;rport=5064;received=113.227.136.146;branch=z9hG4bK1801254816
Call-ID: 1678985608-5064-1 at BJC.BGI.B.BJ
From: <sip:8100 at pbx.myrealm.net>;tag=153708276
To: <sip:8100 at pbx.myrealm.net>;tag=z9hG4bK1801254816
CSeq: 3694 REGISTER
WWW-Authenticate: Digest  realm="pbx.myrealm.net",nonce="1455940539/acc632cf4ebf10c4ffd7b020c2f51c7f",opaque="5a9f639723bb9ede",stale=true,algorithm=md5,qop="auth"
Content-Length:  0


<--- Received SIP request (861 bytes) from UDP:113.227.136.146:5064 --->
REGISTER sip:pbx.myrealm.net SIP/2.0
Via: SIP/2.0/UDP 192.168.1.19:5064;branch=z9hG4bK1534706642;rport
From: <sip:8100 at pbx.myrealm.net>;tag=153708276
To: <sip:8100 at pbx.myrealm.net>
Call-ID: 1678985608-5064-1 at BJC.BGI.B.BJ
CSeq: 3695 REGISTER
Contact: <sip:8100 at 192.168.1.19:5064>;reg-id=3;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B822CEF4F>"
Authorization: Digest username="8100", realm="pbx.myrealm.net", nonce="1455940539/acc632cf4ebf10c4ffd7b020c2f51c7f", uri="sip:pbx.cloudox.net", response="0cb599ec9810ce8fc8e472792f77a7ab", algorithm=md5, cnonce="15141890", opaque="5a9f639723bb9ede", qop=auth, nc=00000001
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GXP2100 1.0.3.30
Supported: path
Expires: 3600
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


VM_127_204_centos*CLI>
Disconnected from Asterisk server 



when I was writing this, I keep watching asterisk reboot and get backtrace from terminal:

[root at VM_127_204_centos tmp]# *** glibc detected *** /usr/sbin/asterisk: double free or corruption (out): 0x00007fa588005c20 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x75f4e)[0x7fa5b122bf4e]
/lib64/libc.so.6(+0x78cf0)[0x7fa5b122ecf0]
/usr/lib/asterisk/modules/res_pjsip_registrar.so(+0x2691)[0x7fa571395691]
/usr/lib/libpjsip.so.2(pjsip_endpt_process_rx_data+0x123)[0x7fa5adbb6773]
/usr/lib/asterisk/modules/res_pjsip.so(+0x1f321)[0x7fa58c779321]
/usr/sbin/asterisk(ast_taskprocessor_execute+0x10d)[0x5dba8c]
/usr/sbin/asterisk[0x5e44a5]
/usr/sbin/asterisk(ast_taskprocessor_execute+0x10d)[0x5dba8c]
/usr/sbin/asterisk[0x5e2b2d]
/usr/sbin/asterisk[0x5e413c]
/usr/sbin/asterisk[0x5e3eec]
/usr/sbin/asterisk[0x5efa98]
/lib64/libpthread.so.0(+0x7aa1)[0x7fa5b20e3aa1]
/lib64/libc.so.6(clone+0x6d)[0x7fa5b129e93d]
======= Memory map: ========
00400000-0073b000 r-xp 00000000 fc:01 240484                             /usr/sbin/asterisk
0093a000-0095d000 rw-p 0033a000 fc:01 240484                             /usr/sbin/asterisk
0095d000-00987000 rw-p 00000000 00:00 0
01074000-024d1000 rw-p 00000000 00:00 0                                  [heap]
7fa566311000-7fa566312000 ---p 00000000 00:00 0
7fa566312000-7fa56638d000 rw-p 00000000 00:00 0
7fa56638d000-7fa56638e000 ---p 00000000 00:00 0
7fa56638e000-7fa566409000 rw-p 00000000 00:00 0
7fa566409000-7fa56640a000 ---p 00000000 00:00 0
7fa56640a000-7fa566485000 rw-p 00000000 00:00 0
7fa566485000-7fa566486000 ---p 00000000 00:00 0
7fa566486000-7fa566501000 rw-p 00000000 00:00 0
7fa566501000-7fa566502000 ---p 00000000 00:00 0
7fa566502000-7fa56657d000 rw-p 00000000 00:00 0
7fa56657d000-7fa56657e000 ---p 00000000 00:00 0
7fa56657e000-7fa5665f9000 rw-p 00000000 00:00 0
7fa5665f9000-7fa5665fa000 ---p 00000000 00:00 0
7fa5665fa000-7fa566675000 rw-p 00000000 00:00 0
7fa566675000-7fa566676000 ---p 00000000 00:00 0
7fa566676000-7fa5666f1000 rw-p 00000000 00:00 0
7fa5666f1000-7fa5666f2000 ---p 00000000 00:00 0
7fa5666f2000-7fa56676d000 rw-p 00000000 00:00 0
7fa56676d000-7fa56676e000 ---p 00000000 00:00 0
7fa56676e000-7fa5667e9000 rw-p 00000000 00:00 0
7fa5667e9000-7fa5667ea000 ---p 00000000 00:00 0
7fa5667ea000-7fa566865000 rw-p 00000000 00:00 0
7fa566865000-7fa566866000 ---p 00000000 00:00 0
7fa566866000-7fa5668e1000 rw-p 00000000 00:00 0
7fa5668e1000-7fa5668e2000 ---p 00000000 00:00 0
7fa5668e2000-7fa56695d000 rw-p 00000000 00:00 0
7fa56695d000-7fa56695e000 ---p 00000000 00:00 0
7fa56695e000-7fa5669d9000 rw-p 00000000 00:00 0
7fa5669d9000-7fa5669da000 ---p 00000000 00:00 0
7fa5669da000-7fa566a55000 rw-p 00000000 00:00 0
7fa566a55000-7fa566a56000 ---p 00000000 00:00 0
7fa566a56000-7fa566ad1000 rw-p 00000000 00:00 0
7fa566ad1000-7fa566ad2000 ---p 00000000 00:00 0
7fa566ad2000-7fa566b4d000 rw-p 00000000 00:00 0
7fa566b4d000-7fa566b4e000 ---p 00000000 00:00 0
7fa566b4e000-7fa566bc9000 rw-p 00000000 00:00 0
7fa566bc9000-7fa566bca000 ---p 00000000 00:00 0
7fa566bca000-7fa566c45000 rw-p 00000000 00:00 0
7fa566c45000-7fa566c46000 ---p 00000000 00:00 0
7fa566c46000-7fa566cc1000 rw-p 00000000 00:00 0
7fa566cc1000-7fa566cc2000 ---p 00000000 00:00 0
7fa566cc2000-7fa566d3d000 rw-p 00000000 00:00 0
7fa566d3d000-7fa566d3e000 ---p 00000000 00:00 0
7fa566d3e000-7fa566db9000 rw-p 00000000 00:00 0
7fa566db9000-7fa566dba000 ---p 00000000 00:00 0
7fa566dba000-7fa566e35000 rw-p 00000000 00:00 0
7fa566e35000-7fa566e36000 ---p 00000000 00:00 0
7fa566e36000-7fa566eb1000 rw-p 00000000 00:00 0
7fa566eb1000-7fa566eb2000 ---p 00000000 00:00 0
7fa566eb2000-7fa566f2d000 rw-p 00000000 00:00 0
7fa566f2d000-7fa566f2e000 ---p 00000000 00:00 0
7fa566f2e000-7fa566fa9000 rw-p 00000000 00:00 0
7fa566fa9000-7fa566faa000 ---p 00000000 00:00 0
7fa566faa000-7fa567025000 rw-p 00000000 00:00 0
7fa567025000-7fa567026000 ---p 00000000 00:00 0
7fa567026000-7fa567a26000 rw-p 00000000 00:00 0
7fa567a26000-7fa567a27000 ---p 00000000 00:00 0
7fa567a27000-7fa567aa2000 rw-p 00000000 00:00 0
7fa567aa2000-7fa567aa5000 r-xp 00000000 fc:01 255941                     /usr/lib/asterisk/modules/app_directed_pickup.so
7fa567aa5000-7fa567ca5000 ---p 00003000 fc:01 255941                     /usr/lib/asterisk/modules/app_directed_pickup.so
7fa567ca5000-7fa567ca6000 rw-p 00003000 fc:01 255941                     /usr/lib/asterisk/modules/app_directed_pickup.so
7fa567ca6000-7fa567ca9000 r-xp 00000000 fc:01 256006                     /usr/lib/asterisk/modules/cel_custom.so
7fa567ca9000-7fa567ea8000 ---p 00003000 fc:01 256006                     /usr/lib/asterisk/modules/cel_custom.so
7fa567ea8000-7fa567ea9000 rw-p 00002000 fc:01 256006                     /usr/lib/asterisk/modules/cel_custom.so
7fa567ea9000-7fa567eab000 r-xp 00000000 fc:01 255997                     /usr/lib/asterisk/modules/format_siren14.so
7fa567eab000-7fa5680aa000 ---p 00002000 fc:01 255997                     /usr/lib/asterisk/modules/format_siren14.so
7fa5680aa000-7fa5680ab000 rw-p 00001000 fc:01 255997                     /usr/lib/asterisk/modules/format_siren14.so
7fa5680ab000-7fa5680ae000 r-xp 00000000 fc:01 256011                     /usr/lib/asterisk/modules/bridge_holding.so
7fa5680ae000-7fa5682ad000 ---p 00003000 fc:01 256011                     /usr/lib/asterisk/modules/bridge_holding.so
7fa5682ad000-7fa5682ae000 rw-p 00002000 fc:01 256011                     /usr/lib/asterisk/modules/bridge_holding.so
7fa5682ae000-7fa5682b0000 r-xp 00000000 fc:01 256036                     /usr/lib/asterisk/modules/func_jitterbuffer.so
7fa5682b0000-7fa5684af000 ---p 00002000 fc:01 256036                     /usr/lib/asterisk/modules/func_jitterbuffer.so
7fa5684af000-7fa5684b0000 rw-p 00001000 fc:01 256036                     /usr/lib/asterisk/modules/func_jitterbuffer.so
7fa5684b0000-7fa5684b2000 r-xp 00000000 fc:01 256097                     /usr/lib/asterisk/modules/res_manager_devicestate.so
7fa5684b2000-7fa5686b1000 ---p 00002000 fc:01 256097                     /usr/lib/asterisk/modules/res_manager_devicestate.so
7fa5686b1000-7fa5686b2000 rw-p 00001000 fc:01 256097                     /usr/lib/asterisk/modules/res_manager_devicestate.so
7fa5686b2000-7fa5686b6000 r-xp 00000000 fc:01 256074                     /usr/lib/asterisk/modules/res_ari_recordings.so
7fa5686b6000-7fa5688b5000 ---p 00004000 fc:01 256074                     /usr/lib/asterisk/modules/res_ari_recordings.so
7fa5688b5000-7fa5688b6000 rw-p 00003000 fc:01 256074                     /usr/lib/asterisk/modules/res_ari_recordings.so
7fa5688b6000-7fa5688b9000 r-xp 00000000 fc:01 256124                     /usr/lib/asterisk/modules/res_pjsip_nat.so
7fa5688b9000-7fa568ab8000 ---p 00003000 fc:01 256124                     /usr/lib/asterisk/modules/res_pjsip_nat.so
7fa568ab8000-7fa568ab9000 rw-p 00002000 fc:01 256124                     /usr/lib/asterisk/modules/res_pjsip_nat.so
7fa568ab9000-7fa568abe000 r-xp 00000000 fc:01 256143                     /usr/lib/asterisk/modules/res_pjsip_t38.so
7fa568abe000-7fa568cbe000 ---p 00005000 fc:01 256143                     /usr/lib/asterisk/modules/res_pjsip_t38.so
7fa568cbe000-7fa568cbf000 rw-p 00005000 fc:01 256143                     /usr/lib/asterisk/modules/res_pjsip_t38.so
7fa568cbf000-7fa568d31000 r-xp 00000000 fc:01 240423                     /usr/lib/libpri.so.1.4
7fa568d31000-7fa568f30000 ---p 00072000 fc:01 240423                     /usr/lib/libpri.so.1.4



  was:
I use pjsip for sip phone registration, asterisk restart randomly(about 10 times per day), since I have another server use pjsip to register to a SIP provide and no problem, I think it's something to do with registrar part. I tried centos 6.7, centos 7 and ubuntu 14, it's same, sometimes it's segmentation fault, sometimes it's bla bla magic number...

phone: yealink t19

tried several asterisk 13, all same, tried clone from asterisk pjsip or download pjsip2.4.5 , same

pjsip

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:7060
local_net=127.0.0.1/32
local_net=10.105.127.0/18
external_media_address= **public ip**
external_signaling_address= **public ip**

[8001 at pbx.myrealm.net]
type = endpoint
transport = transport-udp
context = from_endpoint
dtmf_mode = rfc4733
disallow = all
allow = ulaw
direct_media = no
aors = 8001 at pbx.myrealm.net
auth = 8001 at pbx.myrealm.net
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
from_domain = pbx.myrealm.net
set_var= realm=pbx.myrealm.net
set_var= account=8001

[8001 at pbx.myrealm.net]
type = aor
max_contacts = 1
qualify_frequency = 300
remove_existing = true

[8001 at pbx.myrealm.net]
type = auth
auth_type = userpass
username = 8001
password = tiQALgyW9ix1123a
realm = pbx.myrealm.net


when I was writing this, I keep watching asterisk reboot and get backtrace from terminal:

[root at VM_127_204_centos tmp]# *** glibc detected *** /usr/sbin/asterisk: double free or corruption (out): 0x00007fa588005c20 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x75f4e)[0x7fa5b122bf4e]
/lib64/libc.so.6(+0x78cf0)[0x7fa5b122ecf0]
/usr/lib/asterisk/modules/res_pjsip_registrar.so(+0x2691)[0x7fa571395691]
/usr/lib/libpjsip.so.2(pjsip_endpt_process_rx_data+0x123)[0x7fa5adbb6773]
/usr/lib/asterisk/modules/res_pjsip.so(+0x1f321)[0x7fa58c779321]
/usr/sbin/asterisk(ast_taskprocessor_execute+0x10d)[0x5dba8c]
/usr/sbin/asterisk[0x5e44a5]
/usr/sbin/asterisk(ast_taskprocessor_execute+0x10d)[0x5dba8c]
/usr/sbin/asterisk[0x5e2b2d]
/usr/sbin/asterisk[0x5e413c]
/usr/sbin/asterisk[0x5e3eec]
/usr/sbin/asterisk[0x5efa98]
/lib64/libpthread.so.0(+0x7aa1)[0x7fa5b20e3aa1]
/lib64/libc.so.6(clone+0x6d)[0x7fa5b129e93d]
======= Memory map: ========
00400000-0073b000 r-xp 00000000 fc:01 240484                             /usr/sbin/asterisk
0093a000-0095d000 rw-p 0033a000 fc:01 240484                             /usr/sbin/asterisk
0095d000-00987000 rw-p 00000000 00:00 0
01074000-024d1000 rw-p 00000000 00:00 0                                  [heap]
7fa566311000-7fa566312000 ---p 00000000 00:00 0
7fa566312000-7fa56638d000 rw-p 00000000 00:00 0
7fa56638d000-7fa56638e000 ---p 00000000 00:00 0
7fa56638e000-7fa566409000 rw-p 00000000 00:00 0
7fa566409000-7fa56640a000 ---p 00000000 00:00 0
7fa56640a000-7fa566485000 rw-p 00000000 00:00 0
7fa566485000-7fa566486000 ---p 00000000 00:00 0
7fa566486000-7fa566501000 rw-p 00000000 00:00 0
7fa566501000-7fa566502000 ---p 00000000 00:00 0
7fa566502000-7fa56657d000 rw-p 00000000 00:00 0
7fa56657d000-7fa56657e000 ---p 00000000 00:00 0
7fa56657e000-7fa5665f9000 rw-p 00000000 00:00 0
7fa5665f9000-7fa5665fa000 ---p 00000000 00:00 0
7fa5665fa000-7fa566675000 rw-p 00000000 00:00 0
7fa566675000-7fa566676000 ---p 00000000 00:00 0
7fa566676000-7fa5666f1000 rw-p 00000000 00:00 0
7fa5666f1000-7fa5666f2000 ---p 00000000 00:00 0
7fa5666f2000-7fa56676d000 rw-p 00000000 00:00 0
7fa56676d000-7fa56676e000 ---p 00000000 00:00 0
7fa56676e000-7fa5667e9000 rw-p 00000000 00:00 0
7fa5667e9000-7fa5667ea000 ---p 00000000 00:00 0
7fa5667ea000-7fa566865000 rw-p 00000000 00:00 0
7fa566865000-7fa566866000 ---p 00000000 00:00 0
7fa566866000-7fa5668e1000 rw-p 00000000 00:00 0
7fa5668e1000-7fa5668e2000 ---p 00000000 00:00 0
7fa5668e2000-7fa56695d000 rw-p 00000000 00:00 0
7fa56695d000-7fa56695e000 ---p 00000000 00:00 0
7fa56695e000-7fa5669d9000 rw-p 00000000 00:00 0
7fa5669d9000-7fa5669da000 ---p 00000000 00:00 0
7fa5669da000-7fa566a55000 rw-p 00000000 00:00 0
7fa566a55000-7fa566a56000 ---p 00000000 00:00 0
7fa566a56000-7fa566ad1000 rw-p 00000000 00:00 0
7fa566ad1000-7fa566ad2000 ---p 00000000 00:00 0
7fa566ad2000-7fa566b4d000 rw-p 00000000 00:00 0
7fa566b4d000-7fa566b4e000 ---p 00000000 00:00 0
7fa566b4e000-7fa566bc9000 rw-p 00000000 00:00 0
7fa566bc9000-7fa566bca000 ---p 00000000 00:00 0
7fa566bca000-7fa566c45000 rw-p 00000000 00:00 0
7fa566c45000-7fa566c46000 ---p 00000000 00:00 0
7fa566c46000-7fa566cc1000 rw-p 00000000 00:00 0
7fa566cc1000-7fa566cc2000 ---p 00000000 00:00 0
7fa566cc2000-7fa566d3d000 rw-p 00000000 00:00 0
7fa566d3d000-7fa566d3e000 ---p 00000000 00:00 0
7fa566d3e000-7fa566db9000 rw-p 00000000 00:00 0
7fa566db9000-7fa566dba000 ---p 00000000 00:00 0
7fa566dba000-7fa566e35000 rw-p 00000000 00:00 0
7fa566e35000-7fa566e36000 ---p 00000000 00:00 0
7fa566e36000-7fa566eb1000 rw-p 00000000 00:00 0
7fa566eb1000-7fa566eb2000 ---p 00000000 00:00 0
7fa566eb2000-7fa566f2d000 rw-p 00000000 00:00 0
7fa566f2d000-7fa566f2e000 ---p 00000000 00:00 0
7fa566f2e000-7fa566fa9000 rw-p 00000000 00:00 0
7fa566fa9000-7fa566faa000 ---p 00000000 00:00 0
7fa566faa000-7fa567025000 rw-p 00000000 00:00 0
7fa567025000-7fa567026000 ---p 00000000 00:00 0
7fa567026000-7fa567a26000 rw-p 00000000 00:00 0
7fa567a26000-7fa567a27000 ---p 00000000 00:00 0
7fa567a27000-7fa567aa2000 rw-p 00000000 00:00 0
7fa567aa2000-7fa567aa5000 r-xp 00000000 fc:01 255941                     /usr/lib/asterisk/modules/app_directed_pickup.so
7fa567aa5000-7fa567ca5000 ---p 00003000 fc:01 255941                     /usr/lib/asterisk/modules/app_directed_pickup.so
7fa567ca5000-7fa567ca6000 rw-p 00003000 fc:01 255941                     /usr/lib/asterisk/modules/app_directed_pickup.so
7fa567ca6000-7fa567ca9000 r-xp 00000000 fc:01 256006                     /usr/lib/asterisk/modules/cel_custom.so
7fa567ca9000-7fa567ea8000 ---p 00003000 fc:01 256006                     /usr/lib/asterisk/modules/cel_custom.so
7fa567ea8000-7fa567ea9000 rw-p 00002000 fc:01 256006                     /usr/lib/asterisk/modules/cel_custom.so
7fa567ea9000-7fa567eab000 r-xp 00000000 fc:01 255997                     /usr/lib/asterisk/modules/format_siren14.so
7fa567eab000-7fa5680aa000 ---p 00002000 fc:01 255997                     /usr/lib/asterisk/modules/format_siren14.so
7fa5680aa000-7fa5680ab000 rw-p 00001000 fc:01 255997                     /usr/lib/asterisk/modules/format_siren14.so
7fa5680ab000-7fa5680ae000 r-xp 00000000 fc:01 256011                     /usr/lib/asterisk/modules/bridge_holding.so
7fa5680ae000-7fa5682ad000 ---p 00003000 fc:01 256011                     /usr/lib/asterisk/modules/bridge_holding.so
7fa5682ad000-7fa5682ae000 rw-p 00002000 fc:01 256011                     /usr/lib/asterisk/modules/bridge_holding.so
7fa5682ae000-7fa5682b0000 r-xp 00000000 fc:01 256036                     /usr/lib/asterisk/modules/func_jitterbuffer.so
7fa5682b0000-7fa5684af000 ---p 00002000 fc:01 256036                     /usr/lib/asterisk/modules/func_jitterbuffer.so
7fa5684af000-7fa5684b0000 rw-p 00001000 fc:01 256036                     /usr/lib/asterisk/modules/func_jitterbuffer.so
7fa5684b0000-7fa5684b2000 r-xp 00000000 fc:01 256097                     /usr/lib/asterisk/modules/res_manager_devicestate.so
7fa5684b2000-7fa5686b1000 ---p 00002000 fc:01 256097                     /usr/lib/asterisk/modules/res_manager_devicestate.so
7fa5686b1000-7fa5686b2000 rw-p 00001000 fc:01 256097                     /usr/lib/asterisk/modules/res_manager_devicestate.so
7fa5686b2000-7fa5686b6000 r-xp 00000000 fc:01 256074                     /usr/lib/asterisk/modules/res_ari_recordings.so
7fa5686b6000-7fa5688b5000 ---p 00004000 fc:01 256074                     /usr/lib/asterisk/modules/res_ari_recordings.so
7fa5688b5000-7fa5688b6000 rw-p 00003000 fc:01 256074                     /usr/lib/asterisk/modules/res_ari_recordings.so
7fa5688b6000-7fa5688b9000 r-xp 00000000 fc:01 256124                     /usr/lib/asterisk/modules/res_pjsip_nat.so
7fa5688b9000-7fa568ab8000 ---p 00003000 fc:01 256124                     /usr/lib/asterisk/modules/res_pjsip_nat.so
7fa568ab8000-7fa568ab9000 rw-p 00002000 fc:01 256124                     /usr/lib/asterisk/modules/res_pjsip_nat.so
7fa568ab9000-7fa568abe000 r-xp 00000000 fc:01 256143                     /usr/lib/asterisk/modules/res_pjsip_t38.so
7fa568abe000-7fa568cbe000 ---p 00005000 fc:01 256143                     /usr/lib/asterisk/modules/res_pjsip_t38.so
7fa568cbe000-7fa568cbf000 rw-p 00005000 fc:01 256143                     /usr/lib/asterisk/modules/res_pjsip_t38.so
7fa568cbf000-7fa568d31000 r-xp 00000000 fc:01 240423                     /usr/lib/libpri.so.1.4
7fa568d31000-7fa568f30000 ---p 00072000 fc:01 240423                     /usr/lib/libpri.so.1.4




> asterisk crash related to pjsip endpoint reginstration
> ------------------------------------------------------
>
>                 Key: ASTERISK-25804
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25804
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: pjproject/pjsip
>    Affects Versions: 13.1.1, 13.7.2
>         Environment: centos 6.7 64bit, kernel 2.6.32-573.18.1.el6.x86_64
> pjsip 2.4.5
>            Reporter: LEI FU
>         Attachments: backtrace.txt
>
>
> I use pjsip for sip phone registration, asterisk restart randomly(about 10 times per day), since I have another server use pjsip to register to a SIP provide and no problem, I think it's something to do with registrar part. I tried centos 6.7, centos 7 and ubuntu 14, it's same, sometimes it's segmentation fault, sometimes it's bla bla magic number...
> phone: yealink, grand stream
> tried several asterisk 13, all same, tried clone from asterisk pjsip or download pjsip2.4.5 , same
> pjsip
> [transport-udp]
> type = transport
> protocol = udp
> bind = 0.0.0.0:7060
> local_net=127.0.0.1/32
> local_net=10.105.127.0/18
> external_media_address= **public ip**
> external_signaling_address= **public ip**
> [8001 at pbx.myrealm.net]
> type = endpoint
> transport = transport-udp
> context = from_endpoint
> dtmf_mode = rfc4733
> disallow = all
> allow = ulaw
> direct_media = no
> aors = 8001 at pbx.myrealm.net
> auth = 8001 at pbx.myrealm.net
> rtp_symmetric=yes
> force_rport=yes
> rewrite_contact=yes
> from_domain = pbx.myrealm.net
> set_var= realm=pbx.myrealm.net
> set_var= account=8001
> [8001 at pbx.myrealm.net]
> type = aor
> max_contacts = 1
> qualify_frequency = 300
> remove_existing = true
> [8001 at pbx.myrealm.net]
> type = auth
> auth_type = userpass
> username = 8001
> password = tiQALgyW9ix1123a
> realm = pbx.myrealm.net
> =========================
> I enabled pjsip logger get the last sip message before asterisk crash
> <--- Received SIP request (861 bytes) from UDP:113.227.136.146:5064 --->
> REGISTER sip:pbx.cloudox.net SIP/2.0
> Via: SIP/2.0/UDP 192.168.1.19:5064;branch=z9hG4bK1801254816;rport
> From: <sip:8100 at pbx.myrealm.net>;tag=153708276
> To: <sip:8100 at pbx.myrealm.net>
> Call-ID: 1678985608-5064-1 at BJC.BGI.B.BJ
> CSeq: 3694 REGISTER
> Contact: <sip:8100 at 192.168.1.19:5064>;reg-id=3;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B822CEF4F>"
> Authorization: Digest username="8100", realm="pbx.myrealm.net", nonce="1455940510/ee33a5e1303cdf893f015be21efae5ac", uri="sip:pbx.myrealm.net", response="4bbde86d5a022dd33eaab3c2f1de4318", algorithm=md5, cnonce="07765106", opaque="42cf2d0e0037626e", qop=auth, nc=00000002
> X-Grandstream-PBX: true
> Max-Forwards: 70
> User-Agent: Grandstream GXP2100 1.0.3.30
> Supported: path
> Expires: 3600
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
> Content-Length: 0
> <--- Transmitting SIP response (474 bytes) to UDP:113.227.136.146:5064 --->
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP 192.168.1.19:5064;rport=5064;received=113.227.136.146;branch=z9hG4bK1801254816
> Call-ID: 1678985608-5064-1 at BJC.BGI.B.BJ
> From: <sip:8100 at pbx.myrealm.net>;tag=153708276
> To: <sip:8100 at pbx.myrealm.net>;tag=z9hG4bK1801254816
> CSeq: 3694 REGISTER
> WWW-Authenticate: Digest  realm="pbx.myrealm.net",nonce="1455940539/acc632cf4ebf10c4ffd7b020c2f51c7f",opaque="5a9f639723bb9ede",stale=true,algorithm=md5,qop="auth"
> Content-Length:  0
> <--- Received SIP request (861 bytes) from UDP:113.227.136.146:5064 --->
> REGISTER sip:pbx.myrealm.net SIP/2.0
> Via: SIP/2.0/UDP 192.168.1.19:5064;branch=z9hG4bK1534706642;rport
> From: <sip:8100 at pbx.myrealm.net>;tag=153708276
> To: <sip:8100 at pbx.myrealm.net>
> Call-ID: 1678985608-5064-1 at BJC.BGI.B.BJ
> CSeq: 3695 REGISTER
> Contact: <sip:8100 at 192.168.1.19:5064>;reg-id=3;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000B822CEF4F>"
> Authorization: Digest username="8100", realm="pbx.myrealm.net", nonce="1455940539/acc632cf4ebf10c4ffd7b020c2f51c7f", uri="sip:pbx.cloudox.net", response="0cb599ec9810ce8fc8e472792f77a7ab", algorithm=md5, cnonce="15141890", opaque="5a9f639723bb9ede", qop=auth, nc=00000001
> X-Grandstream-PBX: true
> Max-Forwards: 70
> User-Agent: Grandstream GXP2100 1.0.3.30
> Supported: path
> Expires: 3600
> Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
> Content-Length: 0
> VM_127_204_centos*CLI>
> Disconnected from Asterisk server 
> when I was writing this, I keep watching asterisk reboot and get backtrace from terminal:
> [root at VM_127_204_centos tmp]# *** glibc detected *** /usr/sbin/asterisk: double free or corruption (out): 0x00007fa588005c20 ***
> ======= Backtrace: =========
> /lib64/libc.so.6(+0x75f4e)[0x7fa5b122bf4e]
> /lib64/libc.so.6(+0x78cf0)[0x7fa5b122ecf0]
> /usr/lib/asterisk/modules/res_pjsip_registrar.so(+0x2691)[0x7fa571395691]
> /usr/lib/libpjsip.so.2(pjsip_endpt_process_rx_data+0x123)[0x7fa5adbb6773]
> /usr/lib/asterisk/modules/res_pjsip.so(+0x1f321)[0x7fa58c779321]
> /usr/sbin/asterisk(ast_taskprocessor_execute+0x10d)[0x5dba8c]
> /usr/sbin/asterisk[0x5e44a5]
> /usr/sbin/asterisk(ast_taskprocessor_execute+0x10d)[0x5dba8c]
> /usr/sbin/asterisk[0x5e2b2d]
> /usr/sbin/asterisk[0x5e413c]
> /usr/sbin/asterisk[0x5e3eec]
> /usr/sbin/asterisk[0x5efa98]
> /lib64/libpthread.so.0(+0x7aa1)[0x7fa5b20e3aa1]
> /lib64/libc.so.6(clone+0x6d)[0x7fa5b129e93d]
> ======= Memory map: ========
> 00400000-0073b000 r-xp 00000000 fc:01 240484                             /usr/sbin/asterisk
> 0093a000-0095d000 rw-p 0033a000 fc:01 240484                             /usr/sbin/asterisk
> 0095d000-00987000 rw-p 00000000 00:00 0
> 01074000-024d1000 rw-p 00000000 00:00 0                                  [heap]
> 7fa566311000-7fa566312000 ---p 00000000 00:00 0
> 7fa566312000-7fa56638d000 rw-p 00000000 00:00 0
> 7fa56638d000-7fa56638e000 ---p 00000000 00:00 0
> 7fa56638e000-7fa566409000 rw-p 00000000 00:00 0
> 7fa566409000-7fa56640a000 ---p 00000000 00:00 0
> 7fa56640a000-7fa566485000 rw-p 00000000 00:00 0
> 7fa566485000-7fa566486000 ---p 00000000 00:00 0
> 7fa566486000-7fa566501000 rw-p 00000000 00:00 0
> 7fa566501000-7fa566502000 ---p 00000000 00:00 0
> 7fa566502000-7fa56657d000 rw-p 00000000 00:00 0
> 7fa56657d000-7fa56657e000 ---p 00000000 00:00 0
> 7fa56657e000-7fa5665f9000 rw-p 00000000 00:00 0
> 7fa5665f9000-7fa5665fa000 ---p 00000000 00:00 0
> 7fa5665fa000-7fa566675000 rw-p 00000000 00:00 0
> 7fa566675000-7fa566676000 ---p 00000000 00:00 0
> 7fa566676000-7fa5666f1000 rw-p 00000000 00:00 0
> 7fa5666f1000-7fa5666f2000 ---p 00000000 00:00 0
> 7fa5666f2000-7fa56676d000 rw-p 00000000 00:00 0
> 7fa56676d000-7fa56676e000 ---p 00000000 00:00 0
> 7fa56676e000-7fa5667e9000 rw-p 00000000 00:00 0
> 7fa5667e9000-7fa5667ea000 ---p 00000000 00:00 0
> 7fa5667ea000-7fa566865000 rw-p 00000000 00:00 0
> 7fa566865000-7fa566866000 ---p 00000000 00:00 0
> 7fa566866000-7fa5668e1000 rw-p 00000000 00:00 0
> 7fa5668e1000-7fa5668e2000 ---p 00000000 00:00 0
> 7fa5668e2000-7fa56695d000 rw-p 00000000 00:00 0
> 7fa56695d000-7fa56695e000 ---p 00000000 00:00 0
> 7fa56695e000-7fa5669d9000 rw-p 00000000 00:00 0
> 7fa5669d9000-7fa5669da000 ---p 00000000 00:00 0
> 7fa5669da000-7fa566a55000 rw-p 00000000 00:00 0
> 7fa566a55000-7fa566a56000 ---p 00000000 00:00 0
> 7fa566a56000-7fa566ad1000 rw-p 00000000 00:00 0
> 7fa566ad1000-7fa566ad2000 ---p 00000000 00:00 0
> 7fa566ad2000-7fa566b4d000 rw-p 00000000 00:00 0
> 7fa566b4d000-7fa566b4e000 ---p 00000000 00:00 0
> 7fa566b4e000-7fa566bc9000 rw-p 00000000 00:00 0
> 7fa566bc9000-7fa566bca000 ---p 00000000 00:00 0
> 7fa566bca000-7fa566c45000 rw-p 00000000 00:00 0
> 7fa566c45000-7fa566c46000 ---p 00000000 00:00 0
> 7fa566c46000-7fa566cc1000 rw-p 00000000 00:00 0
> 7fa566cc1000-7fa566cc2000 ---p 00000000 00:00 0
> 7fa566cc2000-7fa566d3d000 rw-p 00000000 00:00 0
> 7fa566d3d000-7fa566d3e000 ---p 00000000 00:00 0
> 7fa566d3e000-7fa566db9000 rw-p 00000000 00:00 0
> 7fa566db9000-7fa566dba000 ---p 00000000 00:00 0
> 7fa566dba000-7fa566e35000 rw-p 00000000 00:00 0
> 7fa566e35000-7fa566e36000 ---p 00000000 00:00 0
> 7fa566e36000-7fa566eb1000 rw-p 00000000 00:00 0
> 7fa566eb1000-7fa566eb2000 ---p 00000000 00:00 0
> 7fa566eb2000-7fa566f2d000 rw-p 00000000 00:00 0
> 7fa566f2d000-7fa566f2e000 ---p 00000000 00:00 0
> 7fa566f2e000-7fa566fa9000 rw-p 00000000 00:00 0
> 7fa566fa9000-7fa566faa000 ---p 00000000 00:00 0
> 7fa566faa000-7fa567025000 rw-p 00000000 00:00 0
> 7fa567025000-7fa567026000 ---p 00000000 00:00 0
> 7fa567026000-7fa567a26000 rw-p 00000000 00:00 0
> 7fa567a26000-7fa567a27000 ---p 00000000 00:00 0
> 7fa567a27000-7fa567aa2000 rw-p 00000000 00:00 0
> 7fa567aa2000-7fa567aa5000 r-xp 00000000 fc:01 255941                     /usr/lib/asterisk/modules/app_directed_pickup.so
> 7fa567aa5000-7fa567ca5000 ---p 00003000 fc:01 255941                     /usr/lib/asterisk/modules/app_directed_pickup.so
> 7fa567ca5000-7fa567ca6000 rw-p 00003000 fc:01 255941                     /usr/lib/asterisk/modules/app_directed_pickup.so
> 7fa567ca6000-7fa567ca9000 r-xp 00000000 fc:01 256006                     /usr/lib/asterisk/modules/cel_custom.so
> 7fa567ca9000-7fa567ea8000 ---p 00003000 fc:01 256006                     /usr/lib/asterisk/modules/cel_custom.so
> 7fa567ea8000-7fa567ea9000 rw-p 00002000 fc:01 256006                     /usr/lib/asterisk/modules/cel_custom.so
> 7fa567ea9000-7fa567eab000 r-xp 00000000 fc:01 255997                     /usr/lib/asterisk/modules/format_siren14.so
> 7fa567eab000-7fa5680aa000 ---p 00002000 fc:01 255997                     /usr/lib/asterisk/modules/format_siren14.so
> 7fa5680aa000-7fa5680ab000 rw-p 00001000 fc:01 255997                     /usr/lib/asterisk/modules/format_siren14.so
> 7fa5680ab000-7fa5680ae000 r-xp 00000000 fc:01 256011                     /usr/lib/asterisk/modules/bridge_holding.so
> 7fa5680ae000-7fa5682ad000 ---p 00003000 fc:01 256011                     /usr/lib/asterisk/modules/bridge_holding.so
> 7fa5682ad000-7fa5682ae000 rw-p 00002000 fc:01 256011                     /usr/lib/asterisk/modules/bridge_holding.so
> 7fa5682ae000-7fa5682b0000 r-xp 00000000 fc:01 256036                     /usr/lib/asterisk/modules/func_jitterbuffer.so
> 7fa5682b0000-7fa5684af000 ---p 00002000 fc:01 256036                     /usr/lib/asterisk/modules/func_jitterbuffer.so
> 7fa5684af000-7fa5684b0000 rw-p 00001000 fc:01 256036                     /usr/lib/asterisk/modules/func_jitterbuffer.so
> 7fa5684b0000-7fa5684b2000 r-xp 00000000 fc:01 256097                     /usr/lib/asterisk/modules/res_manager_devicestate.so
> 7fa5684b2000-7fa5686b1000 ---p 00002000 fc:01 256097                     /usr/lib/asterisk/modules/res_manager_devicestate.so
> 7fa5686b1000-7fa5686b2000 rw-p 00001000 fc:01 256097                     /usr/lib/asterisk/modules/res_manager_devicestate.so
> 7fa5686b2000-7fa5686b6000 r-xp 00000000 fc:01 256074                     /usr/lib/asterisk/modules/res_ari_recordings.so
> 7fa5686b6000-7fa5688b5000 ---p 00004000 fc:01 256074                     /usr/lib/asterisk/modules/res_ari_recordings.so
> 7fa5688b5000-7fa5688b6000 rw-p 00003000 fc:01 256074                     /usr/lib/asterisk/modules/res_ari_recordings.so
> 7fa5688b6000-7fa5688b9000 r-xp 00000000 fc:01 256124                     /usr/lib/asterisk/modules/res_pjsip_nat.so
> 7fa5688b9000-7fa568ab8000 ---p 00003000 fc:01 256124                     /usr/lib/asterisk/modules/res_pjsip_nat.so
> 7fa568ab8000-7fa568ab9000 rw-p 00002000 fc:01 256124                     /usr/lib/asterisk/modules/res_pjsip_nat.so
> 7fa568ab9000-7fa568abe000 r-xp 00000000 fc:01 256143                     /usr/lib/asterisk/modules/res_pjsip_t38.so
> 7fa568abe000-7fa568cbe000 ---p 00005000 fc:01 256143                     /usr/lib/asterisk/modules/res_pjsip_t38.so
> 7fa568cbe000-7fa568cbf000 rw-p 00005000 fc:01 256143                     /usr/lib/asterisk/modules/res_pjsip_t38.so
> 7fa568cbf000-7fa568d31000 r-xp 00000000 fc:01 240423                     /usr/lib/libpri.so.1.4
> 7fa568d31000-7fa568f30000 ---p 00072000 fc:01 240423                     /usr/lib/libpri.so.1.4



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list