http://bugzilla.opensuse.org/show_bug.cgi?id=1198616
Bug ID: 1198616 Summary: Emacs segfaults in xterm (or urxvt) without DISPLAY Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: screening-team-bugs@suse.de Reporter: mjambor@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: ---
After upgrading to Tumbleweed 20220415 and emacs-28.1-393.10.x86_64, when I open xterm and unset DISPLAY, emacs almost always crashes. Even with -Q. Sometimes I can get something that looks like a potentially useful backtrace in gdb, sometimes not. The potentially useful one is:
Thread 1 "emacs-gtk" received signal SIGSEGV, Segmentation fault. (gdb) bt #0 0x00000000004707a9 in () #1 0x00000000004748d3 in update_frame () #2 0x00000000004a0fd5 in () #3 0x00000000004976a9 in message3_nolog () #4 0x0000000000497978 in message3 () #5 0x00000000005df970 in Fmessage () #6 0x00000000005e3d81 in funcall_subr () #7 0x00000000005e2723 in Ffuncall () #8 0x0000000000629c70 in exec_byte_code () #9 0x00000000005e22e8 in () #10 0x00000000005e25bd in Ffuncall () #11 0x0000000000611308 in Fload () #12 0x00000000005e3e76 in funcall_subr () #13 0x00000000005e2723 in Ffuncall () #14 0x0000000000629c70 in exec_byte_code () #15 0x00000000005e22e8 in () #16 0x00000000005e7e31 in () #17 0x00000000005e8161 in eval_sub () #18 0x00000000006137af in () #19 0x000000000061600d in () #20 0x0000000000616371 in Feval_buffer () #21 0x00000000005e3e76 in funcall_subr () #22 0x00000000005e2723 in Ffuncall () #23 0x0000000000629c70 in exec_byte_code () #24 0x00000000005e22e8 in () #25 0x00000000005e25bd in Ffuncall () #26 0x0000000000611308 in Fload () #27 0x00000000005e3e76 in funcall_subr () #28 0x00000000005e2723 in Ffuncall () #29 0x0000000000629c70 in exec_byte_code () #30 0x00000000005e22e8 in () #31 0x00000000005e25bd in Ffuncall () #32 0x0000000000629c70 in exec_byte_code () #33 0x00000000005e22e8 in () #34 0x00000000005e25bd in Ffuncall () #35 0x0000000000629c70 in exec_byte_code () #36 0x00000000005e22e8 in () #37 0x00000000005e7e31 in () #38 0x00000000005e8161 in eval_sub () #39 0x000000000055f346 in () #40 0x00000000005e0cf7 in internal_condition_case () #41 0x000000000055f7b2 in () #42 0x00000000005e0c51 in internal_catch () #43 0x000000000055fb5b in () #44 0x000000000055fc5f in recursive_edit_1 () #45 0x000000000055fde3 in Frecursive_edit () #46 0x000000000046ae2c in main () (gdb) info threads Id Target Id Frame * 1 Thread 0x7fffec13b480 (LWP 18954) "emacs-gtk" 0x00000000004707a9 in ?? () 2 Thread 0x7fffeb347640 (LWP 18960) "gmain" 0x00007fffef35752f in __GI___poll (fds=0xb48020, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 (gdb) thread 2 [Switching to thread 2 (Thread 0x7fffeb347640 (LWP 18960))] #0 0x00007fffef35752f in __GI___poll (fds=0xb48020, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 29 return SYSCALL_CANCEL (poll, fds, nfds, timeout); (gdb) bt #0 0x00007fffef35752f in __GI___poll (fds=0xb48020, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29 #1 0x00007ffff6ef144e in () at /lib64/libglib-2.0.so.0 #2 0x00007ffff6ef156f in g_main_context_iteration () at /lib64/libglib-2.0.so.0 #3 0x00007ffff6ef15c1 in () at /lib64/libglib-2.0.so.0 #4 0x00007ffff6f1bac5 in () at /lib64/libglib-2.0.so.0 #5 0x00007fffef2db2ba in start_thread (arg=<optimized out>) at pthread_create.c:442 #6 0x00007fffef365460 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Emacs seems to run fine in GNU screen (so this is my workaround) or in a virtual terminal.
emacs-x11 and emacs-nox are also affected, except that both seem not crash under gdb (at least not now) and after that one successful start they also work in the same xterm window. But not in new ones.
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c1
Dr. Werner Fink werner@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mjambor@suse.com Flags| |needinfo?(mjambor@suse.com)
--- Comment #1 from Dr. Werner Fink werner@suse.com --- Are you using emacs as a server? Please provide your locale as well as your used display (session) manager.
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c2
--- Comment #2 from Dr. Werner Fink werner@suse.com --- Beside this and as emacs is compiled with
--with-native-compilation
do you have installed the packages emacs-eln as well as emacs-el?
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c3
--- Comment #3 from Martin Jambor mjambor@suse.com --- (In reply to Dr. Werner Fink from comment #1)
Are you using emacs as a server?
No, I run each "invocation" as a separate process.
Please provide your locale
mjambor@virgil:~$ locale LANG=C LC_CTYPE=en_US.UTF-8 LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C" LC_MONETARY="C" LC_MESSAGES="C" LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL=
as well as your used display (session) manager.
The problem happens on both my desktop where I use LightDM and on my notebook where I use XDM. My Window Manager on both is Fluxbox.
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c4
Martin Jambor mjambor@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(mjambor@suse.com) |
--- Comment #4 from Martin Jambor mjambor@suse.com --- (In reply to Dr. Werner Fink from comment #2)
Beside this and as emacs is compiled with
--with-native-compilation
do you have installed the packages emacs-eln as well as emacs-el?
Yes, I have both. Both are version 28.1-393.10 and come from the "editors" repository (just like emacs itself). I switched to this repo because of some earlier bug, is it perhaps time to switch back?
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c5
Dr. Werner Fink werner@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(mjambor@suse.com)
--- Comment #5 from Dr. Werner Fink werner@suse.com --- Created attachment 858295 --> http://bugzilla.opensuse.org/attachment.cgi?id=858295&action=edit emacs-gtk started with DISPLAY variable unset
With plain compiled GNU Emacs for Tumbleweed (fresh install from yesterday) I can not reproduce this crash.
/suse/werner> (unsetenv DISPLAY; emacs-gtk) /suse/werner> rpm -q emacs emacs-28.1-1.1.x86_64 /suse/werner> grep -E '^(NAME|VERSION_ID)' /etc/os-release NAME="openSUSE Tumbleweed" VERSION_ID="20220419"
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c6
--- Comment #6 from Dr. Werner Fink werner@suse.com --- Maybe we see a problem between incompatible libraries
/suse/werner> ldd /usr/bin/emacs-gtk | grep glib libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007fb3e303f000) /suse/werner> rpm -qf /lib64/libglib-2.0.so.0 libglib-2_0-0-2.72.0-2.1.x86_64
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c7
--- Comment #7 from Martin Jambor mjambor@suse.com --- I see that there is a needinfo set to me, what are the information I should still provide? (I understand it is something that is very difficult to debug but would like to help as much as I can).
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c8
--- Comment #8 from Dr. Werner Fink werner@suse.com --- (In reply to Martin Jambor from comment #7)
I see that there is a needinfo set to me, what are the information I should still provide? (I understand it is something that is very difficult to debug but would like to help as much as I can).
Does it work with the original build system/Tumbleweed version (aka not from the editor repository)?
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c9
Martin Jambor mjambor@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(mjambor@suse.com) |
--- Comment #9 from Martin Jambor mjambor@suse.com --- My apologies for not being able to come to this earlier.
Yes, the issue persists even on emacs from standard Tumbleweed repository.
I have experimented more and realized the issue depends on my Xresource settings and was able to reproduce it on fairly standard Tumbleweed install without much, if any, customization:
1. In a terminal emulator: Issue the following command: echo 'ts10*geometry: 80x26+20-0' | xrdb -merge
2. Run xterm with: xterm -name ts10
3. In that xterm, unset DISPLAY and run emacs.
This reliably crashes for me on all computer I tried.
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c10
--- Comment #10 from Dr. Werner Fink werner@suse.com --- (In reply to Martin Jambor from comment #9)
My apologies for not being able to come to this earlier.
Yes, the issue persists even on emacs from standard Tumbleweed repository.
I have experimented more and realized the issue depends on my Xresource settings and was able to reproduce it on fairly standard Tumbleweed install without much, if any, customization:
In a terminal emulator: Issue the following command: echo 'ts10*geometry: 80x26+20-0' | xrdb -merge
Run xterm with: xterm -name ts10
In that xterm, unset DISPLAY and run emacs.
This reliably crashes for me on all computer I tried.
Just tried that but ... it works here, there seems to be more than this simple setup which cause this crash
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c11
Dr. Werner Fink werner@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(mjambor@suse.com)
--- Comment #11 from Dr. Werner Fink werner@suse.com --- Please change in the .emacs.d/ into your hom directory
cd ~/.emacs.d/
then remove the directory eln-cache/
rm -rf eln-cache/
and afterwards retry to start emacs-nox or emacs-gtk or emacs-x11 without DISPLAY set:
unset DISPLAY emacs-nox
http://bugzilla.opensuse.org/show_bug.cgi?id=1198616 http://bugzilla.opensuse.org/show_bug.cgi?id=1198616#c12
Martin Jambor mjambor@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Flags|needinfo?(mjambor@suse.com) |
--- Comment #12 from Martin Jambor mjambor@suse.com --- Around February I realized this has stopped happening on all affected machines (and was not happening on newly installed ones).
Thanks for taking the time to investigate and think about this.