[asterisk-bugs] [Asterisk 0017698]: CTRL-C from asterisk -vvvvvvvvc has strange results

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Oct 4 02:27:54 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17698 
====================================================================== 
Reported By:                jmls
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17698
Category:                   Core/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.8.0-beta1 
JIRA:                       SWP-1940 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 260194 
Request Review:              
====================================================================== 
Date Submitted:             2010-07-24 14:46 CDT
Last Modified:              2010-10-04 02:27 CDT
====================================================================== 
Summary:                    CTRL-C from asterisk -vvvvvvvvc has strange results
Description: 
If you start asterisk from a command line (asterisk -vvvvvvc) when you
press CTRL-C to end the session, you don't get local echo any more. Tried
this on putty and local console.

This is not a problem with 1.4 - all works well.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0017080 [patch] Asterisk crashes while core res...
====================================================================== 

---------------------------------------------------------------------- 
 (0127632) wdoekes (reporter) - 2010-10-04 02:27
 https://issues.asterisk.org/view.php?id=17698#c127632 
---------------------------------------------------------------------- 
I believe it is broken by the patch from
https://issues.asterisk.org/view.php?id=17080 .
el_end needs to get called, but doesn't.

(gdb) break quit_handler
(gdb) run -r # or run -c
...
^C
(gdb) signal SIGINT
Breakpoint 1, quit_handler (num=0, niceness=0, safeshutdown=0, restart=0)
at asterisk.c:1582
...


In the asterisk -c case:

(gdb) info threads
* 14 Thread 0x41c8f950 (LWP 22940)  quit_handler (num=0, niceness=0,
safeshutdown=1, restart=0) at asterisk.c:1647
  13 Thread 0x41635950 (LWP 22939)  0x00007f6eaad86ff1 in nanosleep ()
from /lib/libc.so.6
  12 Thread 0x40ba0950 (LWP 22938)  0x00007f6eaadafb56 in poll () from
/lib/libc.so.6
...
  2 Thread 0x40891950 (LWP 22927)  0x00007f6eaa577d29 in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
  1 Thread 0x7f6eab2486f0 (LWP 22924)  0x00007f6eaadaa99b in read () from
/lib/libc.so.6
(gdb) print consolethread
$1 = 140113294427888 <-- 0x7f6eab2486f0 / thread 1
(gdb) print AST_PTHREADT_NULL
$3 = 18446744073709551615
(gdb) print pthread_self()
$4 = 1103690064 <-- 0x41c8f950 / thread 14


In the asterisk -r case:

(gdb) info threads
* 1 Thread 0x7f810ceac6f0 (LWP 22958)  quit_handler (num=0, niceness=0,
safeshutdown=0, restart=0) at asterisk.c:1639
(gdb) print consolethread
$1 = 18446744073709551615
(gdb) print pthread_self()
$2 = 216712944
(gdb) print AST_PTHREADT_NULL
$3 = 18446744073709551615



Undoing
http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/asterisk.c?r1=278983&r2=278982&pathrev=278983
on 1.6.2.14-rc1
restores expected behaviour (resetting the terminal before leaving), but
might re-introduce a crash.
I am however unable to reproduce the crash that I experienced myself
(https://issues.asterisk.org/view.php?id=17482), so the problem may have gone
away through some other edit. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-10-04 02:27 wdoekes        Note Added: 0127632                          
======================================================================




More information about the asterisk-bugs mailing list