#926025 emacs-gtk: Crash in redisplay_internal() due to use of emacs_abort()

Package:
emacs-gtk
Source:
emacs
Description:
GNU Emacs editor (with GTK+ GUI support)
Submitter:
Florent Rougon
Date:
2021-03-01 17:21:17 UTC
Severity:
normal
Tags:
#926025#5
Date:
2019-03-30 14:43:23 UTC
From:
To:
Dear maintainer,

I encountered a reproducible crash this morning every time I tried to
enter one of my email 'nnml' groups in Gnus. I am attaching a full
backtrace with debug symbols, the top of which is:

Thread 1 "emacs" received signal SIGABRT, Aborted.
raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff480d5cb in raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00000000004f6ea7 in terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at ./debian/build-src/src/emacs.c:394
#2  0x0000000000511573 in emacs_abort () at ./debian/build-src/src/sysdep.c:2426
#3  0x00000000004574fa in redisplay_internal () at ./debian/build-src/src/lisp.h:2797

FYI, I am using the Gnus version that is shipped with the Debian Emacs
package indicated in metadata of this report, but this is probably not
very important, as the crash seems to be related to GTK+. This can be
seen in the backtrace, and also because the very same action that
repeatedly caused the crash could be done without any problem when
starting Emacs with 'emacs -nw'. This way, I could remove recent spammy
messages from the offending 'nnml' group and open it again with
emacs-gtk without having any crash.

I have a backup of my mail groups and ~/.newsrc* at the time of the
crash, therefore if needed, I would probably be able to reproduce it
again. I also have the core file here, it takes 15M with xz compression.

Thanks. :)

#926025#10
Date:
2020-01-02 11:22:17 UTC
From:
To:
FWIW, I also get this crash when opening one of my folders (nnimap)
using Gnus that is shipped with Emacs.  A more complete backtrace can be
found below.

/Simon

Fatal error 6: Aborted
Thread 1 "emacs" received signal SIGABRT, Aborted.
raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: Filen eller katalogen finns inte.
(gdb) bt
#0  raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00000000004f6f37 in terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at ./debian/build-src/src/emacs.c:394
#2  0x0000000000511643 in emacs_abort () at ./debian/build-src/src/sysdep.c:2426
#3  0x00000000004574ea in redisplay_internal () at ./debian/build-src/src/lisp.h:2797
#4  0x0000000000459c22 in redisplay_preserve_echo_area (from_where=from_where@entry=13) at ./debian/build-src/src/xdisp.c:14630
#5  0x00000000005ab860 in Fdelete_process (process=61304133) at ./debian/build-src/src/process.c:1078
#6  0x00000000005b35f5 in kill_buffer_processes (buffer=buffer@entry=0) at ./debian/build-src/src/process.c:7836
#7  0x00000000004f6dfa in shut_down_emacs (sig=sig@entry=6, stuff=stuff@entry=0) at ./debian/build-src/src/lisp.h:855
#8  0x00000000004f6f63 in terminate_due_to_signal (sig=sig@entry=6, backtrace_limit=backtrace_limit@entry=40) at ./debian/build-src/src/lisp.h:855
#9  0x0000000000511643 in emacs_abort () at ./debian/build-src/src/sysdep.c:2426
#10 0x00000000004574ea in redisplay_internal () at ./debian/build-src/src/lisp.h:2797
#11 0x0000000000459c22 in redisplay_preserve_echo_area (from_where=from_where@entry=13) at ./debian/build-src/src/xdisp.c:14630
#12 0x00000000005ab860 in Fdelete_process (process=59467093) at ./debian/build-src/src/process.c:1078
#13 0x00000000005b35f5 in kill_buffer_processes (buffer=buffer@entry=0) at ./debian/build-src/src/process.c:7836
#14 0x00000000004f6d34 in shut_down_emacs (sig=sig@entry=0, stuff=stuff@entry=0) at ./debian/build-src/src/lisp.h:855
#15 0x00000000004c3efd in x_connection_closed (dpy=dpy@entry=0x2ae86c0, error_message=<optimized out>,
    error_message@entry=0x7fffffff5880 "X protocol error: BadLength (poly request too large or internal Xlib length error) on protocol request 139",
    ioerror=ioerror@entry=false) at ./debian/build-src/src/lisp.h:855
