emacs works fine with x11-libs/libX11-1.6.9, but when I updated this dependency to x11-libs/libX11-1.6.10, emacs immediately crashes The emacs package is app-editors/emacs-27.0.91, but I don't think it's related as it hasn't been updated for a while. This problem is reproducible with all USE but X disabled on app-editors/emacs. Reproducible: Always Steps to Reproduce: 1. install app-editors/emacs-27.0.91 while making sure x11-libs/libX11-1.6.10 is installed 2. run emacs without "-nw" Actual Results: Emacs crashed with following message: $ emacs Warning: Name: emacs Class: ApplicationShell Cannot open input method - using XLookupString. Fatal error 11: Segmentation fault Backtrace: emacs(+0x140031)[0x55c500efb031] emacs(+0x3f515)[0x55c500dfa515] emacs(+0x3f9dc)[0x55c500dfa9dc] emacs(+0x13e20d)[0x55c500ef920d] emacs(+0x13e289)[0x55c500ef9289] /lib64/libpthread.so.0(+0x136b0)[0x7f6380edc6b0] emacs(+0x1130e8)[0x55c500ece0e8] emacs(+0x114448)[0x55c500ecf448] emacs(+0x11564d)[0x55c500ed064d] emacs(+0x1a3413)[0x55c500f5e413] emacs(+0x1d8ae2)[0x55c500f93ae2] emacs(+0x1a333f)[0x55c500f5e33f] emacs(+0x1d8ae2)[0x55c500f93ae2] emacs(+0x1a333f)[0x55c500f5e33f] emacs(+0x1a5353)[0x55c500f60353] emacs(+0x1a3413)[0x55c500f5e413] emacs(+0x1d8ae2)[0x55c500f93ae2] emacs(+0x1a333f)[0x55c500f5e33f] emacs(+0x1d8ae2)[0x55c500f93ae2] emacs(+0x1a333f)[0x55c500f5e33f] emacs(+0x1d8ae2)[0x55c500f93ae2] emacs(+0x1a333f)[0x55c500f5e33f] emacs(+0x1d8ae2)[0x55c500f93ae2] emacs(+0x1a333f)[0x55c500f5e33f] emacs(+0x1d8ae2)[0x55c500f93ae2] emacs(+0x1a66eb)[0x55c500f616eb] emacs(+0x1a5796)[0x55c500f60796] emacs(+0x1a72a9)[0x55c500f622a9] emacs(+0x1a2517)[0x55c500f5d517] emacs(+0x1265d6)[0x55c500ee15d6] emacs(+0x1a2471)[0x55c500f5d471] emacs(+0x1256f0)[0x55c500ee06f0] emacs(+0x12ac16)[0x55c500ee5c16] emacs(+0x12af41)[0x55c500ee5f41] emacs(+0x467f0)[0x55c500e017f0] /lib64/libc.so.6(__libc_start_main+0xea)[0x7f6380c48caa] emacs(+0x46fca)[0x55c500e01fca] [1] 773 segmentation fault emacs The original thread is https://forums.gentoo.org/viewtopic-p-8486980.html, in which I attempted to get more info with gdb. I did manage to get some stack trace but some debugging symbols are still missing to reveal anything useful to me.
Created attachment 652436 [details] emerge --info 'x11-libs/libX11' emacs
Could you try get debugging symbols with https://wiki.gentoo.org/wiki/Debugging?
Created attachment 652438 [details] gdb /usr/bin/emacs gdb /usr/bin/emacs
Now I realized for whatever reason, running executable with exec-file command in gdb is different than just run gdb with the binary, so `gdb /usr/bin/emacs` does provide more info about what's going on. I followed https://wiki.gentoo.org/wiki/Debugging to apply both debugsyms and installsources to both emacs and libX11. Result of `gdb /usr/bin/emacs` is uploaded to attachments.
This could be https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues/116 after some poking around.
I cannot reproduce the problem (with emacs-27.0.91 and libX11-1.6.10, same USE flags as yours).
Created attachment 652446 [details, diff] upstream patch This patch is downloade directly from https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/40, authored by Yichao Yu. I can confirm this patch fixed the problem on my side.
Re to comment #6: I suspect this has something to do with input methods - I have fcitx installed and my .xsession exports few environment variables that could be related: export XMODIFIERS="@im=fcitx" export QT_IM_MODULE="fcitx" export GTK_IM_MODULE="fcitx"
(In reply to Javran Cheng from comment #7) > Created attachment 652446 [details, diff] [details, diff] > upstream patch > > This patch is downloade directly from > https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/40, authored > by Yichao Yu. This has been merged into master upstream.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a36d5019b8e24067defc660ecb3ccc6191ab9a5 commit 7a36d5019b8e24067defc660ecb3ccc6191ab9a5 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2020-08-06 17:25:04 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2020-08-06 17:26:14 +0000 x11-libs/libX11: Version bump to 1.6.11 Closes: https://bugs.gentoo.org/735596 Signed-off-by: Matt Turner <mattst88@gentoo.org> x11-libs/libX11/Manifest | 1 + x11-libs/libX11/libX11-1.6.11.ebuild | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+)