[asterisk-bugs] [Asterisk 0014019]: Starting or restarting asterisk causes seg fault and core dump, apparently in ael/pval.c:4833

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Dec 8 12:31:14 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14019 
====================================================================== 
Reported By:                ckjohnsonme
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   14019
Category:                   PBX/pbx_ael
Reproducibility:            sometimes
Severity:                   crash
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 160852 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-12-03 20:11 CST
Last Modified:              2008-12-08 12:31 CST
====================================================================== 
Summary:                    Starting or restarting asterisk causes seg fault and
core dump, apparently in ael/pval.c:4833
Description: 
[root at freedom asterisk]# asterisk -V
Asterisk SVN-trunk-r160791
[root at freedom asterisk]# service asterisk start
Starting asterisk:                                         [  OK  ]
[root at freedom asterisk]# service asterisk restart
Shutting down asterisk: Asterisk ended with exit status 0
Asterisk shutdown normally.
                                                           [  OK  ]
Starting asterisk:                                         [  OK  ]
[root at freedom asterisk]# /usr/sbin/safe_asterisk: line 138: 11599
Segmentation fault      (core dumped) nice -n $PRIORITY
${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 <
/dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Automatically restarting Asterisk.
mpg123: no process killed
/usr/sbin/safe_asterisk: line 138: 11643 Segmentation fault      (core
dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >
/dev/${TTY} 2>&1 < /dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Automatically restarting Asterisk.
mpg123: no process killed
/usr/sbin/safe_asterisk: line 138: 11688 Segmentation fault      (core
dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >
/dev/${TTY} 2>&1 < /dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Automatically restarting Asterisk.
mpg123: no process killed
/usr/sbin/safe_asterisk: line 138: 11732 Segmentation fault      (core
dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >
/dev/${TTY} 2>&1 < /dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Automatically restarting Asterisk.
mpg123: no process killed
/usr/sbin/safe_asterisk: line 138: 11775 Segmentation fault      (core
dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >
/dev/${TTY} 2>&1 < /dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Automatically restarting Asterisk.
mpg123: no process killed

The problem occurs frequently but not reliably.  Starting asterisk service
usually causes one or more segfaults before safe_asterisk successfully
starts asterisk.
====================================================================== 

---------------------------------------------------------------------- 
 (0095964) murf (administrator) - 2008-12-08 12:31
 http://bugs.digium.com/view.php?id=14019#c95964 
---------------------------------------------------------------------- 
OK. I installed ubuntu 8.10-server on my 64-bit test machine, and then
proved all I needed to do was replace the stupid ethernet cable.

But I reproduced this. It seems only a bug that will bite on a 64-bit
machine (so far), but it may be just an artifact of the way the machines
handle things.

I also notice that it sometimes you'll crash on startup, sometimes on an
ael reload, and sometimes, not at all. When it crashes, it's choking on a
bad pointer to the args of the Dial command on line 27 (ext. 100).

I've also seen it die at other points.

I also note that if you start trunk with 'asterisk -cgvvvvvvvvvvvvvvvvW'
instead of just 'asterisk -cgvvvvvvvvvvvvvvvv', that will prevent the crash
for some very strange reason.

Valgrind doesn't find the problem. Instead, it is also useful in
preventing the crash.

Using the debugger doesn't seem to prevent the crash tho. 

And, at some point, the args to that dial command disappear in the pval
tree...
or maybe, just the pointer to them.

This has very much the 'feel' of something walking over freed memory.
That's why I tried valgrind... 

more to come.

 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-12-08 12:31 murf           Note Added: 0095964                          
======================================================================




More information about the asterisk-bugs mailing list