Summary: | app-editors/emacs-vcs-24.3.9999 - src_compile(): Segmentation fault in ./temacs --batch --load loadup bootstrap | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Clemens Schüller <c.schueller> |
Component: | Current packages | Assignee: | Emacs project <emacs> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge output
strace output from emerge |
Description
Clemens Schüller
2013-12-15 10:48:22 UTC
Is this reproducible? Please attach the full build.log. Created attachment 365494 [details]
emerge output
Yes, this error is reproducible and always the same (In reply to Clemens Schüller from comment #2) > Created attachment 365494 [details] > emerge output With -s in MAKEOPTS this is not so helpful. Anyway, using the same CFLAGS and USE flags as you, I still cannot reproduce the problem. Can you try to compile emacs with ccache turned off? The same error, after i deleted -s from makeopts and turning off ccache. Not much I can do here when I can't reproduce the bug. Some ideas: - Compile with -ggdb and produce a core dump, in order to find out where exactly it crashes. - Does app-editors/emacs-24.3-r2 build? - Does the bug also occur on a plain Gentoo system, or is it caused by something that is specific to Sabayon (like kernel, gcc, or glibc)? (In reply to Ulrich Müller from comment #6) > Not much I can do here when I can't reproduce the bug. > > Some ideas: > - Compile with -ggdb and produce a core dump, in order to find out where > exactly it crashes. How can I enable the debug feature? > - Does app-editors/emacs-24.3-r2 build? Yes, it compiles without errors and the exec is runnable? > - Does the bug also occur on a plain Gentoo system, or is it caused > by something that is specific to Sabayon (like kernel, gcc, or glibc)? I will try it ASAP ;-) Created attachment 365624 [details]
strace output from emerge
(In reply to Clemens Schüller from comment #7) > > - Compile with -ggdb and produce a core dump, in order to find out where > > exactly it crashes. > > How can I enable the debug feature? Not sure if this answers your question, but add -ggdb to CFLAGS, enable core dumps with "ulimit -c unlimited", and after the crash inspect the core dump with "gdb /path/to/temacs /path/to/core". You can obtain a backtrace with the command "bt full" in gdb. Thanks, i try it, as i find time for it. I added a strace output - is this a help to solve the error? Here is the gdb output: [root@cougar: ~portage/app-editors/emacs-vcs-24.3.9999/work/emacs/src]# gdb ./temacs ./core GNU gdb (Gentoo 7.5.1 p2) 7.5.1 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /var/tmp/portage/app-editors/emacs-vcs-24.3.9999/work/emacs/src/temacs...done. [New LWP 23958] warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To enable execution of this file add add-auto-load-safe-path /lib64/libthread_db-1.0.so line to your configuration file "/root/.gdbinit". To completely disable this security protection add set auto-load safe-path / line to your configuration file "/root/.gdbinit". For more information about this security protection see the "Auto-loading safe path" section in the GDB manual. E.g., run from the shell: info "(gdb)Auto-loading safe path" warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. warning: File "/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000 Core was generated by `./temacs --batch --load loadup bootstrap'. Program terminated with signal 11, Segmentation fault. #0 0x00007ffff389e070 in ?? () from /lib64/libc.so.6 warning: File "/var/tmp/portage/app-editors/emacs-vcs-24.3.9999/work/emacs/src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". Can you produce a full backtrace ("bt full" in gdb)? #0 0x00007ffff389e070 in ?? () from /lib64/libc.so.6 No symbol table info available. #1 0x0000555555732cfc in memcpy (__len=<optimized out>, __src=<optimized out>, __dest=<optimized out>) at /usr/include/bits/string3.h:51 No locals. #2 unexec (new_name=0x555556b22768 "/var/tmp/portage/app-editors/emacs-vcs-24.3.9999/work/emacs/src/emacs", old_name=0x555556b227b8 "/var/tmp/portage/app-editors/emacs-vcs-24.3.9999/work/emacs/src/temacs") at unexelf.c:1060 src = <optimized out> new_file = 5 old_file = 4 new_file_size = 1467024575 old_base = 0x7fffe8df5000 "\177ELF\002\001\001" new_base = 0x7fff916e4000 "\177ELF\002\001\001" old_file_h = 0x7fffe8df5000 new_file_h = 0x7fff916e4000 old_program_h = 0x564713e0 new_program_h = <optimized out> old_section_h = 0x7fffea03bdf8 new_section_h = <optimized out> old_section_names = 0x7fffea03bc8c "" old_bss_addr = 7650336 new_bss_addr = 93825015730176 old_bss_size = 1453051904 new_data2_size = 1455149056 new_data2_offset = 5553184 new_data2_addr = 7650336 old_bss_offset = 5553156 new_data2_incr = 1447498748 n = <optimized out> nn = 29 old_bss_index = <optimized out> old_sbss_index = -1 old_plt_index = <optimized out> old_data_index = 29 new_data2_index = 30 stat_buf = {st_dev = 64257, st_ino = 1102077, st_nlink = 1, st_mode = 33261, st_uid = 250, st_gid = 250, __pad0 = 0, st_rdev = 0, st_size = 19525763, st_blksize = 4096, st_blocks = 38144, st_atim = {tv_sec = 1387631265, tv_nsec = 74815784}, st_mtim = {tv_sec = 1387631264, tv_nsec = 895818022}, st_ctim = {tv_sec = 1387631264, tv_nsec = 895818022}, __unused = {0, 0, 0}} old_file_size = 19525763 mask = <optimized out> #3 0x000055555566de4b in Fdump_emacs (filename=93825015116161, symfile=93825015116129) at emacs.c:2141 tem = 93825000481650 symbol = 140735635950688 #4 0x00005555556f785f in eval_sub (form=<optimized out>) at eval.c:2178 numargs = <optimized out> args_left = 93825000481650 i = <optimized out> maxargs = 2 argvals = {93825015132481, 93825015132449, 0, -6781527230771294720, 0, 93825007785344, 93825000370528, 93825000370312} fun = 93824996991237 val = <optimized out> original_fun = 93825000370568 original_args = 93825007982742 funcar = 0 #5 0x00005555556f7d7d in Fprogn (body=93825008122486) at eval.c:458 val = <optimized out> #6 0x00005555556f7965 in eval_sub (form=<optimized out>) at eval.c:2123 numargs = <optimized out> args_left = 93825007072790 i = <optimized out> maxargs = <optimized out> argvals = {177540704864, -6781527230771294720, 93825007626848, 93825000600210, 93824994611336, -6781527230771294720, 0, 93825007887632} fun = 93824999863205 val = <optimized out> original_fun = 93825000606482 original_args = 93825007072790 funcar = 0 #7 0x00005555556f7965 in eval_sub (form=form@entry=93825000741382) at eval.c:2123 numargs = <optimized out> args_left = 93825007887638 i = <optimized out> maxargs = <optimized out> argvals = {93825000366400, 93825000370072, 16, 93825000366400, 93825000370312, 93824994114752, 93825000481650, 93825000481650} fun = 93824999863109 val = <optimized out> original_fun = 93825000606386 original_args = 93825007887638 funcar = 0 #8 0x0000555555720615 in readevalloop (readcharfun=93825000600210, stream=stream@entry=0x555555d823c0, sourcename=sourcename@entry=93825000808465, printflag=printflag@entry=false, unibyte=<optimized out>, readfun=93825000481650, start=93825000481650, end=93825000481650) at lread.c:1929 c = <optimized out> val = 93825000741382 b = <optimized out> continue_reading_p = <optimized out> lex_bound = <optimized out> whole_buffer = false first_sexp = <optimized out> macroexpand = 93825000481650 #9 0x0000555555721465 in Fload (file=93825000795953, noerror=<optimized out>, nomessage=93825000481650, nosuffix=<optimized out>, must_suffix=<optimized out>) at lread.c:1358 stream = 0x555555d823c0 fd = 3 fd_index = 4 found = 93825000808401 efound = <optimized out> hist_file_name = 93825000808465 newer = <optimized out> compiled = <optimized out> handler = <optimized out> safe_p = <optimized out> fmode = 0x55555578f68a "r" version = 0 #10 0x00005555556f781a in eval_sub (form=form@entry=93825000741270) at eval.c:2189 numargs = <optimized out> args_left = 93825000481650 i = <optimized out> maxargs = 5 argvals = {93825000795953, 93825000481650, 93825000481650, 93825000481650, 93825000481650, 93825000606114, 93825000606112, 93825000482720} fun = 93824999871949 val = <optimized out> original_fun = 93825000370568 original_args = 93825000741254 funcar = 0 #11 0x00005555556fa411 in Feval (form=93825000741270, lexical=<optimized out>) at eval.c:1993 No locals. #12 0x00005555556f6400 in internal_condition_case (bfun=bfun@entry=0x555555677e20 <top_level_2>, handlers=<optimized out>, hfun=hfun@entry=0x55555567ac80 <cmd_error>) at eval.c:1344 val = <optimized out> c = 0x555555d81e60 #13 0x00005555556783ed in top_level_1 (ignore=ignore@entry=93825000481650) at keyboard.c:1187 No locals. #14 0x00005555556f62db in internal_catch (tag=93825000528546, func=func@entry=0x555555678360 <top_level_1>, arg=93825000481650) at eval.c:1108 val = <optimized out> c = 0x555555d81e60 #15 0x000055555567a645 in command_loop () at keyboard.c:1148 No locals. #16 recursive_edit_1 () at keyboard.c:777 val = 93825000354266 #17 0x000055555567aadc in Frecursive_edit () at keyboard.c:841 buffer = 93825000481650 #18 0x000055555558d8e9 in main (argc=<optimized out>, argv=<optimized out>) at emacs.c:1634 dummy = 2112 stack_bottom_variable = 0 '\000' do_initial_setlocale = <optimized out> dumping = <optimized out> skip_args = 3 rlim = {rlim_cur = 8720000, rlim_max = 18446744073709551615} no_loadup = false junk = 0x0 dname_arg = 0x0 ch_to_dir = 0x4 <Address 0x4 out of bounds> original_pwd = 0x5 <Address 0x5 out of bounds> So it occurs in unexec and looks similar to bug 411439 or bug 456970. It could be a kernel issue, or something different. Can you try if you can compile emacs with the following workaround: $ cat /proc/sys/kernel/randomize_va_space # take a note of the output $ echo 0 >/proc/sys/kernel/randomize_va_space $ emerge app-editors/emacs-vcs $ echo <the previous value noted above> >/proc/sys/kernel/randomize_va_space If it does compile with this, then it is likely that the problem is related to some kernel setting, either in sabayon, or in your own kernel options. Thanks for Your feedback I'll check it out on next sunday, because I've currently no access to the PC, which have this bug Hello! After a long time of no time i found the error: It was the wrong gcc config. Before: [root@cougar: ~]# gcc-config -l [1] x86_64-pc-linux-gnu-4.6.4 [2] x86_64-pc-linux-gnu-4.6.4-hardenednopie [3] x86_64-pc-linux-gnu-4.6.4-hardenednopiessp [4] x86_64-pc-linux-gnu-4.6.4-hardenednossp [5] x86_64-pc-linux-gnu-4.6.4-vanilla [6] x86_64-pc-linux-gnu-4.7.3 * [7] x86_64-pc-linux-gnu-4.7.3-hardenednopie [8] x86_64-pc-linux-gnu-4.7.3-hardenednopiessp [9] x86_64-pc-linux-gnu-4.7.3-hardenednossp [10] x86_64-pc-linux-gnu-4.7.3-vanilla Config was set to 6 After: [root@cougar: ~]# gcc-config -l [1] x86_64-pc-linux-gnu-4.6.4 [2] x86_64-pc-linux-gnu-4.6.4-hardenednopie [3] x86_64-pc-linux-gnu-4.6.4-hardenednopiessp [4] x86_64-pc-linux-gnu-4.6.4-hardenednossp [5] x86_64-pc-linux-gnu-4.6.4-vanilla [6] x86_64-pc-linux-gnu-4.7.3 [7] x86_64-pc-linux-gnu-4.7.3-hardenednopie * [8] x86_64-pc-linux-gnu-4.7.3-hardenednopiessp [9] x86_64-pc-linux-gnu-4.7.3-hardenednossp [10] x86_64-pc-linux-gnu-4.7.3-vanilla Config is set to 7. And now the compile process runs without error. I'm glad you've your issue solved. *** This bug has been marked as a duplicate of bug 526948 *** |