Subject: bug#34095: closed (Re: bug#34051: 27.0.50; Emacs 27 from master segfaults)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 17 Jan 2019 00:19:02 +0000

Your bug report

#34095: 27.0.50; Crash when openning a gnus message buffer

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
34095: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34095
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#34051: 27.0.50; Emacs 27 from master segfaults
From: Katsumi Yamaoka <[email-masked]>
To: Alan Third <[email-masked]>
Cc: Stefan Husmann <[email-masked]>, Eli Zaretskii <[email-masked]>, [email-masked], [email-masked]
Date: Thu, 17 Jan 2019 09:18:02 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

On Tue, 15 Jan 2019 16:52:32 +0000, Alan Third wrote:
> These X server errors are asynchronous and not very helpful. The most
> likely culprit is x_create_x_image_and_pixmap.

> Stefan, please try the attached patch.

Great!  This seems to do the trick also to bug#34095.  Thanks.
(I'm colosing bug#34095 that's probably a duplicate.)

Subject: 27.0.50; Crash when openning a gnus message buffer
From: Katsumi Yamaoka <[email-masked]>
To: [email-masked]
Date: Wed, 16 Jan 2019 16:41:51 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

In GNU Emacs 27.0.50 (build 1, x86_64-unknown-cygwin, GTK+ Version 3.22.28)
 of 2019-01-16 built on localhost
Windowing system distributor 'The Cygwin/X Project', version 11.0.12002000

Hi,

This may not be an Emacs bug, but I don't know how to solve it.
This is happenning since the last weekend.  Please help!

Recipe:
  With no .emacs .gnus.el .newsrc.eld files, and .config, Mail
  and News directories.
% emacs -Q
q
Eval: (setq gnus-select-method '(nnnil))
M-x gnus
(Gnus launches with no group)
m

Then Emacs crashes and I get either of the following two kinds
of errors in stderr:

1.
X protocol error: BadMatch (invalid parameter attributes) on protocol request 139
When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://gitlab.gnome.org/GNOME/gtk/issues/221
For details, see etc/PROBLEMS.
Fatal error 6: Aborted

2.
(emacs:3360): Gdk-ERROR **: The program 'emacs' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 7076 error_code 8 request_code 139 (RENDER) minor_code 4)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

xbacktrace and backtrace follow.  Thanks in advance.

GNU gdb (GDB) (Cygwin 8.0.1-1) 8.0.1
[...]
(gdb) source .gdbinit
[...]
(gdb) r
Starting program: /Work/emacs-27.0.50/src/emacs
[...]
(gdb) xbacktrace

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x00000001005fd565 in backtrace_function ()
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(backtrace_function) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb) backtrace
#0  0x00000001005fd565 in backtrace_function ()
#1  <function called from gdb>
#2  _g_log_abort (breakpoint=breakpoint@entry=1)
    at /usr/src/debug/glib2.0-2.54.3-1/glib/gmessages.c:554
#3  0x00000003c5e67d90 in g_log_writer_default (log_level=6, 
    log_level@entry=G_LOG_LEVEL_ERROR, fields=fields@entry=0xffffabb0, 
    n_fields=n_fields@entry=6, user_data=user_data@entry=0x0)
    at /usr/src/debug/glib2.0-2.54.3-1/glib/gmessages.c:2628
#4  0x00000003c5e66660 in g_log_structured_array (
    log_level=log_level@entry=G_LOG_LEVEL_ERROR, 
    fields=fields@entry=0xffffabb0, n_fields=n_fields@entry=6)
    at /usr/src/debug/glib2.0-2.54.3-1/glib/gmessages.c:1941
#5  0x00000003c5e67292 in g_log_structured_array (n_fields=6, 
    fields=0xffffabb0, log_level=G_LOG_LEVEL_ERROR)
    at /usr/src/debug/glib2.0-2.54.3-1/glib/gmessages.c:1923
