Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 570708 - app-editors/emacs-24.5 - HPPA: crashes after one keystroke
Summary: app-editors/emacs-24.5 - HPPA: crashes after one keystroke
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: HPPA Linux
: Normal normal (vote)
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords: NeedPatch, PMASKED
Depends on:
Blocks:
 
Reported: 2016-01-03 11:27 UTC by Ulrich Teichert
Modified: 2022-11-30 12:03 UTC (History)
0 users

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


Attachments
strace -f -o emacs.strace emacs(-24) -nw (emacs.strace,291.24 KB, text/plain)
2016-01-04 04:47 UTC, Jeroen Roovers (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Teichert 2016-01-03 11:27:44 UTC
If I start up emacs, either with an existing file or without any argument given on the command line, it displays the buffer OK. But any keystroke, even CTRL-x. causes it to abort with:

Fatal error 6: Aborted
Backtrace:
emacs[0x40b150]
Abort


Reproducible: Always

Steps to Reproduce:
1. start emacs
2. press a key to edit a file
3.
Actual Results:  
core dump

Expected Results:  
accept the keypress

This only happens to emacs, xemacs runs fine, though. It does not seem to be kernel related, as it happens on:

Linux esketra 3.14.56-gentoo #1 SMP Mon Dec 28 13:58:30 CET 2015 parisc64 PA8900 (Shortfin) 9000/785/C8000 GNU/Linux

as well as on the older 3.7.0 kernel from the live CD.

emerge --info:

Portage 2.2.24 (python 2.7.10-final-0, default/linux/hppa/13.0, gcc-4.6.3, glibc-2.21-r1, 3.14.56-gentoo parisc64)
=================================================================
System uname: Linux-3.14.56-gentoo-parisc64-PA8900_-Shortfin-with-gentoo-2.2
KiB Mem:     8233696 total,   1065140 free
KiB Swap:     307196 total,    307196 free
Timestamp of repository gentoo: Sat, 02 Jan 2016 21:00:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.2.3-r1::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.3.1-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.18.4::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6::gentoo, 1.12.6::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.6.3::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="hppa"
ACCEPT_LICENSE="* -@EULA"
CBUILD="hppa2.0-unknown-linux-gnu"
CFLAGS="-O2 -pipe -march=2.0"
CHOST="hppa2.0-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=2.0"
DISTDIR="/usr/portage/distfiles"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs 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 xattr
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
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"
USE="X acl bash-completion berkdb bindist bzip2 calendar cdda cddb cdparanoia cli cracklib crypt ctype cups curl cvs cxx dbus emacs enscript firefox foomaticdb fortran ftp games gdbm gimp gpm gzip hppa iconv imlib ipv6 jpeg lame latex libwww milter mmap modules ncurses nls nptl offensive openmp pam pcre perl png posix postgres readline sasl session smp spell ssl subversion syslog sysvipc tcl tcpd threads udev unicode usb xattr xml2 zlib" 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev dummy" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Ulrich Teichert 2016-01-03 11:34:06 UTC
Sorry for pasting emerge --info into the bug description!

gdb isn't too helpful:

ut@esketra ~ $ gdb /usr/bin/emacs-24 core 
GNU gdb (Gentoo 7.9.1 vanilla) 7.9.1
Copyright (C) 2015 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 "hppa2.0-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/emacs-24...Reading symbols from /usr/lib/debug//usr/bin/emacs-24.debug...done.
done.
BFD: Warning: /home/ut/core is truncated: expected core file size >= 8183808, found: 8126464.

warning: core file may not match specified executable file.
[New LWP 21356]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Core was generated by `emacs'.
Program terminated with signal SIGABRT, Aborted.
#0  0xf8c0eca0 in raise () from /lib/libpthread.so.0
(gdb) where
#0  0xf8c0eca0 in raise () from /lib/libpthread.so.0
#1  0x000e78b8 in terminate_due_to_signal (sig=6, backtrace_limit=-121546968) at emacs.c:376
#2  0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


ut@esketra ~ $ gdb /usr/bin/emacs-24 
GNU gdb (Gentoo 7.9.1 vanilla) 7.9.1
Copyright (C) 2015 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 "hppa2.0-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/emacs-24...Reading symbols from /usr/lib/debug//usr/bin/emacs-24.debug...done.
done.
(gdb) break terminate_due_to_signal 
Breakpoint 1 at 0xe782c: file emacs.c, line 348.
(gdb) run
Starting program: /usr/bin/emacs-24 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
linux-nat.c:1035: internal-error: lin_lwp_attach_lwp: Assertion `lwpid > 0' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n

This is a bug, please report it.  For instructions, see:
<https://bugs.gentoo.org/>.

linux-nat.c:1035: internal-error: lin_lwp_attach_lwp: Assertion `lwpid > 0' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
Command aborted.

gdb bug will be reported separately
Comment 2 Ulrich Müller gentoo-dev 2016-01-03 17:41:36 UTC
Does this happen in an X window, or when emacs is started in a terminal (e.g. with the -nw option)?


(In reply to Ulrich Teichert from comment #1)
> Sorry for pasting emerge --info into the bug description!

No problem with that.

Can you please also post the output of "emerge --info app-editors/emacs" (only the part at the end about "Package Settings").
Comment 3 Ulrich Teichert 2016-01-03 18:58:08 UTC
I forgot to add:

This happened after a glibc update. Going back to prior working versions of emacs did not change the issue. Due to the stangeness of the bug and gdb failing too, I suspect that the core problem is the new glibc, although I've rebuild all against the new glibc after updating it. Which is why I can´t go back now ;-{
Comment 4 Ulrich Teichert 2016-01-03 19:03:34 UTC
Happens inside a terminal, this box has no X-server installed, only client libs.
Strangely, xemacs works in both cases, both on a remote X-server and locally in a terminal.

Will post the additional emerge info shortly,

TIA,
Uli
Comment 5 Ulrich Teichert 2016-01-03 19:05:47 UTC
app-editors/emacs-24.5::gentoo was built with the following:
USE="X acl dbus games gpm gtk3 inotify jpeg png xpm zlib -Xaw3d -alsa (-aqua) -athena (-gconf) -gfile -gif -gnutls -gsettings -gtk -gzip-el -hesiod -imagemagick -kerberos -libxml2 -livecd -m17n-lib -motif -pax_kernel (-selinux) -sound -source -svg -tiff -toolkit-scroll-bars -wide-int -xft"
CFLAGS="-O2 -pipe -march=2.0 -g"
CXXFLAGS="-O2 -pipe -march=2.0 -g"
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2016-01-04 04:47:26 UTC
Created attachment 421842 [details]
strace -f -o emacs.strace emacs(-24) -nw

[ebuild   R    ] app-editors/emacs-24.5:24::gentoo  USE="X acl alsa dbus gpm gtk gtk3 inotify jpeg svg tiff xft xpm zlib -Xaw3d (-aqua) -athena -games (-gconf) -gfile -gif -gnutls -gsettings -gzip-el -hesiod -imagemagick -kerberos -libxml2 -livecd -m17n-lib -motif -pax_kernel -png (-selinux) -sound -source -toolkit-scroll-bars -wide-int" 0 KiB
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2016-01-04 04:49:18 UTC
Same problem with emacs-23:

[ebuild   R    ] app-editors/emacs-23.4-r13:23::gentoo  USE="X alsa dbus gpm gtk jpeg svg tiff xft xpm -Xaw3d (-aqua) -athena -games (-gconf) -gif -gzip-el -hesiod -kerberos -livecd -m17n-lib -motif -pax_kernel -png -sound -source -toolkit-scroll-bars" 0 KiB

I'll see if a rebuild against newer linux-headers + glibc helps, since I apparently hadn't done that yet.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2016-01-04 06:02:33 UTC
(In reply to Jeroen Roovers from comment #7)
> I'll see if a rebuild against newer linux-headers + glibc helps, since I
> apparently hadn't done that yet.

No.
Comment 9 Ulrich Teichert 2016-01-04 20:48:31 UTC
With gdb 7.10.1 I'm getting further:

*** Error in `/usr/bin/emacs-24': realloc(): invalid pointer: 0xfaf02e00 ***
Program received signal SIGABRT, Aborted.
0xf7870034 in ?? () from /lib/libc.so.6
(gdb) where
#0  0xf7870034 in ?? () from /lib/libc.so.6
#1  0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) 

Well, don't know if that's really helping...
Comment 10 Ulrich Teichert 2016-01-06 18:03:31 UTC
This is getting wierder and wierder.... I tried emacs24.5-r1 and incidentally tested it on a serial console: it worked! Everything was garbled, and refreshing made it worse, but you could enter text and write a file (if you stayed away from CTRL-S...).

But it still crashes in an xterm or any other terminal I tried (ssh login from another machine).
Comment 11 Ulrich Teichert 2017-04-19 14:13:42 UTC
This is fixed with 25.1
Comment 12 Ulrich Müller gentoo-dev 2017-04-19 15:44:57 UTC
(In reply to Ulrich Teichert from comment #11)
> This is fixed with 25.1

Which is in a different slot though. SLOT="24" is not fixed.
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-03 20:25:06 UTC
Dropping hppa@ from CC as discussed in -lisp, given newer versions work.