Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 236579 - app-editors/emacs (all versions) sporadic segmentation faults when dumping emacs
Summary: app-editors/emacs (all versions) sporadic segmentation faults when dumping emacs
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Emacs project
Depends on:
Blocks: kernel-2.6.25
  Show dependency tree
Reported: 2008-09-03 15:07 UTC by Jan Hrabe
Modified: 2009-12-21 13:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

temacs stack trace (gdb.out,7.99 KB, text/plain)
2008-09-06 03:04 UTC, Ulrich Müller
temacs backtrace (bt full) (gdb.btfull,13.07 KB, text/plain)
2008-09-06 03:13 UTC, Ulrich Müller

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Hrabe 2008-09-03 15:07:36 UTC
Loading dnd...
Loading mwheel...
Loading tool-bar...
Loading x-dnd...
((57799 . 9984) (11746 . 0) (622 . 90) 77853 166672 (69 . 8) (18 . 12) (5580 . 1665))
Loading emacs-lisp/float-sup...
((57831 . 9952) (11750 . 0) (622 . 90) 78020 166672 (70 . 9) (18 . 12) (5585 . 1660))
Loading vc-hooks...
Loading ediff-hook...
Loading tooltip...
((59157 . 8626) (11907 . 0) (623 . 89) 79221 166723 (72 . 7) (18 . 12) (5655 . 1590))
Finding pointers to doc strings...
Finding pointers to doc strings...done
Dumping under names emacs and emacs-22.2.1
make[1]: *** [emacs] Segmentation fault
make[1]: *** Deleting file `emacs'
make[1]: Leaving directory `/var/tmp/portage/app-editors/emacs-22.2-r3/work/emacs-22.2/src'
make: *** [src] Error 2
 * ERROR: app-editors/emacs-22.2-r3 failed.
 * Call stack:
 *     , line   49:  Called src_compile
 *             environment, line 3110:  Called die
 * The specific snippet of code:
 *       emake CC="$(tc-getCC)" || die "emake failed";
 *  The die message:
 *   emake failed

# emerge --info
Portage (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 i686)
System uname: 2.6.25-gentoo-r7 i686 Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
Timestamp of tree: Wed, 03 Sep 2008 14:34:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r6
dev-util/ccache:     2.4-r7
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
CFLAGS="-O2 -march=prescott -pipe"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe"
FEATURES="candy ccache distlocks fixpackages metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emacs emboss encode esd evo fam firefox foomaticdb fortran gcj gdbm gif gimprint gpm gstreamer hal iconv ieee1394 imagemagick isdnlog jpeg kde latex libnotify mad midi mikmod mp3 mpeg mudflap ncurses nis nls nptl nptlonly ogg opengl openmp pam pcre pdf perl pic png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sasl sdl session spell spl ssl startup-notification svg sysfs tcpd tetex tiff truetype unicode usb vorbis win32codecs x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Comment 1 Ulrich Müller gentoo-dev 2008-09-03 16:54:17 UTC
Is this reproducible?
Comment 2 Jan Hrabe 2008-09-03 17:40:52 UTC
I thought it was because I tried it in the morning on two different machines in two different locations within about 2 hours.  However, it works fine everywhere now.  Strange.
Comment 3 Ulrich Müller gentoo-dev 2008-09-03 17:52:04 UTC
The error looks similar to bug 221281. In principle, that issue should be fixed in Emacs 22. However, I wouldn't completely exclude that some problems with brk randomisation remain.

What is the output of the following command?
cat /proc/sys/kernel/randomize_va_space
Comment 4 Jan Hrabe 2008-09-03 18:04:35 UTC
cat /proc/sys/kernel/randomize_va_space
Comment 5 Ulrich Müller gentoo-dev 2008-09-04 10:17:42 UTC
Good news: I can reproduce the failure, dump fails in about 1% of the cases.

I've reported this upstream, see there for details:
Comment 6 Ulrich Müller gentoo-dev 2008-09-06 03:03:23 UTC
Problem persists in Emacs 22.3 (under Linux 2.6.26-gentoo-r1).
Comment 7 Ulrich Müller gentoo-dev 2008-09-06 03:04:16 UTC
Created attachment 164677 [details]
temacs stack trace
Comment 8 Ulrich Müller gentoo-dev 2008-09-06 03:13:52 UTC
Created attachment 164679 [details]
temacs backtrace (bt full)
Comment 9 Magnus Granberg gentoo-dev 2008-10-01 01:15:20 UTC
Got the error to on emeacs-22.3
Portage (hardened/linux/amd64/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r7 x86_64)
System uname: 2.6.25-gentoo-r7 x86_64 Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz
Timestamp of tree: Fri, 26 Sep 2008 22:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.4-r13, 2.5.2-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-devel/autoconf:  2.61-r2
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r4
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
Comment 10 Ulrich Müller gentoo-dev 2008-10-01 09:41:19 UTC
(In reply to comment #9)
> Got the error to on emeacs-22.3

For the moment, the workaround is to emerge it again, which in 98% of the cases will succeed.

No reply from upstream so far, and the patch is of the kind that I would like to be approved by them before applying it locally.
Comment 11 Ulrich Müller gentoo-dev 2008-10-21 16:08:15 UTC
Upstream have committed a bug fix to their CVS. (Simpler than my approach: they just set the personality and exec temacs unconditionally under Linux.)

I've fixed it for emacs-18.59-r5, 21.4-r17 and 22.3; no revbumps since this was a build-time failure.

Tested on Linux 2.6.26-gentoo-r1 (randomize_va_space = 2): I've built emacs-22.3 400 (four hundred!) times and emacs-18.59-r5 1000 times, without any failure. So I believe that the problem is solved.