[asterisk-bugs] [JIRA] (ASTERISK-22351) Segmentation fault when trying to open asterisk console with asterisk -vvvvvvvvr

A. Iglesias (JIRA) noreply at issues.asterisk.org
Thu Aug 22 07:25:03 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-22351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=209466#comment-209466 ] 

A. Iglesias commented on ASTERISK-22351:
----------------------------------------

Here you have the segfault and backtrace obtained with gdb (thanks for the tip!!):

(gdb) run -vvvvvvvvvvr

Starting program: /usr/sbin/asterisk -vvvvvvvvvvr
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Asterisk 1.8.23.0, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster at digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.23.0 currently running on asterisk (pid = 3710)

Program received signal SIGSEGV, Segmentation fault.
0x000000000056735c in term_alloc (el=el at entry=0x83a7f0, t=t at entry=0x5c1900, cap=0xffffffffffffcc80 <Address 0xffffffffffffcc80 out of bounds>) at term.c:398
398             if (cap == NULL || *cap == '\0') {


(gdb) bt

#0  0x000000000056735c in term_alloc (el=el at entry=0x83a7f0, t=t at entry=0x5c1900, cap=0xffffffffffffcc80 <Address 0xffffffffffffcc80 out of bounds>)
    at term.c:398
#1  0x0000000000569223 in term_set (el=el at entry=0x83a7f0, term=<optimized out>, term at entry=0x0) at term.c:960
#2  0x000000000056ace7 in term_init (el=0x83a7f0) at term.c:361
#3  el_init (prog=prog at entry=0x583394 "asterisk", fin=0x7ffff77946c0, fout=0x7ffff77947a0, ferr=0x7ffff7794880) at el.c:82
#4  0x000000000043ed93 in ast_el_initialize () at asterisk.c:2730
#5  0x0000000000444260 in ast_remotecontrol (data=<optimized out>) at asterisk.c:2910
#6  0x000000000042337b in main (argc=<optimized out>, argv=0x7fffffffec98) at asterisk.c:3735

(gdb)

I'm going to try the patch...
                
> Segmentation fault when trying to open asterisk console with asterisk -vvvvvvvvr
> --------------------------------------------------------------------------------
>
>                 Key: ASTERISK-22351
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22351
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 1.8.23.0, 11.5.0
>         Environment: HP Proliant DL320e G8
> Debian Wheezy (kernel 3.2.0-4-amd64)
> DAHDI 2.7.0 (no cards installed)
> Libpri 1.4.14
>            Reporter: A. Iglesias
>         Attachments: issueA22351_allow_tgetstr_write.patch
>
>
> New installation in this server. After everything is installed and asterisk started, anytime a try to open an asterisk console with asterisk -vvvvvvvvvr I get a "Segmentation fault" and console doesn't open, but asterisk keeps running. If I stop asterisk and try to start it with asterisk -vvvvvvc, it fails in the same way.
> I've been doing some research, and found a guy with the same problem in the past, related whit the value of the TERM system variable. In my case is "xterm", but if I change it for a non existent value ('lalalala' for example) then console starts.
> Digging deeper, I've found that the problem is in main/editline/term.c , in line 960 when executing this:
> term_alloc(el, t, tgetstr((char *)t->name, &area));
> If I change this line with the one executed when TERM has an unknown value...
> term_alloc(el, t, NULL);
> ... and recompile, then console starts.
>  the problem seems to be in the tgetstr function, because if I add a line just with this...
> tgetstr((char *)t->name, &area);
> ... I get the same error.
> I'll try to get core dump stuff, but maybe with this info is enough at the moment to find a solution. I've been trying to find the problem/solution studying the code, but no luck yet.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list