[Wayland-bugs] [Bug 762618] New: wayland: Switching between fullscreen and unfullscreen using F11 in google-chrome causes gnome-shell to hang
mutter (GNOME Bugzilla)
bugzilla at gnome.org
Wed Feb 24 14:30:50 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=762618
Bug ID: 762618
Summary: wayland: Switching between fullscreen and unfullscreen
using F11 in google-chrome causes gnome-shell to hang
Classification: Core
Product: mutter
Version: 3.19.x
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: wayland
Assignee: mutter-maint at gnome.bugs
Reporter: ofourdan at redhat.com
QA Contact: mutter-maint at gnome.bugs
CC: jadahl at gmail.com, mclasen at redhat.com,
rob at robster.org.uk, wayland-bugs at lists.freedesktop.org
GNOME version: ---
+++ This bug was initially created as a clone of Bug #762468 +++
Description
Using F11 to toggle google-chrome fullscreen and back in Wayland cause
gnome-shell to hang, calling the fullscreen animations continuously.
Steps to reproduce
1. Open google-chrome
2. Press F11 to switch to fullscreen
3. Press F11 to switch back to normal
Actual result
gnome-shell becomes unresponsive and takes a lot of CPU
Expected result
google-chrome switches back to normal and gnome-shell remains usable
Additional data
Atatching gdb to the gnome-shell process shows it's taking a lot of CPU in
mesa.
Thread 1 "gnome-shell" received signal SIGINT, Interrupt.
0x00007fb44b8a620e in convert_ubyte (void_dst=<optimized out>,
num_dst_channels=<optimized out>, void_src=<optimized out>, src_type=<optimized
out>,
num_src_channels=<optimized out>, swizzle=<optimized out>, normalized=true,
count=1024) at main/format_utils.c:1005
1005 SWIZZLE_CONVERT(uint8_t, uint8_t, src);
(gdb) bt
#0 0x00007fb44b8a620e in convert_ubyte (void_dst=<optimized out>,
num_dst_channels=<optimized out>, void_src=<optimized out>, src_type=<optimized
out>, num_src_channels=<optimized out>, swizzle=<optimized out>,
normalized=true, count=1024) at main/format_utils.c:1005
#1 0x00007fb44b8b738a in _mesa_format_convert
(void_dst=void_dst at entry=0x564887c3fe00,
dst_format=dst_format at entry=2147879568, dst_stride=dst_stride at entry=4096,
void_src=0x7fb43082d000, src_format=<optimized out>, src_stride=4096,
width=1024, height=768, rebase_swizzle=0x0) at main/format_utils.c:354
#2 0x00007fb44b8fc546 in _mesa_GetTexSubImage_sw (transferOps=<optimized out>,
texImage=0x5648860bdf50, pixels=0x564887c3fe00, type=5121, format=32993,
depth=1, height=768, width=1024, zoffset=0, yoffset=0, xoffset=0, dimensions=2,
ctx=0x564882659e08) at main/texgetimage.c:544
#3 0x00007fb44b8fc546 in _mesa_GetTexSubImage_sw (texImage=0x5648860bdf50,
pixels=0x564887c3fe00, type=5121, format=32993, depth=1, height=768,
width=1024, zoffset=0, yoffset=0, xoffset=0, dimensions=2, ctx=0x564882659e08)
at main/texgetimage.c:601
#4 0x00007fb44b8fc546 in _mesa_GetTexSubImage_sw
(ctx=ctx at entry=0x564882659e08, xoffset=xoffset at entry=0, yoffset=<optimized
out>,
yoffset at entry=0, zoffset=<optimized out>, zoffset at entry=0,
width=width at entry=1024, height=<optimized out>,
height at entry=768, depth=1, format=32993, type=<optimized out>,
pixels=0x564887c3fe00, texImage=0x5648860bdf50) at main/texgetimage.c:758
#5 0x00007fb44b9c100f in _mesa_meta_GetTexSubImage
(ctx=ctx at entry=0x564882659e08, xoffset=xoffset at entry=0,
yoffset=yoffset at entry=0, zoffset=zoffset at entry=0, width=width at entry=1024,
height=height at entry=768, depth=1, format=32993, type=5121,
pixels=0x564887c3fe00, texImage=0x5648860bdf50)
at drivers/common/meta.c:3284
#6 0x00007fb44bb6b4ed in intel_get_tex_sub_image (ctx=0x564882659e08,
xoffset=0, yoffset=0, zoffset=0, width=1024, height=768, depth=1, format=32993,
type=5121, pixels=0x564887c3fe00, texImage=0x5648860bdf50) at
intel_tex_image.c:508
#7 0x00007fb44b8fb966 in get_texture_image (ctx=ctx at entry=0x564882659e08,
texObj=texObj at entry=0x564885e162d0, target=target at entry=3553,
level=level at entry=0, xoffset=xoffset at entry=0, yoffset=yoffset at entry=0,
zoffset=0, width=1024, height=768, depth=1, format=32993, type=5121,
pixels=0x564887c3fe00, caller=<optimized out>) at main/texgetimage.c:1337
#8 0x00007fb44b8fd8c3 in _mesa_GetTexImage (target=3553, level=0,
format=32993, type=5121, pixels=0x564887c3fe00) at main/texgetimage.c:1405
#9 0x00007fb471173f4b in _cogl_texture_driver_gl_get_tex_image
(ctx=0x5648826a3cc0, gl_target=<optimized out>, dest_gl_format=<optimized out>,
dest_gl_type=<optimized out>, dest=<optimized out>) at
driver/gl/gl/cogl-texture-driver-gl.c:426
#10 0x00007fb47116663c in _cogl_texture_2d_gl_get_data (tex_2d=0x564886a939d0,
format=COGL_PIXEL_FORMAT_BGRA_8888, rowstride=4096, data=0x564887c3fe00
"ԃT\377ՃT\377ԄT\377ՃT\377ԃS\377ԃS\377ՄS\377ՃS\377ԄT\377ԃT\377ԃS\377ԃT\377ԃR\377ӂS\377ҁS\377ҁR\377ЀQ\377\300wL\377\250hB\377\234`>\377\230^;\377\230^;\377\231^<\377\230^<\377\230^<\377\231^<\377\230^<\377\230^<\377\230^<\377\230^;\377\230^<\377\231^;\377\230^<\377\230^;\377\230^<\377\231^<\377\230^;\377\230^;\377\230^<\377\230^<\377\230^;\377\230^<\377\231^;\377\230^<\377\230^<\377\230^<\377\230^<\377\231^;\377\230^<\377\230^;\377"...)
at driver/gl/cogl-texture-2d-gl.c:751
#11 0x00007fb47119c20e in _cogl_texture_2d_get_data (tex=<optimized out>,
format=<optimized out>, rowstride=<optimized out>, data=<optimized out>)
at cogl-texture-2d.c:641
#12 0x00007fb47119b160 in texture_get_cb (subtexture=0x564886a939d0,
subtexture_coords=<optimized out>, virtual_coords=0x7ffe03ebfe70,
user_data=0x7ffe03ec0320) at cogl-texture.c:989
#13 0x00007fb4711a44ff in normalize_meta_coords_cb (slice_texture=<optimized
out>, slice_coords=<optimized out>, meta_coords=<optimized out>,
user_data=<optimized out>) at cogl-meta-texture.c:466
#14 0x00007fb4711a479b in padded_grid_repeat_cb (slice_texture=<optimized out>,
slice_texture_coords=<optimized out>, meta_coords=<optimized out>,
user_data=<optimized out>) at cogl-meta-texture.c:96
#15 0x00007fb47119acc7 in _cogl_texture_spans_foreach_in_region
(x_spans=x_spans at entry=0x7ffe03ec0040, n_x_spans=n_x_spans at entry=1,
y_spans=y_spans at entry=0x7ffe03ec0070, n_y_spans=<optimized out>,
textures=textures at entry=0x7ffe03ec0200,
virtual_coords=virtual_coords at entry=0x7ffe03ec01d0, x_normalize_factor=1024,
y_normalize_factor=<optimized out>, wrap_x=COGL_PIPELINE_WRAP_MODE_REPEAT,
wrap_y=COGL_PIPELINE_WRAP_MODE_REPEAT, callback=0x7fb4711a4710
<padded_grid_repeat_cb>, user_data=0x7ffe03ec01d0) at cogl-texture.c:1360
#16 0x00007fb4711a46cb in create_grid_and_repeat_cb
(slice_texture=0x564886a939d0, slice_texture_coords=<optimized out>,
meta_coords=<optimized out>, user_data=0x7ffe03ec01d0) at
cogl-meta-texture.c:209
#17 0x00007fb471199fe6 in _cogl_sub_texture_foreach_sub_texture_in_region
(tex=0x5648872d1630, virtual_tx_1=<optimized out>, virtual_ty_1=<optimized
out>, virtual_tx_2=<optimized out>, virtual_ty_2=<optimized out>,
callback=0x7fb4711a45a0 <create_grid_and_repeat_cb>, user_data=0x7ffe03ec01d0)
at cogl-sub-texture.c:173
---Type <return> to continue, or q <return> to quit---
#18 0x00007fb4711a493e in cogl_meta_texture_foreach_in_region
(meta_texture=meta_texture at entry=0x5648872d1630, tx_1=tx_1 at entry=0,
ty_1=ty_1 at entry=0, tx_2=1024, tx_2 at entry=1, ty_2=768,
ty_2 at entry=1, wrap_s=wrap_s at entry=COGL_PIPELINE_WRAP_MODE_REPEAT,
wrap_t=wrap_t at entry=COGL_PIPELINE_WRAP_MODE_REPEAT, callback=0x7fb4711a44a0
<normalize_meta_coords_cb>, callback at entry=0x7fb47119ae40 <texture_get_cb>,
user_data=0x7ffe03ec0190, user_data at entry=0x7ffe03ec0320) at
cogl-meta-texture.c:604
#19 0x00007fb47119b38c in cogl_texture_get_data
(texture=texture at entry=0x5648872d1630,
format=format at entry=COGL_PIXEL_FORMAT_BGRA_8888_PRE, rowstride=4096,
data=data at entry=0x56488793fdf0 "") at cogl-texture.c:1142
#20 0x00007fb4727d6236 in meta_shaped_texture_get_image (stex=0x5648860217a0
[MetaShapedTexture], clip=clip at entry=0x7ffe03ec0420)
at compositor/meta-shaped-texture.c:843
#21 0x00007fb477610df2 in shell_util_get_content_for_window_actor
(window_actor=0x564885a00bd0 [MetaWindowActor], window_rect=0x564887844c50)
at shell-util.c:448
#22 0x00007fb46a3c6c58 in ffi_call_unix64 () at ../src/x86/unix64.S:76
#23 0x00007fb46a3c66ba in ffi_call (cif=cif at entry=0x7fb428103138, fn=<optimized
out>, rvalue=<optimized out>,
rvalue at entry=0x7ffe03ec06c0, avalue=avalue at entry=0x7ffe03ec05b0) at
../src/x86/ffi64.c:525
#24 0x00007fb476035bc2 in gjs_invoke_c_function(JSContext*, Function*,
JSObject*, unsigned int, jsval*, jsval*, GArgument*)
(context=context at entry=0x564883c4ddf0, function=function at entry=0x7fb428103120,
obj=obj at entry=0x7fb448735fd0, js_argc=js_argc at entry=2,
js_argv=js_argv at entry=0x7ffe03ec0d78, js_rval=js_rval at entry=0x7ffe03ec08d0,
r_value=0x0) at gi/function.cpp:999
#25 0x00007fb47603740f in function_call(JSContext*, unsigned int, jsval*)
(context=0x564883c4ddf0, js_argc=2, vp=0x7ffe03ec0d68) at gi/function.cpp:1322
#26 0x00007fb4759608ec in js::Invoke(JSContext*, JS::CallArgs,
js::MaybeConstruct) (args=..., native=<optimized out>, cx=0x564883c4ddf0)
at /usr/src/debug/mozjs-24.2.0/js/src/jscntxtinlines.h:321
#27 0x00007fb4759608ec in js::Invoke(JSContext*, JS::CallArgs,
js::MaybeConstruct) (cx=cx at entry=0x564883c4ddf0, args=...,
construct=construct at entry=js::NO_CONSTRUCT) at
/usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp:474
#28 0x00007fb475960cbb in js::Invoke(JSContext*, JS::Value const&, JS::Value
const&, unsigned int, JS::Value*, JS::Value*) (cx=cx at entry=0x564883c4ddf0,
thisv=..., fval=..., argc=argc at entry=2, argv=<optimized out>,
rval=rval at entry=0x7ffe03ec0f50) at
/usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp:531
#29 0x00007fb475bbb35d in js::jit::DoCallFallback(JSContext*,
js::jit::BaselineFrame*, js::jit::ICCall_Fallback*, uint32_t, JS::Value*,
JS::MutableHandleValue) (cx=0x564883c4ddf0, frame=0x7ffe03ec1020,
stub=0x564886d26df8, argc=2, vp=0x7ffe03ec0f98, res=...)
at /usr/src/debug/mozjs-24.2.0/js/src/jit/BaselineIC.cpp:7007
#30 0x00007fb477ab1dfb in ()
#31 0x0000000000000000 in ()
Thiss is because shell_util_get_content_for_window_actor() from
src/shell-util.c is being called continuously.
This leads us to Javascript code in _fullscreenAnimation() in
js/ui/windowManager.js
Adding traces to _sizeChangeWindow() _fullscreenWindow() _unfullscreenWindow()
and _fullscreenAnimation() shows that sizeChangeWindow() is called continuously
leading to fullscreen/unfulscreen, thus triggering the fullscreenAnimation
continuously:
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _fullscreenAnimation:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _unfullscreenWindow:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _sizeChangeWindow: 3
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _fullscreenAnimation:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _fullscreenWindow:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _sizeChangeWindow: 2
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _fullscreenAnimation:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _unfullscreenWindow:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _sizeChangeWindow: 3
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _fullscreenAnimation:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _fullscreenWindow:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:47 x61 org.gnome.Shell.desktop[4684]: _sizeChangeWindow: 2
Feb 24 15:22:46 x61 org.gnome.Shell.desktop[4684]: _fullscreenAnimation:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:46 x61 org.gnome.Shell.desktop[4684]: _unfullscreenWindow:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:46 x61 org.gnome.Shell.desktop[4684]: _sizeChangeWindow: 3
Feb 24 15:22:46 x61 org.gnome.Shell.desktop[4684]: _fullscreenAnimation:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:46 x61 org.gnome.Shell.desktop[4684]: _fullscreenWindow:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:46 x61 org.gnome.Shell.desktop[4684]: _sizeChangeWindow: 2
Feb 24 15:22:46 x61 org.gnome.Shell.desktop[4684]: _fullscreenAnimation:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:46 x61 org.gnome.Shell.desktop[4684]: _unfullscreenWindow:
[0x564885a00bd0 MetaWindowActor]
Feb 24 15:22:46 x61 org.gnome.Shell.desktop[4684]: _sizeChangeWindow: 3
But this doesn;t seem to be coming from an actual state change because breaking
on xdg_surface_set_fullscreen()/xdg_surface_unset_fullscreen() in gdb shows
these are not triggered while the Javascript routines are called continuously.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20160224/2f186865/attachment-0001.html>
More information about the wayland-bugs
mailing list