View Issue Details

IDProjectCategoryView StatusLast Update
0000484AlmaLinux-8emacspublic2024-10-28 19:35
Reportercatselbow Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformAlmaLinuxOSAlmaLinuxOS Version8.10
Summary0000484: When starting emacs via "ssh -Y" into AlmaLinux from recent Ubuntu or Fedora, emacs segfaults when text is selected
DescriptionI'm using "ssh -Y" to connect to an AlmaLinux computer from Ubuntu 22.04 or 24.04 or Fedora 38. When I run emacs on the Almalinux computer, displaying on one of the other computers, emacs segfaults as soon as I select text (ctrl-space, then press the down arrow).

This doesn't happen when using "ssh -Y" to connect to an up-to-date CentOS stream computer. I've attached a file showing the error messages emacs emits when it crashes.

This happens with multiple computers running Almalinux 8.10.

It does not happen when the local computer is itself running AlmaLinux 8.10. I've also found that it doesn't happen when the local computer is running Ubuntu 16.

This is new behavior. Formerly, emacs behaved normally. I've tried downgrading emacs, libX11, gtk3, and glibc, but none of these make any difference.
Steps To ReproduceFrom Ubuntu 22.04 or 24.04, use "ssh -Y" to log into an AlmaLinux 8.10 computer.

Start emacs (the graphical version, not emacs-nox).

Press ctrl-space to begin selecting text.

Press the down arrow key.

Emacs crashes with a segfault.
TagsNo tags attached.
Attached Files
emacs-crash.txt (1,234 bytes)   
Fatal error 11: Segmentation fault
Backtrace:
emacs[0x5179a2]
emacs[0x4fcf2e]
emacs[0x515e14]
emacs[0x516048]
emacs[0x5160cd]
/lib64/libpthread.so.0(+0x12d10)[0x7f3557a33d10]
/lib64/libX11.so.6(XVisualIDFromVisual+0x4)[0x7f355b463dc4]
/lib64/libgdk-3.so.0(gdk_x11_window_foreign_new_for_display+0x1a8)[0x7f355d30f588]
/lib64/libgdk-3.so.0(+0x67648)[0x7f355d2f6648]
/lib64/libgdk-3.so.0(+0x6db5c)[0x7f355d2fcb5c]
/lib64/libgdk-3.so.0(+0x6d665)[0x7f355d2fc665]
/lib64/libgdk-3.so.0(gdk_display_get_event+0x44)[0x7f355d2c5c04]
/lib64/libgdk-3.so.0(+0x6d2d6)[0x7f355d2fc2d6]
/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x15d)[0x7f355bbe6aed]
/lib64/libglib-2.0.so.0(+0x4dea8)[0x7f355bbe6ea8]
/lib64/libglib-2.0.so.0(g_main_context_iteration+0x30)[0x7f355bbe6f40]
/lib64/libgtk-3.so.0(gtk_main_iteration+0x19)[0x7f355d7cbf79]
emacs[0x4c9d62]
emacs[0x504319]
emacs[0x504925]
emacs[0x5e5700]
emacs[0x4639f6]
emacs[0x453a89]
emacs[0x45889b]
emacs[0x46cb4d]
emacs[0x46f7c6]
emacs[0x574d4e]
emacs[0x45c3aa]
emacs[0x50700f]
emacs[0x50aae0]
emacs[0x50c1e4]
emacs[0x574cb6]
emacs[0x4fd304]
emacs[0x574c25]
emacs[0x4fd2a3]
emacs[0x502467]
emacs[0x5027c8]
emacs[0x41dd28]
/lib64/libc.so.6(__libc_start_main+0xe5)[0x7f3556e4d7e5]
emacs[0x41e9ae]
emacs-crash.txt (1,234 bytes)   
abrt_hash
URL

Activities

catselbow

2024-10-25 13:14

reporter   ~0001074

One other thing I noticed. I thought I might rebuild emacs from the source rpm. The emacs version I'm using is emacs-26.1-12.el8_10.x86_64, installed from the AppStream repository (see below). But the source rpm for this version isn't in the appstream source repo here: https://vault.almalinux.org/8.10/AppStream/Source/Packages/. The binary rpm is here: https://repo.almalinux.org/almalinux/8.10/AppStream/x86_64/os/Packages/emacs-26.1-12.el8_10.x86_64.rpm . Is the source rpm somewhere else?

Name : emacs
Epoch : 1
Version : 26.1
Release : 12.el8_10
Architecture : x86_64
Size : 38 M
Source : emacs-26.1-12.el8_10.src.rpm
Repository : @System
From repo : appstream
Summary : GNU Emacs text editor
URL : http://www.gnu.org/software/emacs/
License : GPLv3+ and CC0-1.0
Description : Emacs is a powerful, customizable, self-documenting, modeless
             : text editor. Emacs contains special code editing features, a
             : scripting language (elisp), and the capability to read mail,
             : news, and more without leaving the editor.
             :
             : This package provides an emacs binary with support for X windows.

pastalian

2024-10-25 14:38

reporter   ~0001075

The srpm is here: https://vault.almalinux.org/8.10/BaseOS/Source/Packages/emacs-26.1-12.el8_10.src.rpm

Can you upload a core dump so others can see where it failed?
```
$ ulimit -c unlimited
$ emacs # Segmentation fault
$ coredumpctl dump emacs --output core # "core" file is the core dump
```

catselbow

2024-10-28 19:35

reporter   ~0001076

OK, the workaround is to set:

XLIB_SKIP_ARGB_VISUALS=0

On all of my Almalinux computers I've been setting this to 1 by default, because it was necessary to work around ANOTHER emacs crash in the past. Now it looks like it triggers a segfault. Doing some debugging, I found that XGetWindowAttributes was returning an attributes structure that included a null pointer for "visual". This caused the crash. Googling for things around that, I found this 2021 post on an OpenSuse mailing list that describes the same problem:

https://lists.opensuse.org/archives/list/bugs@lists.opensuse.org/thread/FPUCBBN36DRGKWWE6QB3I6TEU3YNJCGR/

It looks like XLIB_SKIP_ARGB_VISUALS was introduced to be able to make things ignore fake visuals created by compositors.

Setting the variable to 1 now causes emacs to segfault reliably when run over an "ssh -Y" connection from Ubuntu 22.04 or 24.04. Setting the variable to 0 removes this problem. I'm still not sure whether the original problem that caused me to set it to 1 has been fixed, but I'll do some experiments.

Issue History

Date Modified Username Field Change
2024-10-24 19:48 catselbow New Issue
2024-10-24 19:48 catselbow File Added: emacs-crash.txt
2024-10-25 13:14 catselbow Note Added: 0001074
2024-10-25 14:38 pastalian Note Added: 0001075
2024-10-28 19:35 catselbow Note Added: 0001076