[Home]

Summary:ASTERISK-19206: Segmentation fault: menuselect/nmenuselect menuselect.makeopts
Reporter:Yuri Goncharov (yur4)Labels:
Date Opened:2012-01-17 02:17:27.000-0600Date Closed:2012-02-16 07:23:22.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:. I did not set the category correctly.
Versions:Frequency of
Occurrence
Related
Issues:
Environment:VPS hosting. Xen guest Linux 2.6.32-37-server #81-Ubuntu SMP Fri Dec 2 20:49:12 UTC 2011 x86_64 GNU/LinuxAttachments:( 0) debug.log
Description:Make target menuselect crash with segmentation fault
I tried several versions of asterisk in 1.6 and 1.8 branches with same result

strace menuselect/nmenuselect menuselect.makeopts
{noformat}
execve("menuselect/nmenuselect", ["menuselect/nmenuselect", "menuselect.makeopts"], [/* 19 vars */]) = 0
brk(0)                                  = 0xbca000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc853042000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=24881, ...}) = 0
mmap(NULL, 24881, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc85303b000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/libnewt.so.0.52", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360W\0\0\0\0\0\0@"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=89752, ...}) = 0
mmap(NULL, 2185832, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc852c0f000
mprotect(0x7fc852c23000, 2097152, PROT_NONE) = 0
mmap(0x7fc852e23000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7fc852e23000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\355\1\0\0\0\0\0@"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1572232, ...}) = 0
mmap(NULL, 3680296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc85288c000
mprotect(0x7fc852a06000, 2093056, PROT_NONE) = 0
mmap(0x7fc852c05000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x179000) = 0x7fc852c05000
mmap(0x7fc852c0a000, 18472, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc852c0a000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libslang.so.2", O_RDONLY)    = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320g\4\0\0\0\0\0@"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=1063520, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc85303a000
mmap(NULL, 3552824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc852528000
mprotect(0x7fc852610000, 2097152, PROT_NONE) = 0
mmap(0x7fc852810000, 114688, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe8000) = 0x7fc852810000
mmap(0x7fc85282c000, 390712, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc85282c000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0@"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=14696, ...}) = 0
mmap(NULL, 2109696, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc852324000
mprotect(0x7fc852326000, 2097152, PROT_NONE) = 0
mmap(0x7fc852526000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fc852526000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360>\0\0\0\0\0\0@"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=534832, ...}) = 0
mmap(NULL, 2629864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc8520a1000
mprotect(0x7fc852123000, 2093056, PROT_NONE) = 0
mmap(0x7fc852322000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x81000) = 0x7fc852322000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc853039000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc853038000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc853037000
arch_prctl(ARCH_SET_FS, 0x7fc853038700) = 0
mprotect(0x7fc852322000, 4096, PROT_READ) = 0
mprotect(0x7fc852526000, 4096, PROT_READ) = 0
mprotect(0x7fc852810000, 16384, PROT_READ) = 0
mprotect(0x7fc852c05000, 16384, PROT_READ) = 0
mprotect(0x7fc852e23000, 4096, PROT_READ) = 0
mprotect(0x60e000, 4096, PROT_READ)     = 0
mprotect(0x7fc853044000, 4096, PROT_READ) = 0
munmap(0x7fc85303b000, 24881)           = 0
brk(0)                                  = 0xbca000
brk(0xbeb000)                           = 0xbeb000
open("menuselect-tree", O_RDONLY)       = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=74035, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc853041000
read(3, "<?xml version=\"1.0\"?>\n\n<menu name"..., 4096) = 4096
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
{noformat}
Comments:By: Walter Doekes (wdoekes) 2012-01-18 03:45:04.891-0600

Thank you for your bug report. In order to move your issue forward, we require a backtrace from the core file produced after the crash.

This means that you'll have to do ulimit -c 1000000 (more than large enough) to get core dumps and then examine the core dump after the crash using gdb. Alternatively you can start up nmenuselect from gdb directly: gdb menuselect/nmenuselect [enter] run menuselect.makeopts

This[1] document tells you how to get backtraces from the asterisk binary which you can upload. In your case you'll be getting the backtrace from nmenuselect, but the gdb commands still apply.

[1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

By: Yuri Goncharov (yur4) 2012-01-19 01:58:23.880-0600

I made backtrace from gdb.

By: Walter Doekes (wdoekes) 2012-01-19 04:09:21.575-0600

Does the same happen with this?
{noformat}
$ make cmenuselect
{noformat}
Where you're selecting the (n)curses menuselect instead of the newt version. You may have to install (n)curses libs and make -C menuselect clean.

According to your backtrace there is no problem in the code: buffer holds "?" and it's compared against another valid string "!--" using strcmp. That shouldn't fail.

So there is something more devious going on at the compile, link or library level. On the internet I found this http://www.mail-archive.com/debian-glibc@lists.debian.org/msg43920.html where the recommendation was to upgrade binutils. But you might be looking at something completely different.

By: Leif Madsen (lmadsen) 2012-02-16 07:23:11.912-0600

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.  Further information can be found at http://www.asterisk.org/developers/bug-guidelines