Hello! emerge -av app-editors/emacs-vcs crashes with the following result: Loading /var/tmp/portage/app-editors/emacs-vcs-24.3.9999/work/emacs/lisp/vc/ediff-hook.el (source)... Loading /var/tmp/portage/app-editors/emacs-vcs-24.3.9999/work/emacs/lisp/uniquify.el (source)... Loading /var/tmp/portage/app-editors/emacs-vcs-24.3.9999/work/emacs/lisp/electric.el (source)... Loading /var/tmp/portage/app-editors/emacs-vcs-24.3.9999/work/emacs/lisp/tooltip.el (source)... Finding pointers to doc strings... Finding pointers to doc strings...done Dumping under the name emacs /bin/sh: line 7: 7067 Segmentation fault ./temacs --batch --load loadup bootstrap make[1]: *** [bootstrap-emacs] Error 1 make: *** [src] Error 2 * ERROR: app-editors/emacs-vcs-24.3.9999::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-editors/emacs-vcs-24.3.9999::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-editors/emacs-vcs-24.3.9999::gentoo'`. * The complete build log is located at '/var/tmp/portage/app-editors/emacs-vcs-24.3.9999/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-editors/emacs-vcs-24.3.9999/temp/environment'. * Working directory: '/var/tmp/portage/app-editors/emacs-vcs-24.3.9999/work/emacs' * S: '/var/tmp/portage/app-editors/emacs-vcs-24.3.9999/work/emacs' -------------------------------- /var/log/messages: Dec 15 11:39:19 cougar kernel: [51522.202233] temacs[7067]: segfault at 74bbfc ip 00007ffff389e070 sp 00007fffffff8688 error 4 in libc-2.17.so[7ffff376b000+1a7000] -------------------------------- emerge --info: Portage 2.2.7 (default/linux/amd64/13.0/desktop, gcc-4.7.3, glibc-2.17, 3.12.0-sabayon x86_64) ================================================================= System uname: Linux-3.12.0-sabayon-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-gentoo-2.2 KiB Mem: 8105988 total, 672344 free KiB Swap: 5119996 total, 5039548 free Timestamp of tree: Sun, 15 Dec 2013 09:15:01 +0000 ld GNU ld (GNU Binutils) 2.23.1 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 3.1.9 [enabled] app-shells/bash: 4.2_p45 dev-java/java-config: 2.2.0 dev-lang/python: 2.6.8-r1, 2.7.5-r2::sabayon-distro, 3.2.3-r2, 3.3.2-r2::sabayon-distro dev-util/ccache: 3.1.9-r2 dev-util/cmake: 2.8.10.2-r1 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2::sabayon-distro sys-apps/openrc: 0.12.4::sabayon-distro sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.69 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.6, 1.13.1 sys-devel/binutils: 2.23.1 sys-devel/gcc: 4.6.4::sabayon-distro, 4.7.3::sabayon-distro sys-devel/gcc-config: 1.7.3::sabayon-distro sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.7 (virtual/os-headers) sys-libs/glibc: 2.17::sabayon-distro Repositories: gentoo cougar-home-aneadesign-com Installed sets: @system ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=x86-64 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/conf.d /etc/entropy /etc/init.d /usr/share/config /usr/share/config/kdm /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0 /var/lib/otrs/Kernel/Config.pm /var/lib/otrs/Kernel/Config/GenericAgent.pm" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/skel /etc/splash /etc/terminfo" CXXFLAGS="-O2 -march=x86-64 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--quiet-build=n" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://gentoo.lagis.at ftp://gentoo.inode.at/" LANG="de_AT.UTF-8" LDFLAGS="-Wl,-O1,--as-needed" MAKEOPTS="-j8 -s" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/overlay" SYNC="rsync://rsync.at.gentoo.org/gentoo-portage/" USE="X a52 aac accessibility acl acpi aiglx aim alsa amd64 artswrappersuid audiofile avahi bash-completion berkdb bidi bluetooth bzip2 cairo cdda cddb cdr cjk cli consolekit cpudetection cracklib crypt cups cxx dbus dga dri dts dv dvb dvd dvdr dvdread dvi emboss encode exif fam fame fat ffmpeg firefox flac foomatic-db fortran freetype gcj gdbm gif gimpprint gmp gnutls gphoto2 gpm gsm gtk hfs iconv icq ieee1394 imap inotify ipod ipv6 irc irda jabber jack jfs joystick jpeg kdeenablefinal kdehiddenvisibility kerberos lame lcd lcms ldap libnotify live lm_sensors lzo mad mail matroska mjpeg mmx mng modules mozdevelop mp3 mp3rtp mp4 mpeg msn mudflap multilib musepack musicbrainz ncurses network nls nptl nsplugin ntfs ogg openal openexr opengl openmp pam pango pcmcia pcre pda pdf png policykit ppds pulseaudio qt3support qt4 rar rdesktop readline real reiserfs rss scanner sdl session slp speex spell sse sse2 ssl startup-notification stream svg sysfs tcpd theora tiff truetype udev udisks unicode upower usb v4l v4l2 visualization vorbis wifi win32codecs wmf wxwidgets x264 xcb xfs xine xinerama xml xpm xprint xulrunner xv xvid xvmc yahoo zeroconf zlib zsh-completion" ABI_X86="64" ALSA_CARDS="emu10k1x darla20 darla24 emu10k1 gina20 gina24 hdsp hdspm ice1712 indigo indigoio layla20 layla24 mia mixart mona pcxhr rme32 rme96 sb16 sbawe sscape usbusx2y vx222 usb-usx2y" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="agfa_cl20 casio_qv dimagev dimera3500 kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica_qm150 panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ricoh_g3 sipix_blink sipix_blink2 sipix_web2 sony_dscf1 sony_dscf55 toshiba_pdrm11 adc65 aox barbie canon clicksmart310 digigr8 digita directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 konica largan lg_gsm mars mustek pccam300 pccam600 ptp2 ricoh samsung sierra smal sonix soundvision spca50x sq905 stv0674 stv0680 sx330z template" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US af ar az bg bn br bs ca cs cy da de el en_GB eo es et eu fa fi fr fy ga gl he hi hr hu is it ja kk km ko lt lv mk mn ms nb nds nl nn pa pl pt pt_BR ro ru rw se sk sl sr sr@Latn ss sv ta tg tr uk uz vi zh_CN zh_TW es_AR es_ES fy_NL ga_IE gu gu_IN nb_NO nn_NO pt_PT sv_SE zh" LIRC_DEVICES="audio audio_alsa serial" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev vesa radeonhd" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
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 ***