#6  g_log_structured (
    log_domain=log_domain@entry=0x3c81f7e46 <__func__.36842+198> "Gdk", 
    log_level=log_level@entry=G_LOG_LEVEL_ERROR)
    at /usr/src/debug/glib2.0-2.54.3-1/glib/gmessages.c:1768
#7  0x00000003c81a9235 in _gdk_x11_display_error_event (
    display=display@entry=0x60022d090, error=error@entry=0xffffb310)
    at /usr/src/debug/gtk3-3.22.28-1/gdk/x11/gdkdisplay-x11.c:2766
#8  0x00000003c81b6fc8 in gdk_x_error (xdisplay=0x60021bf10, error=0xffffb310)
    at /usr/src/debug/gtk3-3.22.28-1/gdk/x11/gdkmain-x11.c:307
#9  0x00000003dff766cb in _XError (dpy=dpy@entry=0x60021bf10, 
    rep=rep@entry=0x601260e30)
    at /usr/src/debug/libX11-1.6.5-1/src/XlibInt.c:1434
#10 0x00000003dff73533 in handle_error (dpy=0x60021bf10, err=0x601260e30, 
    in_XReply=<optimized out>)
    at /usr/src/debug/libX11-1.6.5-1/src/xcb_io.c:199
#11 0x00000003dff735e5 in handle_response (dpy=0x60021bf10, 
    response=0x601260e30, in_XReply=<optimized out>)
    at /usr/src/debug/libX11-1.6.5-1/src/xcb_io.c:311
#12 0x00000003dff74522 in _XReply (dpy=dpy@entry=0x60021bf10, 
    rep=rep@entry=0xffffb550, extra=extra@entry=0, discard=discard@entry=0)
    at /usr/src/debug/libX11-1.6.5-1/src/xcb_io.c:621
#13 0x00000003dff5b5a8 in XGetWindowProperty (dpy=0x60021bf10, w=w@entry=788, 
    property=262, offset=offset@entry=0, 
    length=length@entry=9223372036854775807, delete=delete@entry=0, 
    req_type=req_type@entry=33, actual_type=actual_type@entry=0xffffb648, 
    actual_format=actual_format@entry=0xffffb644, 
    nitems=nitems@entry=0xffffb650, bytesafter=bytesafter@entry=0xffffb658, 
    prop=prop@entry=0xffffb660)
    at /usr/src/debug/libX11-1.6.5-1/src/GetProp.c:69
#14 0x00000003c81b8dec in get_net_supporting_wm_check (
    screen=screen@entry=0x600230a90, window=788)
    at /usr/src/debug/gtk3-3.22.28-1/gdk/x11/gdkscreen-x11.c:1329
#15 0x00000003c81b8ed3 in fetch_net_wm_check_window (
    screen=screen@entry=0x600230a90)
    at /usr/src/debug/gtk3-3.22.28-1/gdk/x11/gdkscreen-x11.c:1366
#16 0x00000003c81ba613 in gdk_x11_screen_supports_net_wm_hint (
    screen=0x600230a90, property=property@entry=0x80)
    at /usr/src/debug/gtk3-3.22.28-1/gdk/x11/gdkscreen-x11.c:1446
#17 0x00000003c81bff24 in gdk_x11_window_end_frame (window=0x6001bd930)
    at /usr/src/debug/gtk3-3.22.28-1/gdk/x11/gdkwindow-x11.c:435
#18 on_frame_clock_after_paint (clock=<optimized out>, window=0x6001bd930)
    at /usr/src/debug/gtk3-3.22.28-1/gdk/x11/gdkwindow-x11.c:980
#19 0x00000003c36e5acc in g_closure_invoke (closure=0x6003cb890, 
    return_value=0x0, n_param_values=1, param_values=0xffffba80, 
    invocation_hint=0xffffb9c0)
    at /usr/src/debug/glib2.0-2.54.3-1/gobject/gclosure.c:804
