GNU bug report logs - #77200
31.0.50; Emacs sometimes crashes if several frames are present

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Sun, 23 Mar 2025 08:46:02 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

To reply to this bug, email your comments to 77200 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77200; Package emacs. (Sun, 23 Mar 2025 08:46:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Markus Triska <triska <at> metalevel.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 23 Mar 2025 08:46:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Markus Triska <triska <at> metalevel.at>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Emacs sometimes crashes if several frames are present
Date: Sun, 23 Mar 2025 09:45:17 +0100
To reproduce this issue, please download several_frames_tty.el from:

    https://www.metalevel.at/ei/several_frames_tty.el

Then start Emacs with:

    $ emacs -Q -nw --load several_frames_tty.el

Leave it running for a bit, and then press:

    C-g C-x C-c

The expectation is that Emacs exits, and it works as expected in many
cases. However, in some cases, I get:

    /lib/x86_64-linux-gnu/libc.so.6(+0x28150)[0x7deeafe28150]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x89)[0x7deeafe28209]
    ./emacs(+0x3f5c5)[0x59a98895d5c5]
    Segmentation fault (core dumped)

I attach the backtrace below.

The example is related to #77046 in that it also causes a
crash. However, this time, several different frames are involved, and
the backtrace is different, so I file this as a seperate issue. Please
do merge the issues if you consider them equivalent.

Thank you and all the best,
Markus

#0  0x000055555559ce5f in check_matrix_pointers (window_matrix=0x0, frame_matrix=0x0) at dispnew.c:3145
#1  0x000055555559cdd7 in check_window_matrix_pointers (w=0x5555560beba0) at dispnew.c:3123
#2  0x000055555559f8f9 in combine_updates_for_frame (f=0x555555b15660, inhibit_scrolling=false) at dispnew.c:4074
#3  0x000055555559f9cc in combine_updates (roots=XIL(0x7ffff72df523)) at dispnew.c:4097
#4  0x00005555556023a9 in redisplay_internal () at xdisp.c:17748
#5  0x00005555555ffa42 in redisplay () at xdisp.c:16802
#6  0x0000555555766abf in read_char (commandflag=1, map=XIL(0x7ffff7341e83), prev_event=XIL(0), used_mouse_menu=0x7fffffffd769, end_time=0x0) at keyboard.c:2672
#7  0x000055555577bc92 in read_key_sequence (keybuf=0x7fffffffd990, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false, disable_text_conversion_p=false) at keyboard.c:10848
#8  0x0000555555762a9b in command_loop_1 () at keyboard.c:1424
#9  0x000055555584add0 in internal_condition_case (bfun=0x55555576264d <command_loop_1>, handlers=XIL(0x90), hfun=0x555555761a40 <cmd_error>) at eval.c:1620
#10 0x00005555557621f0 in command_loop_2 (handlers=XIL(0x90)) at keyboard.c:1163
#11 0x000055555584a1a1 in internal_catch (tag=XIL(0x11df0), func=0x5555557621c2 <command_loop_2>, arg=XIL(0x90)) at eval.c:1300
#12 0x000055555576217e in command_loop () at keyboard.c:1141
#13 0x00005555557614c2 in recursive_edit_1 () at keyboard.c:749
#14 0x00005555557616f6 in Frecursive_edit () at keyboard.c:832
#15 0x000055555575cc04 in main (argc=5, argv=0x7fffffffde58) at emacs.c:2560

Lisp Backtrace:
"redisplay_internal (C function)" (0x0)


In GNU Emacs 31.0.50 (build 4, x86_64-pc-linux-gnu, X toolkit, Xaw
 scroll bars) of 2025-03-23 built on laptop
Repository revision: ab25b4fca9a20ccc03a90ec9c2281a2f88872d93
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12302000
System Description: Ubuntu 23.10

Configured using:
 'configure --with-x-toolkit=lucid --with-xpm=ifavailable
 --with-gif=ifavailable --with-tiff=ifavailable
 --with-gnutls=ifavailable --enable-checking=yes,glyphs
 --enable-check-lisp-object-type 'CFLAGS=-O0 -g3''

Configured features:
FREETYPE GMP JPEG LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP
SOUND THREADS TOOLKIT_SCROLL_BARS X11 XDBE XFT XIM XPM LUCID ZLIB





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77200; Package emacs. (Sun, 23 Mar 2025 09:40:03 GMT) Full text and rfc822 format available.

Message #8 received at 77200 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Markus Triska <triska <at> metalevel.at>
Cc: 77200 <at> debbugs.gnu.org
Subject: Re: bug#77200: 31.0.50;
 Emacs sometimes crashes if several frames are present
Date: Sun, 23 Mar 2025 11:39:01 +0200
> From: Markus Triska <triska <at> metalevel.at>
> Date: Sun, 23 Mar 2025 09:45:17 +0100
> 
> To reproduce this issue, please download several_frames_tty.el from:
> 
>     https://www.metalevel.at/ei/several_frames_tty.el
> 
> Then start Emacs with:
> 
>     $ emacs -Q -nw --load several_frames_tty.el
> 
> Leave it running for a bit, and then press:
> 
>     C-g C-x C-c
> 
> The expectation is that Emacs exits, and it works as expected in many
> cases. However, in some cases, I get:
> 
>     /lib/x86_64-linux-gnu/libc.so.6(+0x28150)[0x7deeafe28150]
>     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x89)[0x7deeafe28209]
>     ./emacs(+0x3f5c5)[0x59a98895d5c5]
>     Segmentation fault (core dumped)
> 
> I attach the backtrace below.

I could only reproduce this once, and checked in a fix.  Please try
again with the current master branch.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77200; Package emacs. (Sun, 23 Mar 2025 09:47:03 GMT) Full text and rfc822 format available.

Message #11 received at 77200 <at> debbugs.gnu.org (full text, mbox):

From: Markus Triska <triska <at> metalevel.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 77200 <at> debbugs.gnu.org
Subject: Re: bug#77200: 31.0.50;
 Emacs sometimes crashes if several frames are present
Date: Sun, 23 Mar 2025 10:46:43 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> I could only reproduce this once, and checked in a fix.  Please try
> again with the current master branch.

Awesome, it seems to work nicely, thank you a lot!

All the best,
Markus




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sun, 23 Mar 2025 09:57:04 GMT) Full text and rfc822 format available.

Notification sent to Markus Triska <triska <at> metalevel.at>:
bug acknowledged by developer. (Sun, 23 Mar 2025 09:57:04 GMT) Full text and rfc822 format available.

Message #16 received at 77200-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Markus Triska <triska <at> metalevel.at>
Cc: 77200-done <at> debbugs.gnu.org
Subject: Re: bug#77200: 31.0.50;
 Emacs sometimes crashes if several frames are present
Date: Sun, 23 Mar 2025 11:55:59 +0200
> From: Markus Triska <triska <at> metalevel.at>
> Cc: 77200 <at> debbugs.gnu.org
> Date: Sun, 23 Mar 2025 10:46:43 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > I could only reproduce this once, and checked in a fix.  Please try
> > again with the current master branch.
> 
> Awesome, it seems to work nicely, thank you a lot!

Thanks, closing.




This bug report was last modified 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.