[Home]

Summary:ASTERISK-02908: Suspend in tcsh, kill %1 *twice*, then fg gives core dump
Reporter:filipg (filipg)Labels:
Date Opened:2004-11-30 17:45:35.000-0600Date Closed:2011-06-07 14:10:25
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:In tcsh: if you CTRL-Z asterisk, then try to 'kill %1' it once,
then 'fg', it will quit cleanly:

------------------
Asterisk Ready.
*CLI>
Suspended
localhost /workspace/asterisk-1.0.2# kill %1
localhost /workspace/asterisk-1.0.2# Beginning asterisk shutdown....
Nov 18 16:40:00 NOTICE[-1212343376]: res_musiconhold.c:306 monmp3thread: Request to schedule in the past?!?!
                                                                                         
[1]  + Suspended (tty output)        ./asterisk -vvvc
localhost /workspace/asterisk-1.0.2# fg
./asterisk -vvvc
Executing last minute cleanups
Nov 18 16:40:02 NOTICE[-1212343376]: res_musiconhold.c:306 monmp3thread: Request to schedule in the past?!?!
 == Destroying any remaining musiconhold processes
Asterisk cleanly ending (15).
------------------

However, if you try to kill it more than once (eg. twice) it will
dump core after exiting:
------------------
Asterisk Ready.
*CLI>
Suspended
asterisk-1.0.2# kill %1
asterisk-1.0.2# Beginning asterisk shutdown....
Nov 18 16:36:42 NOTICE[-1212343376]: res_musiconhold.c:306 monmp3thread: Request to schedule in the past?!?!
[1]  + Suspended (tty output)        ./asterisk -vvvc
asterisk-1.0.2# kill %1
asterisk-1.0.2#
[1]  + Suspended (tty output)        ./asterisk -vvvc
asterisk-1.0.2# fg
./asterisk -vvvc
Executing last minute cleanups
Nov 18 16:36:45 NOTICE[-1212343376]: res_musiconhold.c:306 monmp3thread: Request to schedule in the past?!?!
 == Destroying any remaining musiconhold processes
Beginning asterisk shutdown....
Asterisk cleanly ending (15).
Segmentation fault (core dumped)
------------------

asterisk-1.0.2# gdb ./asterisk core.20523
------------------
[...]
Loaded symbols for /usr/lib/asterisk/modules/app_striplsd.so
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
#0  0x080b55a6 in term_free_display (el=0x80f2658) at term.c:510
510                     for (bufp = b; *bufp != NULL; bufp++)
------------------

(gdb) where
------------------
#0  0x080b55a6 in term_free_display (el=0x80f2658) at term.c:510
#1  0x080b52f9 in term_end (el=0x80f2658) at term.c:377
#2  0x080b0ceb in el_end (el=0x80f2658) at el.c:114
#3  0x0809d71d in quit_handler (num=15, nice=-1208068588, safeshutdown=1, restart=0)
   at asterisk.c:585
#4  0x0809d826 in __quit_handler (num=135210584) at asterisk.c:640
ASTERISK-1  <signal handler called>
ASTERISK-2  0xffffe410 in ?? ()
ASTERISK-3  0xb7fe5998 in ?? ()
ASTERISK-4  0xffffffff in ?? ()
ASTERISK-5  0x00000001 in ?? ()
ASTERISK-6 0x00ab6a27 in poll () from /lib/tls/libc.so.6
ASTERISK-7 0x0809fabf in listener (unused=0x0) at asterisk.c:331
ASTERISK-8 0x00c3e98c in start_thread () from /lib/tls/libpthread.so.0
ASTERISK-9 0x00ac016a in clone () from /lib/tls/libc.so.6
------------------

System is a RedHat FC2 clean install. This is asterisk 1.0.2 built with
no mods to the config files at all. tcsh 6.12.00. Kernel 2.6.9.
I don't have OSS, only ALSA:
----
Advanced Linux Sound Architecture Driver Version 1.0.6 (Sun Aug 15 07:17:53 2004 UTC).
PCI: Found IRQ 11 for device 0000:00:08.0
PCI: Sharing IRQ 11 with 0000:00:10.0 <= USB hub
ALSA device list:
 #0: Sound Blaster Live! (rev.6) at 0xd000, irq 11
----

I can replicate this at will.




****** ADDITIONAL INFORMATION ******

BTW, this may be related? The startup output shows this:
------------------
Nov 18 16:08:32 NOTICE[-1212343376]: res_musiconhold.c:306 monmp3thread: Request to schedule in the past?!?!
------------------
Comments:By: Brian West (bkw918) 2004-11-30 18:14:22.000-0600

don't suspend the process.. you shell out with a !

bkw

By: Brian West (bkw918) 2004-11-30 18:17:12.000-0600

This is not really a bug... You start asterisk as a daemon then asterisk -r and suspend that if you must.  IT IS NOT a wise idea to suspend asterisk as we do too much stuff thats time dependant its no wonder it crashes.

bkw

By: abatista (abatista) 2004-11-30 18:18:10.000-0600

I wonder why you would supend a server. Asterisk is a server and should never be spended. It's a real time process system.  

Sorry can't understand it. But Asterisk should never be supended.