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 761899 - wayland: window manager error: buffer control taken twice
wayland: window manager error: buffer control taken twice
Status: RESOLVED DUPLICATE of bug 761613
Product: mutter
Classification: Core
Component: wayland
git master
Other Linux
: Normal major
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-02-12 09:33 UTC by Olivier Fourdan
Modified: 2016-02-16 14:30 UTC
See Also:
GNOME target: 3.20
GNOME version: ---


Attachments
Patch to apply on top of git xvidtune to reproduce with regulat Xwayland (2.09 KB, patch)
2016-02-12 16:26 UTC, Olivier Fourdan
none Details | Review

Description Olivier Fourdan 2016-02-12 09:33:25 UTC
Description:

xvidtune, the old Xaw based app to control XVidMode extension crashes mutter:

  Window manager error: buffer control taken twice

How reproducible:

100%

How to reproduce:

This is where it gets a tad tricky, because Xwayland as it is does not yet support XVidMode.

1. Get xserver source code from git
2. Apply the series of patch to add XVidMode support to Xwayland:

   https://patchwork.freedesktop.org/series/3118/

3. Rebuild Xwayland with XVidMode support, and install
4. Run gnome-shell
5. Open a terminal and run xvidtune

Actual result:

mutter crashes with:

  Window manager error: buffer control taken twice

Expected result:

No crash, xvidtune window appears just like it does in weston

Additional data:

This is not an XVidMode issue, we just need XVidMode support in Xwaylamd so that xvidtune can run and trigger the bug in mutter.

Removing the call to meta_fatal() avoids the problem obviously and allows to run xvidtune flawlessly, but that that's not a solutions of course.

mutter/src/wayland/meta-wayland-buffer.c :63

 63 void
 64 meta_wayland_buffer_take_control (MetaWaylandBuffer *buffer)
 65 {
 66   if (buffer->accessible)
 67     meta_fatal ("buffer control taken twice");
 68 
 69   buffer->accessible = TRUE;
 70 }
 71
Comment 1 Jasper St. Pierre (not reading bugmail) 2016-02-12 15:59:47 UTC
Does this work with other Xaw apps as well?
Comment 2 Olivier Fourdan 2016-02-12 16:14:12 UTC
(In reply to Jasper St. Pierre from comment #1)
> Does this work with other Xaw apps as well?

Yes, there aren't so many, but at least it works with xedit and xterm.

Pure speculation on my side, maybe it has to do with the fact that xvidtune initially maps 2 windows at startup simultaneously? The xvidtune main window and a dialog box warning the user about the potential ill effects of using the software on the hardware.
Comment 3 Olivier Fourdan 2016-02-12 16:26:39 UTC
Created attachment 321005 [details] [review]
Patch to apply on top of git xvidtune to reproduce with regulat Xwayland

Right, attaching a patch to break^W make xvidtune runable even when XVidMode-extension is not available.

1. Get xvidtune from git here:

   git://anongit.freedesktop.org/xorg/app/xvidtune

2. Apply attached patch
3. Build
4. Run GNOME on Wayland from git
5. run xvidtune 

=> Crash

Interestingly, this seems to be a regression in mutter 3.19.x as 3.18.x had no such issue.
Comment 4 Jonas Ådahl 2016-02-15 02:16:03 UTC
This seems somewhat related to bug 761613 which changes how buffers are tracked.
Comment 5 Olivier Fourdan 2016-02-16 10:44:42 UTC
Note, vlc also causes the same crash in mutter (might be easier as a reproducer)
Comment 6 Olivier Fourdan 2016-02-16 13:50:30 UTC
A quick manual "bissection" points toward commit 7adbb58

Reverting that commit doesn't trig the "buffer control taken twice" fatal error anymore.
Comment 7 Ray Strode [halfline] 2016-02-16 14:30:55 UTC

*** This bug has been marked as a duplicate of bug 761613 ***