[asterisk-bugs] [Asterisk 0011285]: [patch] Asterisk segfaults while doing a 'module reload'.

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Nov 18 17:07:25 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11285 
====================================================================== 
Reported By:                eliel
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11285
Category:                   Core/PBX
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 89398 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             11-18-2007 15:13 CST
Last Modified:              11-18-2007 17:07 CST
====================================================================== 
Summary:                    [patch] Asterisk segfaults while doing a 'module
reload'.
Description: 
While doing a 'module reload res_features.so' asterisk crash.
Also while doing a 'module unload res_features.so' and then a 'dialplan
show parkedcalls'

====================================================================== 

---------------------------------------------------------------------- 
 eliel - 11-18-07 17:07  
---------------------------------------------------------------------- 
I have found that the crash while doing 'module unload res_features.so' is
because while doing a ast_context_create() the registrar parameter is
static memory and while doing a module unload we lost the reference.
The problem can be solved destroying every created context while doing a
module unload like I have done with res_features.c but we have the same
problem with other modules like app_dial, etc, every module that creates a
context and doesn't destroy it while unloading.
To solve the crash I make a copy of the 'registrar' to prevent this
conditions, or we could leave the registrar as is, and check every
app/res/pbx/etc that creates a context and put code to destroy it while
unloading. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-18-07 17:07  eliel          Note Added: 0073882                          
======================================================================




More information about the asterisk-bugs mailing list