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

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


    [ https://issues.asterisk.org/jira/browse/ASTERISK-25804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=229678#comment-229678 ] 

LEI FU commented on ASTERISK-25804:
-----------------------------------

in this case asterisk crash right away when receive a sip register,

Asterisk Ready.
*CLI> Segmentation fault (core dumped)

in log:

[Feb 20 12:06:01] DEBUG[6626] res_pjsip_outbound_registration.c: Attempting scheduled outbound registration attempt to server 'sip:fj.ctcims.cn:5060' from client 'sip:+865925515432 at fj.ctcims.cn'
[Feb 20 12:06:01] DEBUG[6621] pjsip: 	      endpoint Request msg REGISTER/cseq=12616 (tdta0x7f0634005f50) created.
[Feb 20 12:06:01] DEBUG[6621] res_pjsip_outbound_registration.c: REGISTER attempt 1 to 'sip:fj.ctcims.cn:5060' with client 'sip:+865925515432 at fj.ctcims.cn'
[Feb 20 12:06:01] DEBUG[6621] pjsip: 	tsx0x7f0634008 .Transaction created for Request msg REGISTER/cseq=12617 (tdta0x7f0634005f50)
[Feb 20 12:06:01] DEBUG[6621] pjsip: 	tsx0x7f0634008 Sending Request msg REGISTER/cseq=12617 (tdta0x7f0634005f50) in state Null
[Feb 20 12:06:01] DEBUG[6621] pjsip: 	 sip_resolve.c .Target '218.85.141.176:5060' type=Unspecified resolved to '218.85.141.176:5060' type=UDP (UDP transport)
[Feb 20 12:06:01] DEBUG[6621] netsock2.c: Splitting '218.85.141.176' into...
[Feb 20 12:06:01] DEBUG[6621] netsock2.c: ...host '218.85.141.176' and port ''.
[Feb 20 12:06:01] DEBUG[6621] pjsip: 	tsx0x7f0634008 .State changed from Null to Calling, event=TX_MSG
[Feb 20 12:06:01] DEBUG[6626] pjsip: 	sip_endpoint.c Processing incoming message: Response msg 200/REGISTER/cseq=12617 (rdata0x1ebb058)
[Feb 20 12:06:01] DEBUG[6626] res_pjsip/pjsip_distributor.c: No dialog serializer for response Response msg 200/REGISTER/cseq=12617 (rdata0x1ebb058). Using request transaction as basis
[Feb 20 12:06:01] DEBUG[6626] res_pjsip/pjsip_distributor.c: Found serializer 5893e571-da8d-441f-9fa4-9dcda6ffaaa1 on transaction tsx0x7f0634008398
[Feb 20 12:06:01] DEBUG[6621] pjsip: 	sip_endpoint.c Distributing rdata to modules: Response msg 200/REGISTER/cseq=12617 (rdata0x7f06540030f8)
[Feb 20 12:06:01] DEBUG[6621] pjsip: 	tsx0x7f0634008 .Incoming Response msg 200/REGISTER/cseq=12617 (rdata0x7f06540030f8) in state Calling
[Feb 20 12:06:01] DEBUG[6621] pjsip: 	tsx0x7f0634008 ..State changed from Calling to Completed, event=RX_MSG
[Feb 20 12:06:01] DEBUG[6621] res_pjsip_outbound_registration.c: Received REGISTER response 200(OK) from server 'sip:fj.ctcims.cn:5060' for client 'sip:+865925515432 at fj.ctcims.cn
[Feb 20 12:06:01] DEBUG[6621] res_pjsip_outbound_registration.c: Processing REGISTER response 200 from server 'sip:fj.ctcims.cn:5060' to client 'sip:+865925515432 at fj.ctcims.cn'
[Feb 20 12:06:01] DEBUG[6621] res_pjsip_outbound_registration.c: Outbound registration to 'sip:fj.ctcims.cn:5060' with client 'sip:+865925515432 at fj.ctcims.cn' successful
[Feb 20 12:06:01] DEBUG[6621] res_pjsip_outbound_registration.c: Scheduling outbound registration to server 'sip:fj.ctcims.cn:5060' from client 'sip:+865925515432 at fj.ctcims.cn' in 590 seconds
[Feb 20 12:06:06] DEBUG[6626] pjsip: 	tsx0x7f0634008 Timeout timer event
[Feb 20 12:06:06] DEBUG[6626] pjsip: 	tsx0x7f0634008 .State changed from Completed to Terminated, event=TIMER
[Feb 20 12:06:06] DEBUG[6626] pjsip: 	tsx0x7f0634008 Timeout timer event
[Feb 20 12:06:06] DEBUG[6626] pjsip: 	tsx0x7f0634008 .State changed from Terminated to Destroyed, event=TIMER
[Feb 20 12:06:06] DEBUG[6626] pjsip: 	tdta0x7f063400 ..Destroying txdata Request msg REGISTER/cseq=12617 (tdta0x7f0634005f50)
[Feb 20 12:06:06] DEBUG[6626] pjsip: 	tsx0x7f0634008 Transaction destroyed!
[Feb 20 12:06:08] DEBUG[6626] pjsip: 	sip_endpoint.c Processing incoming message: Request msg REGISTER/cseq=3726 (rdata0x7f0654005048)
[Feb 20 12:06:08] DEBUG[6621] pjsip: 	sip_endpoint.c Distributing rdata to modules: Request msg REGISTER/cseq=3726 (rdata0x7f06540030f8)
[Feb 20 12:06:08] DEBUG[6621] netsock2.c: Splitting '113.227.136.146' into...
[Feb 20 12:06:08] DEBUG[6621] netsock2.c: ...host '113.227.136.146' and port ''.
[Feb 20 12:06:08] DEBUG[6621] res_pjsip_endpoint_identifier_ip.c: Source address 113.227.136.146:5064 does not match identify 'mytrunk'
[Feb 20 12:06:08] DEBUG[6621] res_pjsip_endpoint_identifier_ip.c: '113.227.136.146:5064' did not match any identify section rules
[Feb 20 12:06:08] DEBUG[6621] res_pjsip_endpoint_identifier_user.c: Retrieved endpoint 8100 at pbx.myrealm.net
[Feb 20 12:06:08] DEBUG[6621] pjsip: 	      endpoint .Response msg 401/REGISTER/cseq=3726 (tdta0x7f063400c620) created
[Feb 20 12:06:08] DEBUG[6621] netsock2.c: Splitting '10.105.127.204' into...
[Feb 20 12:06:08] DEBUG[6621] netsock2.c: ...host '10.105.127.204' and port ''.
[Feb 20 12:06:08] DEBUG[6621] netsock2.c: Splitting '113.227.136.146' into...
[Feb 20 12:06:08] DEBUG[6621] netsock2.c: ...host '113.227.136.146' and port ''.
[Feb 20 12:06:08] DEBUG[6621] netsock2.c: Splitting '113.227.136.146' into...
[Feb 20 12:06:08] DEBUG[6621] netsock2.c: ...host '113.227.136.146' and port ''.
[Feb 20 12:06:08] DEBUG[6621] pjsip: 	tdta0x7f063400 .Destroying txdata Response msg 401/REGISTER/cseq=3726 (tdta0x7f063400c620)
[Feb 20 12:06:08] DEBUG[6626] pjsip: 	sip_endpoint.c Processing incoming message: Request msg REGISTER/cseq=3727 (rdata0x7f0654005048)

> 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.myrealm.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.myrealm.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