After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762878 - wayland: crash when closing multiple windows at once
wayland: crash when closing multiple windows at once
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-02-29 15:48 UTC by Olivier Fourdan
Modified: 2016-02-29 18:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Use separate destructor for the gtk_primary_selection_offer (2.03 KB, patch)
2016-02-29 15:52 UTC, Carlos Garnacho
committed Details | Review
wayland: Ensure harder we're dealing with DnD offers/sources (1.49 KB, patch)
2016-02-29 15:52 UTC, Carlos Garnacho
committed Details | Review

Description Olivier Fourdan 2016-02-29 15:48:38 UTC
Description

mutter crashes in destroy_data_offer() after using primary selection when closing multiple windows.

Steps to reproduce:

1. Open gnome-terminal
2. From gnome-terminal, run gedit
3. copy/paste some stuff between gnome-terminal and gedit using primary selection
4. Close gnome-terminal using the [X] button so that gedit goes along with it

Actual result:

mutter/gnome-shell dies with the following backtrace:

  • #0 ??
  • #1 destroy_data_offer
    at wayland/meta-wayland-data-device.c line 502
  • #2 destroy_resource
    at src/wayland-server.c line 571
  • #3 for_each_helper
    at src/wayland-util.c line 359
  • #4 wl_map_for_each
    at src/wayland-util.c line 366
  • #5 wl_client_destroy
    at src/wayland-server.c line 709
  • #6 wl_display_flush_clients
    at src/wayland-server.c line 1068
  • #7 wayland_event_source_prepare
    at wayland/meta-wayland.c line 64
  • #8 g_main_context_prepare
    at gmain.c line 3442
  • #9 g_main_context_iterate
    at gmain.c line 3820
  • #10 g_main_loop_run
    at gmain.c line 4034
  • #11 meta_run
    at core/main.c line 537
  • #12 main
    at main.c line 471

Comment 1 Carlos Garnacho 2016-02-29 15:52:36 UTC
Created attachment 322669 [details] [review]
wayland: Use separate destructor for the gtk_primary_selection_offer

Things don't mix well if we use the same destructor than wl_data_offer,
Use a separate destructor with no DnD paths whatsoever.
Comment 2 Carlos Garnacho 2016-02-29 15:52:41 UTC
Created attachment 322670 [details] [review]
wayland: Ensure harder we're dealing with DnD offers/sources

In destroy_data_offer() there is code to ensure compatibility when
dragging from a v3 wl_data_device to a v2 one, it's however not checking
correctly that this is the DnD drag source. The other path should be
used otherwise.
Comment 3 Olivier Fourdan 2016-02-29 15:57:02 UTC
These patches fix the issue, thanks!
Comment 4 Carlos Garnacho 2016-02-29 18:58:49 UTC
Attachment 322669 [details] pushed as 66be038 - wayland: Use separate destructor for the gtk_primary_selection_offer
Attachment 322670 [details] pushed as 43bd057 - wayland: Ensure harder we're dealing with DnD offers/sources