bug#80607: 31.0.50; notmuch-search with long query crashes Wayland

Subject: bug#80607: 31.0.50; notmuch-search with long query crashes Wayland

Date: Fri, 13 Mar 2026 12:44:11 +0000

To: 80607@debbugs.gnu.org

Cc: notmuch@notmuchmail.org

From: Sean Whitton


X-debbugs-cc: notmuch@notmuchmail.org

In 'emacs -q', after 'M-x load-library RET notmuch RET' (version 0.39)
and with a populated notmuch database, evaluating the following form
crashes Emacs and manages to bring down the entire Wayland compositor
and systemd user session:

    (notmuch-search "thread:00000000000a162e thread:00000000000a162e ...")

where "..." is the same space-separated thread:00000000000a162e repeated
until the query is around 2000 characters in length.

I don't think it is command line length limits because I tried tripling
the length of the query and running it in a terminal and it completes
fine (returning the single thread as expected).

There has to be an Emacs bug here because Lisp should not be able to
crash Emacs like this.  Reproducible with and without native compilation
enabled, and with Emacs 30.

I think this is a display engine problem.
This is my Wayland error output:

00:04:33.890 [ERROR] [sway/sway_text_node.c:110] cairo_image_surface_create failed: invalid value (typically too big) for the size of the input (surface, pattern, etc.)
00:04:33.890 [ERROR] [sway/sway_text_node.c:110] cairo_image_surface_create failed: invalid value (typically too big) for the size of the input (surface, pattern, etc.)
sway: render/pass.c:23: wlr_render_pass_add_texture: Assertion `box->x >= 0 && box->y >= 0 && box->x + box->width <= options->texture->width && box->y + box->height <= options->texture->height' failed.
 err: wayland.c:1617: failed to read events from the Wayland socket: Broken pipe
Gdk-Message: 12:40:52.454: Error reading events from display: Broken pipe
I2026-03-13 12:40:52.454856 waylandmodule.cpp:360] Connection removed 
Gdk-Message: 12:40:52.454: Error reading events from display: Broken pipe
W2026-03-13 12:40:52.458044 xcbeventreader.cpp:51] XCB connection ":0" got error: 1
Gdk-Message: 12:40:52.458: Error reading events from display: Broken pipe
could not connect to wayland server
I(EE) 
Fatal server error:
(EE) Couldn't add screen
(EE) 
2026-03-13 12:40:52.465323 addonmanager.cpp:308] Unloading addon mozc
I2026-03-13 12:40:52.465433 addonmanager.cpp:308] Unloading addon notifications
I2026-03-13 12:40:52.465471 addonmanager.cpp: err: 308wayland.c:2253: ] failed to roundtrip Wayland displayUnloading addon notificationitem
: Broken pipe
 err: wayland.c:2253: failed to roundtrip Wayland display: Broken pipe
 err: wayland.c:2253: failed to roundtrip Wayland display: Broken pipe
I2026-03-13 12:40:52.465540 addonmanager.cpp:308] Unloading addon classicui
I2026-03-13 12:40:52.466317 addonmanager.cpp:308] Unloading addon virtualkeyboard
I2026-03-13 12:40:52.466342 addonmanager.cpp:308] Unloading addon kimpanel
I2026-03-13 12:40:52.466360 addonmanager.cpp:308] Unloading addon xim
I2026-03-13 12:40:52.466377 addonmanager.cpp:308] Unloading addon dbusfrontend
I2026-03-13 12:40:52.466411 addonmanager.cpp:308] Unloading addon unicode
I2026-03-13 12:40:52.466428 addonmanager.cpp:308] Unloading addon imeapi
I2026-03-13 12:40:52.466518 addonmanager.cpp:308] Unloading addon ibusfrontend
warn: terminal.c:2015: slave exited with signal 1 (Hangup)
I2026-03-13 12:40:52.473885 addonmanager.cpp:308] Unloading addon fcitx4frontend
I2026-03-13 12:40:52.473990 addonmanager.cpp:308] Unloading addon dbus
I2026-03-13 12:40:52.474076 addonmanager.cpp:308] Unloading addon luaaddonloader
I2026-03-13 12:40:52.474108 addonmanager.cpp:308] Unloading addon pinyinhelper
I2026-03-13 12:40:52.474142 addonmanager.cpp:308] Unloading addon clipboard
I2026-03-13 12:40:52.474187 addonmanager.cpp:308] Unloading addon keyboard
I2026-03-13 12:40:52.474270 addonmanager.cpp:308] Unloading addon waylandim
I2026-03-13 12:40:52.474300 addonmanager.cpp:308] Unloading addon wayland
I2026-03-13 12:40:52.474331 addonmanager.cpp:308] Unloading addon quickphrase
I2026-03-13 12:40:52.474540 addonmanager.cpp:308] Unloading addon imselector
I2026-03-13 12:40:52.474561 addonmanager.cpp:308] Unloading addon xcb
 err: wayland.c:2218: failed to flush wayland socket: Broken pipe
Error: Wayland connection experienced a fatal error: -1
Error: Temperature adjustment failed.

-- 
Sean Whitton


_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: