Subject: Re: bug#30874: 27.0.50; Emacs crashes

From: Eli Zaretskii <[email-masked]>
Date: Thu, 22 Mar 2018 16:55:09 +0200

> From: Jan Synacek <[email-masked]>
> Date: Thu, 22 Mar 2018 14:05:26 +0100
> Cc: [email-masked]
> 
> > What about adding the -xrm "emacs.synchronous: true" switch to the
> > Emacs invocation command -- does it also not work?
> 
> As far as I can tell, no. I still see the emacs frame remain open but
> unresponsive and also see the same backtrace as before.

Exactly the same backtrace?  The backtrace you posted:

  #19 0x00000000004c2fcb in x_error_handler (display=0x2c59000,
  event=0x7fffffff5d40) at xterm.c:9889
  #20 0x00007ffff469ce3a in _XError () at /lib64/libX11.so.6
  #21 0x00007ffff4699d6b in handle_error () at /lib64/libX11.so.6
  ---Type <return> to continue, or q <return> to quit---
  #22 0x00007ffff4699e15 in handle_response () at /lib64/libX11.so.6
  #23 0x00007ffff469a745 in _XEventsQueued () at /lib64/libX11.so.6
  #24 0x00007ffff468c2bd in XPending () at /lib64/libX11.so.6
  #25 0x00007ffff64f2c2e in gdk_event_source_prepare () at /lib64/libgdk-3.so.0
  #26 0x00007ffff4e033f9 in g_main_context_prepare () at /lib64/libglib-2.0.so.0
  #27 0x00007ffff4e03dcb in g_main_context_iterate.isra () at
  /lib64/libglib-2.0.so.0
  #28 0x00007ffff4e03f57 in g_main_context_pending () at /lib64/libglib-2.0.so.0
  #29 0x00007ffff69b2d1d in gtk_events_pending () at /lib64/libgtk-3.so.0
  #30 0x00000000004bfee7 in XTread_socket (terminal=<optimized out>,
  hold_quit=0x7fffffff6040) at xterm.c:9146
  #31 0x00000000004f7301 in gobble_input () at keyboard.c:6890
  #32 0x00000000004f7925 in handle_async_input () at keyboard.c:7127
  #33 0x00000000004f7925 in process_pending_signals () at keyboard.c:7141
  #34 0x00000000005c8e5c in xftfont_open (f=0x13f0c30
  <bss_sbrk_buffer+8312368>, entity=0x1243cb5 <bss_sbrk_buffer+6555317>,
  pixel_size=15) at xftfont.c:391

indicates that the X error message was read when Emacs unblocked input
in xftfont_open, and read pending input.  In synchronous X operation,
the call to x_error_handler should come from an X function, not from
process_pending_signals.  I hoped that seeing the X function that
caused the error will allow us to understand better what is causing
the problem.  If you still see exactly the same backtrace in
synchronous X operation, then I don't see any path forward, except
saying that telling Emacs Dejavu Sans Mono can cover the entire
Unicode range of characters is not recommended.  (But when I did that
with a couple of fonts here, Emacs didn't crash.)  It could be a
problem in the font backend you use, or it could be something else.

Thanks.