[asterisk-bugs] [Asterisk 0017482]: [patch] [regression] el_gets re-entered after el_end (at shutdown) causes segfault

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jun 29 00:36:32 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17482 
====================================================================== 
Reported By:                wdoekes
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17482
Category:                   Core/General
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
JIRA:                       SWP-1671 
Regression:                 Yes 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 268572 
Request Review:              
====================================================================== 
Date Submitted:             2010-06-07 04:09 CDT
Last Modified:              2010-06-29 00:36 CDT
====================================================================== 
Summary:                    [patch] [regression]  el_gets re-entered after
el_end (at shutdown) causes segfault
Description: 
Hi,

when running the asterisk trunk build with -c and -cv respectively, I get
a segfault when hitting CTRL-C on the latter.

The cause is that el_gets (main/editline/read.c) gets re-entered after
el_end has been called in quit_handler (main/asterisk.c). In el_gets, it
trips on

retval = (*el->el_map.func[cmdnum]) (el, ch); // line 475

because el_map.func is NULL (cleaned by el_end).

Possible solution:
- move el_end to after all ast_verbose and ast_debug has been called as in
the attached patch.

A different solution would be to fix so el_gets doesn't get called after
el_end has been called.


Regards,
Walter Doekes
OSSO B.V.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
has duplicate       0017490 Seg faulting when stopping asterisk
====================================================================== 

---------------------------------------------------------------------- 
 (0123990) wdoekes (reporter) - 2010-06-29 00:36
 https://issues.asterisk.org/view.php?id=17482#c123990 
---------------------------------------------------------------------- 
verbose-bt.txt is a more verbose backtrace of the crash with r268572.

I've tried to compile latest trunk, but res_ais.c breaks the build, so I
cannot confirm or deny that the bug is still there.


logger.conf:


;; vim: set syntax=asterisk:
;; (file-mandatory)

[general]
appendhostname=no ; (append hostname to logfiles)
dateformat=%F %T ; (ISO 8601: yyyy-mm-dd HH:MM:SS)
event_log=no ; (log generic events)
queue_log=no ; (log queue events)
queue_log_name=queue.log
rotatestrategy=rotate ; (sequential, rotate or timestamp)
exec_after_rotate=gzip -9 ${filename}.2 

[logfiles]
console => debug,verbose,notice,warning,error
debug.log => debug,verbose
messages.log = notice,warning,error
syslog.local0 => warning,error 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-06-29 00:36 wdoekes        Note Added: 0123990                          
======================================================================




More information about the asterisk-bugs mailing list