[asterisk-bugs] [JIRA] (ASTERISK-27287) Cyclic reference between res_pjsip and res_pjsip_session
Alexander Traud (JIRA)
noreply at issues.asterisk.org
Fri Sep 22 06:31:08 CDT 2017
Alexander Traud created ASTERISK-27287:
------------------------------------------
Summary: Cyclic reference between res_pjsip and res_pjsip_session
Key: ASTERISK-27287
URL: https://issues.asterisk.org/jira/browse/ASTERISK-27287
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Resources/res_pjsip
Affects Versions: 15.0.0-rc1, 14.6.2, 13.17.2, GIT
Reporter: Alexander Traud
Since Asterisk 13.13, the module res_pjsip requires the module res_pjsip_session because it inits a {{pjsip_message_filter}} (formerly {{pjsip_message_ip_updater}}).
The call stack is as follows:
* res_pjsip → load_module → ast_res_pjsip_init_message_filter → ast_sip_session_register_supplement
* unload_pjsip → ast_res_pjsip_cleanup_message_filter → ast_sip_session_unregister_supplement
This issue has two symptoms:
* In the build configuration (menuselect), when {{res_pjsip_session}} is disabled but {{res_pjsip}} stays enabled, Asterisk crashes with {{/usr/lib/asterisk/modules/res_pjsip.so: undefined symbol: ast_sip_session_register_supplement}}.
* In the Command-Line Interface (CLI), {{core stop gracefully}} and {{core stop when convenient}} give the error {{Some modules could not be unloaded, switching to fast shutdown}}.
Consequently, that {{pjsip_message_filter}} introduces a cyclic reference and the module {{res_pjsip_session}} can never be unloaded, because the reference count never drops to zero. Furthermore, menuselect shows an incorrect build dependency between those modules.
I have no idea how to fix this, because I am not into the architecture of res_pjsip enough to understand why {{ast_sip_session_(un)register_supplement}} is required at all. Therefore, I am just reporting this issue and cannot contribute any patch or suggestion.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list