#20 0x00000003c36f7657 in signal_emit_unlocked_R (node=node@entry=0x600241f90, 
    detail=<optimized out>, instance=instance@entry=0x600309780, 
    emission_return=emission_return@entry=0x0, 
    instance_and_params=instance_and_params@entry=0xffffba80)
    at /usr/src/debug/glib2.0-2.54.3-1/gobject/gsignal.c:3635
#21 0x00000003c36ff9cc in g_signal_emit_valist (
    instance=instance@entry=0x600309780, signal_id=<optimized out>, 
    detail=<optimized out>, detail@entry=0, var_args=<optimized out>, 
    var_args@entry=0xffffbc88 "")
    at /usr/src/debug/glib2.0-2.54.3-1/gobject/gsignal.c:3391
#22 0x00000003c36ffcaa in g_signal_emit (instance=instance@entry=0x600309780, 
    signal_id=<optimized out>, detail=detail@entry=0)
    at /usr/src/debug/glib2.0-2.54.3-1/gobject/gsignal.c:3447
#23 0x00000003c8186fbe in _gdk_frame_clock_emit_after_paint (
    frame_clock=frame_clock@entry=0x600309780)
    at /usr/src/debug/gtk3-3.22.28-1/gdk/gdkframeclock.c:647
#24 0x00000003c81876fb in gdk_frame_clock_paint_idle (data=0x600309780)
    at /usr/src/debug/gtk3-3.22.28-1/gdk/gdkframeclockidle.c:467
#25 0x00000003c8171417 in gdk_threads_dispatch (data=0x600b73a90, 
    data@entry=<error reading variable: value has been optimized out>)
    at /usr/src/debug/gtk3-3.22.28-1/gdk/gdk.c:743
#26 0x00000003c5e61033 in g_timeout_dispatch (source=0x600c0e880, 
    callback=<optimized out>, user_data=<optimized out>)
    at /usr/src/debug/glib2.0-2.54.3-1/glib/gmain.c:4638
#27 0x00000003c5e6061e in g_main_dispatch (context=0x6002412f0)
    at /usr/src/debug/glib2.0-2.54.3-1/glib/gmain.c:3165
#28 g_main_context_dispatch (context=context@entry=0x6002412f0)
    at /usr/src/debug/glib2.0-2.54.3-1/glib/gmain.c:3818
#29 0x00000003c5e60998 in g_main_context_iterate (
    context=context@entry=0x6002412f0, block=block@entry=1, 
    dispatch=dispatch@entry=1, self=<optimized out>)
    at /usr/src/debug/glib2.0-2.54.3-1/glib/gmain.c:3891
#30 0x00000003c5e60a4d in g_main_context_iteration (context=0x6002412f0, 
    context@entry=0x0, may_block=may_block@entry=1)
    at /usr/src/debug/glib2.0-2.54.3-1/glib/gmain.c:3952
#31 0x00000003c10287c5 in gtk_main_iteration ()
    at /usr/src/debug/gtk3-3.22.28-1/gtk/gtkmain.c:1427
#32 0x000000010051290a in XTread_socket ()
#33 0x000000010055ca71 in gobble_input ()
#34 0x000000010055c900 in get_input_pending ()
#35 0x000000010055766b in swallow_events ()
#36 0x000000010040db9d in sit_for ()
#37 0x000000010055445f in read_char ()
#38 0x0000000100561594 in read_key_sequence ()
#39 0x0000000100550a9f in command_loop_1 ()
#40 0x00000001005ffbcc in internal_condition_case ()
#41 0x0000000100550206 in command_loop_2 ()
#42 0x00000001005ff4b7 in internal_catch ()
#43 0x0000000100550196 in command_loop ()
#44 0x000000010054f728 in recursive_edit_1 ()
#45 0x000000010054f8d0 in Frecursive_edit ()
#46 0x000000010054d516 in main ()

Lisp Backtrace:

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x00000001005fd565 in backtrace_function ()
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(backtrace_function) will be abandoned.
When the function is done executing, GDB will silently stop.