Bug 1062269

Summary: GNOME dumps core due to BadWindow (invalid Window parameter)
Product: [openSUSE] openSUSE Tumbleweed Reporter: Howard Guo <hguo>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: badshah400, denis.kondratenko, dimstar, jc
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Howard Guo 2017-10-09 10:02:19 UTC
The following occurrence of core dump is frequently observed while using virt-manager to operate on Linux desktop guests:

Oct 09 11:54:44 howie charon[2152]: 10[KNL] interface vnet1 deactivated
Oct 09 11:54:44 howie kernel: br0: port 3(vnet1) entered disabled state
Oct 09 11:54:44 howie kernel: device vnet1 left promiscuous mode
Oct 09 11:54:44 howie kernel: br0: port 3(vnet1) entered disabled state
Oct 09 11:54:44 howie charon[2152]: 14[KNL] interface vnet1 deleted
Oct 09 11:54:44 howie systemd-machined[4330]: Machine qemu-4-sles11sp4sap-nwsso terminated.
Oct 09 11:55:08 howie kernel: br0: port 3(vnet1) entered blocking state
Oct 09 11:55:08 howie kernel: br0: port 3(vnet1) entered disabled state
Oct 09 11:55:08 howie kernel: device vnet1 entered promiscuous mode
Oct 09 11:55:08 howie kernel: br0: port 3(vnet1) entered blocking state
Oct 09 11:55:08 howie kernel: br0: port 3(vnet1) entered forwarding state
Oct 09 11:55:08 howie charon[2152]: 01[KNL] interface vnet1 activated
Oct 09 11:55:08 howie systemd-machined[4330]: New machine qemu-6-sles11sp4sap-nwsso.
Oct 09 11:55:08 howie systemd[1]: Started Virtual Machine qemu-6-sles11sp4sap-nwsso.
Oct 09 11:55:12 howie gnome-shell[11651]: The program 'gnome-shell' received an X Window System error.
                                          This probably reflects a bug in the program.
                                          The error was 'BadWindow (invalid Window parameter)'.
                                            (Details: serial 252398 error_code 3 request_code 18 (core protocol) minor_code 0)
                                            (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.)
Oct 09 11:55:12 howie kernel: traps: gnome-shell[11651] trap int3 ip:7f01791af9c1 sp:7ffe8a9b2940 error:0
Oct 09 11:55:12 howie systemd[1]: Started Process Core Dump (PID 20948/UID 0).
Oct 09 11:55:12 howie systemd-coredump[20949]: Resource limits disable core dumping for process 11651 (gnome-shell).
Oct 09 11:55:12 howie systemd-coredump[20949]: Process 11651 (gnome-shell) of user 1000 dumped core.
Oct 09 11:55:12 howie /usr/lib/gdm/gdm-x-session[3754]: gnome-session-binary[3770]: WARNING: Application 'org.gnome.Shell.desktop' killed by signal 5
Oct 09 11:55:12 howie gnome-session-binary[3770]: WARNING: Application 'org.gnome.Shell.desktop' killed by signal 5
Oct 09 11:55:12 howie polkitd[1467]: Unregistered Authentication Agent for unix-session:1 (system bus name :1.190, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_GB.UTF-8) (disconnected from bus)
Oct 09 11:55:12 howie /usr/lib/gdm/gdm-x-session[3754]: (II) RADEON(0): EDID vendor "DEL", prod id 41115

According to coredumpctl, systemd did not capture a core dump file:
Mon 2017-10-09 11:55:12 CEST  11651  1000   100   5 none      /usr/bin/gnome-shell
Comment 1 jean-christophe baptiste 2017-10-10 20:06:04 UTC
I am having the exact same crash several times a day.

The worst case happens when I unlock the session, as it leads to a complete session loss.
Comment 2 jean-christophe baptiste 2017-10-10 20:15:36 UTC
A way I found to reproduce the crash quite easily:

- launch a VirtualBox VM
- plug in an external monitor
- plug it out

gnome-shell should crash to login window.
Comment 3 jean-christophe baptiste 2017-10-11 20:59:00 UTC
I could reproduce it :

    new empty user, same machine (thinkpad)
    another machine (macbook)
    cannot reproduce in cinnamon (so probably not gtk3 stuff)

