[asterisk-bugs] [JIRA] (ASTERISK-28882) res_pjsip: Contact not completely removed on transport closure
Robert Sutton (JIRA)
noreply at issues.asterisk.org
Wed May 13 05:26:25 CDT 2020
[ https://issues.asterisk.org/jira/browse/ASTERISK-28882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=250742#comment-250742 ]
Robert Sutton commented on ASTERISK-28882:
------------------------------------------
Is it constant? - Given that I don't have 100% repeatable way of reproducing it, it is probably fair to downgrade it to frequent.
Is it happening for all endpoints? - I've only noticed it on endpoints using jssip (Web Sockets)
Is it specific endpoints? - It's more frequent on some endpoints than others, but I assume that is just a reflection of the reliability of the network in each endpoints location (many working from home)
Is it just the specific scenario I've outlined. - These are the ones I know of; Disconnect network (at remote endpoint), terminate VPN (at remote endpoint), delete contact from realtime DB (I removed the code that was deleting contacts from realtime last week and the problem persists, although less frequent)
My 2 cents worth here, it feels like a race condition.
> res_pjsip: Contact not completely removed on transport closure
> --------------------------------------------------------------
>
> Key: ASTERISK-28882
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28882
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_pjsip
> Affects Versions: 16.10.0
> Environment: ubuntu 18.04 docker
> realtime jssip over WS
> Reporter: Robert Sutton
> Assignee: Unassigned
> Severity: Minor
> Attachments: asterisk.log.gz
>
>
> The logs are full of the below ERROR, they increase in frequency as time goes by.
> It appears that when a remote sip client disconnects abruptly (VPN disconnect) the contact is replaced but some part of the qualify code is still retaining the old contact id and trying to qualify it.
> As the code to timeout the contact has already removed it's reference to this dead contact it is never cleaned up.
> {noformat}
> ERROR[506]: res_pjsip.c:4278 endpt_send_request: Error 171060 'Unsupported transport (PJSIP_EUNSUPTRANSPORT)' sending OPTIONS request to endpoint 113
> {noformat}
> I've acquired the back trace for this error message...
> {noformat}
> # 0: [0x5db45d] asterisk utils.c:2404 __ast_assert_failed()
> # 1: [0x7fe8771b0ea8] res_pjsip.so res_pjsip.c:4285 endpt_send_request()
> # 2: [0x7fe8771b1625] res_pjsip.so res_pjsip.c:4477 ast_sip_send_out_of_dialog_request()
> # 3: [0x7fe8771b73ce] res_pjsip.so pjsip_options.c:908 sip_options_qualify_contact()
> # 4: [0x4645a7] asterisk astobj2_container.c:328 internal_ao2_traverse()
> # 5: [0x46487f] asterisk astobj2_container.c:414 __ao2_callback()
> # 6: [0x7fe8771b7561] res_pjsip.so pjsip_options.c:930 sip_options_qualify_aor()
> # 7: [0x7fe8771e671c] res_pjsip.so pjsip_scheduler.c:98 run_task()
> # 8: [0x5c5736] asterisk taskprocessor.c:1239 ast_taskprocessor_execute()
> # 9: [0x5cf3e0] asterisk threadpool.c:1354 execute_tasks()
> #10: [0x5c5736] asterisk taskprocessor.c:1239 ast_taskprocessor_execute()
> #11: [0x5cd02a] asterisk threadpool.c:367 threadpool_execute()
> #12: [0x5cec43] asterisk threadpool.c:1137 worker_active()
> #13: [0x5ce9dd] asterisk threadpool.c:1057 worker_start()
> #14: [0x5d83b7] asterisk utils.c:1249 dummy_start()
> #15: [0x7fe8c2e4e6ba] libpthread.so.0 :0 __pthread_get_minstack()
> #16: [0x7fe8c20e341d] libc.so.6 :0 clone()
> {noformat}
> here is the contact that "pjsip show contacts" lists
> {noformat}
> Contact: 113/sip:na89q83p at 127.0.0.1:35636;transport=WS f21857cece Avail 23.087
> {noformat}
> and here you can see it is qualifying 2 contacts,
> {noformat}
> DEBUG[506]: res_pjsip/pjsip_options.c:857 sip_options_qualify_contact: Qualifying contact '113;@0f05565353fc038d2259556e7a9d87e1' on AOR '113'
> DEBUG[506]: res_pjsip/pjsip_options.c:857 sip_options_qualify_contact: Qualifying contact '113;@f21857cece07658a2e96e470283f3ea1' on AOR '113'
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list