#16 0x00000000004c7d49 in x_error_quitter (display=0x2ae86c0, event=<optimized out>, event=<optimized out>) at ./debian/build-src/src/xterm.c:9904
#17 0x00000000004c7dcb in x_error_handler (display=0x2ae86c0, event=0x7fffffff5a40) at ./debian/build-src/src/xterm.c:9874
#18 0x00007ffff684b11a in _XError () from /lib/x86_64-linux-gnu/libX11.so.6
#19 0x00007ffff6848077 in ?? () from /lib/x86_64-linux-gnu/libX11.so.6
#20 0x00007ffff684811d in ?? () from /lib/x86_64-linux-gnu/libX11.so.6
#21 0x00007ffff6848a55 in _XEventsQueued () from /lib/x86_64-linux-gnu/libX11.so.6
#22 0x00007ffff683a7b7 in XPending () from /lib/x86_64-linux-gnu/libX11.so.6
#23 0x00007ffff70e420d in ?? () from /lib/x86_64-linux-gnu/libgdk-3.so.0
#24 0x00007ffff6bbd669 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff6bbe06b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff6bbe207 in g_main_context_pending () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007ffff73b2b9d in gtk_events_pending () from /lib/x86_64-linux-gnu/libgtk-3.so.0
#28 0x00000000004c4917 in XTread_socket (terminal=<optimized out>, hold_quit=0x7fffffff5d40) at ./debian/build-src/src/xterm.c:9142
#29 0x00000000004fe1c9 in gobble_input () at ./debian/build-src/src/keyboard.c:6910
#30 0x00000000004fe875 in handle_async_input () at ./debian/build-src/src/keyboard.c:7146
#31 process_pending_signals () at ./debian/build-src/src/keyboard.c:7160
#32 0x00000000005d8dd7 in xftfont_open (f=<optimized out>, entity=70284725, pixel_size=15) at ./debian/build-src/src/xftfont.c:391
#33 0x0000000000586aa4 in font_open_entity (f=0x1010c80 <bss_sbrk_buffer+6280288>, entity=70284725, pixel_size=15) at ./debian/build-src/src/font.c:2903
#34 0x00000000005db72a in fontset_find_font (fontset=fontset@entry=59386213, c=c@entry=9200, face=face@entry=0x41b9720, charset_id=charset_id@entry=-1,
    fallback=fallback@entry=true) at ./debian/build-src/src/lisp.h:855
#35 0x00000000005db9b1 in fontset_font (fontset=fontset@entry=59386213, c=c@entry=9200, face=face@entry=0x41b9720, id=-1) at ./debian/build-src/src/fontset.c:788
#36 0x00000000005dbcbc in face_for_char (f=0x1010c80 <bss_sbrk_buffer+6280288>, face=face@entry=0x41b9720, c=9200, pos=<optimized out>, object=<optimized out>)
    at ./debian/build-src/src/fontset.c:990
#37 0x0000000000448473 in FACE_FOR_CHAR (object=<optimized out>, pos=<optimized out>, character=<optimized out>, face=0x41b9720, f=<optimized out>)
    at ./debian/build-src/src/dispextern.h:1818
#38 get_next_display_element (it=it@entry=0x7fffffff87f0) at ./debian/build-src/src/xdisp.c:7303
#39 0x000000000044f698 in display_line (it=it@entry=0x7fffffff87f0, cursor_vpos=cursor_vpos@entry=0) at ./debian/build-src/src/xdisp.c:21409
#40 0x000000000045450b in try_window (window=window@entry=16919605, pos=..., flags=flags@entry=1) at ./debian/build-src/src/xdisp.c:17627
#41 0x0000000000467cdb in redisplay_window (window=16919605, just_this_one_p=just_this_one_p@entry=false) at ./debian/build-src/src/xdisp.c:17074
#42 0x000000000046ab7b in redisplay_window_0 (window=window@entry=16919605) at ./debian/build-src/src/xdisp.c:14831
#43 0x000000000056ce36 in internal_condition_case_1 (bfun=bfun@entry=0x46ab50 <redisplay_window_0>, arg=16919605, handlers=<optimized out>,
    hfun=hfun@entry=0x42f9b0 <redisplay_window_error>) at ./debian/build-src/src/eval.c:1356
#44 0x00000000004346c2 in redisplay_windows (window=16919605) at ./debian/build-src/src/xdisp.c:14811
#45 0x0000000000457d35 in redisplay_internal () at ./debian/build-src/src/xdisp.c:14300
#46 0x0000000000459bc5 in redisplay () at ./debian/build-src/src/xdisp.c:13518
#47 0x0000000000500ecf in read_char (commandflag=commandflag@entry=1, map=map@entry=69116419, prev_event=0, used_mouse_menu=used_mouse_menu@entry=0x7fffffffdd8b,
    end_time=end_time@entry=0x0) at ./debian/build-src/src/keyboard.c:2480
#48 0x00000000005049a0 in read_key_sequence (keybuf=keybuf@entry=0x7fffffffde80, prompt=prompt@entry=0, dont_downcase_last=dont_downcase_last@entry=false,
    can_return_switch_frame=can_return_switch_frame@entry=true, fix_current_buffer=fix_current_buffer@entry=true, prevent_redisplay=prevent_redisplay@entry=false,
    bufsize=30) at ./debian/build-src/src/keyboard.c:9147
--Type <RET> for more, q to quit, c to continue without paging--
Quit
(gdb) q

#926025#15
Date:
2021-02-22 19:18:12 UTC
From:
To:
"X protocol error: BadLength (poly request too large or internal Xlib length error) on protocol request 139"
is https://debbugs.gnu.org/37895 (amongst others)

This is marked as fixed in Emacs 27.1.
If the issue still occurs for you with Emacs 27.1, I suggest reporting it using M-x report-emacs-bug.
Reporting Emacs bugs that aren't specific to Debian (eg packaging) as Debian bugs tends not to lead anywhere.

#926025#22
Date:
2021-02-22 19:18:12 UTC
From:
To:
"X protocol error: BadLength (poly request too large or internal Xlib length error) on protocol request 139"
is https://debbugs.gnu.org/37895 (amongst others)

This is marked as fixed in Emacs 27.1.
If the issue still occurs for you with Emacs 27.1, I suggest reporting it using M-x report-emacs-bug.
Reporting Emacs bugs that aren't specific to Debian (eg packaging) as Debian bugs tends not to lead anywhere.