I could reproduce it on the second machine only after a zypper dup on Tumbleweed.

So a new update definitely broke something, and it is probably not impacting only me.

In case the bug does not trigger immediately, just plug/unplug the external monitor several times.
Comment 4 jean-christophe baptiste 2017-10-11 21:04:21 UTC
Also, it does not matter whether it is a X11 or a Wayland session.
Comment 5 Atri Bhattacharya 2017-10-12 15:30:19 UTC
I don't know if this belongs in the same bug or not, but I see the same complaints in the journal after gnome-shell crashes and reloads when closing the mail evolution window from the gnome-shell Activities overview. It does not happen when the same window is closed without going to the overview mode, for example by directly clicking the [x] close-window button on the titlebar, or on Ctrl-Q. It also happens when closing firefox, gnome-documents and a few other apps from the g-s Activities overview.
Comment 6 Dominique Leuenberger 2017-10-12 15:35:57 UTC
possibly related to https://bugzilla.gnome.org/show_bug.cgi?id=788666 (which we just fixed in mutter in GNOME:Factory - fix submitted to openSUSE:Factory)
Comment 7 jean-christophe baptiste 2017-10-12 17:58:32 UTC
@Dominique,

I grabbed the mutter package from there:

http://download.opensuse.org/repositories/GNOME:/Factory/openSUSE_Factory/x86_64/

% rpm -qa mutter
mutter-3.26.1-270.4.x86_64

Unfortunately, the issue is still present.

Should I update other dependencies as well or does it demonstrate that the issue differs?
Comment 8 jean-christophe baptiste 2017-10-13 00:58:51 UTC
Same with mutter-3.26.1-271.1
Comment 9 jean-christophe baptiste 2017-10-13 07:48:55 UTC
I got a crash while closing a maximized window (Chrome), so either the upstream patch is not sufficient, or the patch is not applied in Gnome:Factory.
Comment 10 Denis Kondratenko 2017-10-20 11:33:24 UTC
I have the same issue. It happen time to time, but also when qemu launches virtual machine.

I think bug #1062904 is related to this one.
Comment 11 jean-christophe baptiste 2017-10-20 22:25:00 UTC
Indeed, mutter-3.26.1-271.2.x86_64 from Gnome Factory seems to fix the issue.

It has not crashed so far.
Comment 12 jean-christophe baptiste 2017-10-21 11:33:33 UTC
Actually, the issue is less frequent but still occurs:

```
oct. 21 13:26:00 susepad gnome-shell[3029]: The program 'gnome-shell' received an X Window System error.
                                            This probably reflects a bug in the program.
                                            The error was 'BadWindow (invalid Window parameter)'.
                                              (Details: serial 131250 error_code 3 request_code 18 (core protocol) minor_code 0)
                                              (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.)
oct. 21 13:26:00 susepad systemd-coredump[6876]: Process 3029 (gnome-shell) of user 1000 dumped core.
```

No core dump:

```
% coredumpctl gdb 3029

Sat 2017-10-21 13:26:00 CEST   3029  1000   100   5 none      /usr/bin/gnome-shell
```

Version (Mutter from Gnome factory, gnome-shell from Tumbleweed):

```
% rpm -qa gnome-shell
gnome-shell-3.26.1-1.1.x86_64
% rpm -qa mutter     
mutter-3.26.1-271.2.x86_64
```
Comment 13 Denis Kondratenko 2017-10-23 08:26:59 UTC
I think it is fixed here for mutter as well as for other apps:
https://bugzilla.gnome.org/show_bug.cgi?id=788666#c27
Comment 14 jean-christophe baptiste 2017-10-23 08:32:29 UTC
Over the last 2 days, I tested latest versions from Gnome:Factory:

% rpm -qa gnome-shell
gnome-shell-3.26.1-360.1.x86_64
% rpm -qa mutter     
mutter-3.26.1-274.1.x86_64

And all issues vanished, so I think it has been fixed indeed.

Let's hope it can make it quickly to Tumbleweed...
Comment 15 Denis Kondratenko 2017-10-25 09:58:40 UTC
same for me, with latest packages from Gnome factory it is not reproducible.
Comment 16 Atri Bhattacharya 2017-10-29 17:14:55 UTC
Marking as fixed in accordance with previous comments (fix has been incorporated into TW)