[Home]

Summary:ASTERISK-24485: res_pjsip cannot be unloaded or shutdown
Reporter:Corey Farrell (coreyfarrell)Labels:
Date Opened:2014-11-03 13:26:19.000-0600Date Closed:2015-01-14 17:16:41.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:SVN 12.6.1 13.0.0-beta3 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) backtrace_13384.txt
( 1) pjsip_unload-broken-r1.patch
Description:res_pjsip cannot be unloaded or shutdown, causes huge numbers of leaks to be reported by REF_DEBUG or valgrind.  This makes it impossible to easily test for real memory leaks against chan_pjsip.

The point of this bug is not to say that res_pjsip needs to be able to unload (though that would be nice).  It needs to be able to shutdown and free all memory during a 'core stop gracefully'.

This will become a blocker in the testsuite, once ASTERISK-24379 is committed all tests will fail if REF_DEBUG is enabled and res_pjsip is loaded.
Comments:By: Corey Farrell (coreyfarrell) 2014-11-05 13:01:21.649-0600

Attached is my first attempt at shutting down pjsip.  Note this patch expects [r4141|https://reviewboard.asterisk.org/r/4141/] to be applied for {{ast_module_shutdown_ref}}.

I've only used this in the testsuite on Asterisk 13.  {{tests/manager/originate/}} works with only 1 ao2 object leaked - but this test does not actually use PJSIP.  {{tests/channels/pjsip/basic_calls/incoming/nominal/authed/userpass/ident_by_user/}} causes a segfault at shutdown.