Bug 81115

Summary: weston crashed after clicking close button of arora
Product: Wayland Reporter: Andrew Engelbrecht <andrew.e.7327>
Component: XWaylandAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: stu_dby
Version: 1.5.0   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: core dump for crashed weston session (might be xwayland's fault.)
weston core dump and symbols
weston master core dump and symbols

Description Andrew Engelbrecht 2014-07-09 15:27:29 UTC
Created attachment 102488 [details]
core dump for crashed weston session (might be xwayland's fault.)

i ran 'weston' inside debian a jessie/sid (mostly jessie, but xwayland, is 2:1.15.99.904-1, from sid. other xorg stuff is also mostly from sid.) x11 session.

i opened a weston terminal and played around with xman. then i closed it and ran 'arora'. i moved the window around, resized the window, and typed words into the url bar, to test the mis-behaving suggestions pop-up window i saw before. i chose a suggestion, then loaded the page. i closed the window by clicking the 'X' button in the top right. weston then crashed.

i will try to attach the weston core dump.



sudoman@debian ~$ weston
Date: 2014-07-09 EDT
[11:12:33.774] weston 1.5.0
               http://wayland.freedesktop.org/
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.5.0
               Build: 1.4.93 configure.ac: Bump version 1.4.93 (2014-05-12 12:51:52 -0700)
[11:12:33.774] OS: Linux, 3.14-1-amd64, #1 SMP Debian 3.14.9-1 (2014-06-30), x86_64
[11:12:33.786] Using config file '/home/sudoman/.config/weston.ini'
[11:12:33.811] Loading module '/usr/lib/x86_64-linux-gnu/weston/x11-backend.so'
[11:12:33.830] initializing x11 backend
[11:12:33.842] Loading module '/usr/lib/x86_64-linux-gnu/weston/gl-renderer.so'
libEGL warning: failed to create a pipe screen for i965
[11:12:34.247] warning: EGL_EXT_buffer_age not supported. Performance could be affected.
[11:12:34.247] warning: EGL_EXT_swap_buffers_with_damage not supported. Performance could be affected.
[11:12:34.247] Using gl renderer
[11:12:34.247] launching '/usr/lib/weston/weston-keyboard'
[11:12:34.274] EGL version: 1.4 (DRI2)
[11:12:34.274] EGL vendor: Mesa Project
[11:12:34.274] EGL client APIs: OpenGL OpenGL_ES OpenGL_ES2 
[11:12:34.274] EGL extensions: EGL_MESA_drm_image EGL_MESA_configless_context
               EGL_WL_bind_wayland_display EGL_KHR_image_base
               EGL_KHR_image_pixmap EGL_KHR_image EGL_KHR_gl_texture_2D_image
               EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image
               EGL_KHR_surfaceless_context EGL_KHR_create_context
               EGL_NOK_swap_region EGL_NOK_texture_from_pixmap
               EGL_EXT_image_dma_buf_import EGL_NV_post_sub_buffer
[11:12:34.274] GL version: OpenGL ES 2.0 Mesa 10.2.2
[11:12:34.274] GLSL version: OpenGL ES GLSL ES 1.0.16
[11:12:34.274] GL vendor: Intel Open Source Technology Center
[11:12:34.274] GL renderer: Mesa DRI Intel(R) Ironlake Mobile 
[11:12:34.274] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
               GL_EXT_texture_filter_anisotropic
               GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888
               GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24
               GL_OES_element_index_uint GL_OES_fbo_render_mipmap
               GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives
               GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_npot
               GL_OES_EGL_image GL_OES_depth_texture
               GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV
               GL_OES_get_program_binary GL_APPLE_texture_max_level
               GL_EXT_discard_framebuffer GL_EXT_read_format_bgra
               GL_NV_fbo_color_attachments GL_OES_EGL_image_external
               GL_OES_vertex_array_object GL_ANGLE_texture_compression_dxt3
               GL_ANGLE_texture_compression_dxt5 GL_EXT_texture_rg
               GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer
               GL_EXT_map_buffer_range GL_OES_surfaceless_context
               GL_EXT_separate_shader_objects GL_INTEL_performance_query
[11:12:34.274] GL ES 2 renderer features:
               read-back format: BGRA
               wl_shm sub-image to texture: yes
               EGL Wayland extension: yes
[11:12:34.274] Chosen EGL config details:
               RGBA bits: 8 8 8 8
               swap interval range: 0 - 1000
[11:12:34.274] x11 output 1024x640, window id 67108869
[11:12:34.303] Loading module '/usr/lib/x86_64-linux-gnu/weston/desktop-shell.so'
[11:12:34.319] Loading module '/usr/lib/x86_64-linux-gnu/weston/xwayland.so'
[11:12:34.330] xserver listening on display :1
[11:12:34.330] Module '/usr/lib/x86_64-linux-gnu/weston/desktop-shell.so' already loaded
[11:12:34.330] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
[11:12:34.350] launching '/usr/lib/weston/weston-desktop-shell'
libEGL warning: failed to create a pipe screen for i965
libEGL warning: failed to create DRM screen
libEGL warning: failed to create a pipe screen for i965
libEGL warning: failed to create DRM screen
libEGL warning: failed to create a pipe screen for i965
libEGL warning: failed to create DRM screen
[11:12:38.839] forked X server, pid 6506
glamor: EGL version 1.4 (DRI2):
[11:12:39.263] xfixes version: 5.0
[11:12:39.281] created wm, root 368
[11:13:50.926] selection request, CLIPBOARD_MANAGER, target SAVE_TARGETS, property _QT_SELECTION
[11:13:51.383] caught signal: 11
[11:13:51.412]   [00000000004091da]  --  (weston)
[11:13:51.412]   [0000000000409247]  --  (weston)
[11:13:51.412]   [00007f28441ce480]  --  (/lib/x86_64-linux-gnu/libc.so.6)
[11:13:51.412]   [00007f283a569730]  --  (/usr/lib/x86_64-linux-gnu/weston/xwayland.so)
[11:13:51.412]   [000000000041049f]  weston_surface_activate  (weston)
[11:13:51.412]   [00007f283a7820ef]  --  (/usr/lib/x86_64-linux-gnu/weston/desktop-shell.so)
[11:13:51.412]   [000000000040c14f]  --  (weston)
[11:13:51.412]   [0000000000416ad6]  weston_view_animation_destroy  (weston)
[11:13:51.412]   [000000000040d3cd]  weston_output_finish_frame  (weston)
[11:13:51.412]   [00007f2843962e15]  --  (/usr/lib/x86_64-linux-gnu/weston/x11-backend.so)
[11:13:51.412]   [00007f2843962e29]  --  (/usr/lib/x86_64-linux-gnu/weston/x11-backend.so)
[11:13:51.412]   [00007f2844f33639]  --  (/usr/lib/x86_64-linux-gnu/libwayland-server.so.0)
[11:13:51.413]   [00007f2844f33c22]  wl_event_loop_dispatch  (/usr/lib/x86_64-linux-gnu/libwayland-server.so.0)
[11:13:51.413]   [00007f2844f32265]  wl_display_run  (/usr/lib/x86_64-linux-gnu/libwayland-server.so.0)
[11:13:51.413]   [0000000000407854]  --  (weston)
[11:13:51.413]   [00007f28441bab45]  __libc_start_main  (/lib/x86_64-linux-gnu/libc.so.6)
[11:13:51.413]   [0000000000407a2b]  --  (weston)
(EE) 
Fatal server error:
(EE) failed to dispatch Wayland events: Broken pipe
(EE) 
Trace/breakpoint trap (core dumped)
Comment 1 Boyan Ding 2014-07-12 10:02:10 UTC
Could you please compile weston with debug info? The stacktrace will be clearer then.
Comment 2 Andrew Engelbrecht 2014-07-12 19:05:01 UTC
i built 1.5.0 from source, and managed to make weston crash twice. i only have the symbols for one of those crashes, since i was still figuring things out. i'll attach the core dump and symbols.

$ gdb -se ./weston -c ./core
...
Program terminated with signal 5, Trace/breakpoint trap.
#0  0x00007f2acbd74407 in __GI_raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace
#0  0x00007f2acbd74407 in __GI_raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x0000000000410250 in on_caught_signal (s=11, siginfo=0x7fffba342770, context=0x7fffba342640) at src/compositor.c:3914
#2  <signal handler called>
#3  wl_event_loop_add_idle (loop=0x0, func=0x7f2ac37d7e5c <weston_wm_window_draw_decoration>, data=0x205b3d0) at ../src/event-loop.c:301
#4  0x00007f2ac37d82b7 in weston_wm_window_schedule_repaint (window=0x205b3d0) at xwayland/window-manager.c:1045
#5  0x00007f2ac37d7756 in weston_wm_window_activate (listener=0x2113100, data=0x2460060) at xwayland/window-manager.c:727
#6  0x0000000000411007 in wl_signal_emit (signal=0x1fd86a8, data=0x2460060) at /usr/include/wayland-server.h:260
#7  0x0000000000413555 in weston_surface_activate (surface=0x2460060, seat=0x2062670) at src/input.c:1009
#8  0x00007f2ac39f62b7 in activate (shell=0x1fdb090, es=0x2460060, seat=0x2062670, configure=true) at desktop-shell/shell.c:4530
#9  0x00007f2ac39ee084 in focus_state_surface_destroy (listener=0x245c2e0, data=0x20620d0) at desktop-shell/shell.c:631
#10 0x0000000000407595 in wl_signal_emit (signal=0x20620d8, data=0x20620d0) at /usr/include/wayland-server.h:260
#11 0x000000000040ad79 in weston_surface_destroy (surface=0x20620d0) at src/compositor.c:1395
#12 0x00007f2ac39f39d0 in fade_out_done (animation=0x25081f0, data=0x2061c20) at desktop-shell/shell.c:3177
#13 0x000000000041d56b in weston_view_animation_destroy (animation=0x25081f0) at src/animation.c:143
#14 0x000000000041d62e in weston_view_animation_frame (base=0x25081f8, output=0x20842b0, msecs=43308708) at src/animation.c:172
#15 0x000000000040bff4 in weston_output_repaint (output=0x20842b0, msecs=43308708) at src/compositor.c:1819
#16 0x000000000040c0da in weston_output_finish_frame (output=0x20842b0, msecs=43308708) at src/compositor.c:1848
#17 0x00007f2acb501dbf in page_flip_handler (fd=12, frame=367180, sec=43308, usec=708860, data=0x20842b0) at src/compositor-drm.c:761
#18 0x00007f2acaac7c3e in drmHandleEvent () from /usr/lib/x86_64-linux-gnu/libdrm.so.2
#19 0x00007f2acb503239 in on_drm_input (fd=12, mask=1, data=0x1fd8620) at src/compositor-drm.c:1259
#20 0x00007f2accad9c22 in wl_event_loop_dispatch (loop=0x1fd2220, timeout=timeout@entry=-1) at ../src/event-loop.c:419
#21 0x00007f2accad8265 in wl_display_run (display=0x1fd2190) at ../src/wayland-server.c:969
#22 0x0000000000410ede in main (argc=1, argv=0x7fffba3437f8) at src/compositor.c:4316
(gdb)
Comment 3 Andrew Engelbrecht 2014-07-12 19:12:24 UTC
Created attachment 102680 [details]
weston core dump and symbols

i don't know what i was doing when weston crashed. i was testing weston, iceweasel, and aurora in ways similar to before.
Comment 4 Andrew Engelbrecht 2014-07-12 20:13:29 UTC
i tried to reproduce this a few times in weston master and was not able to produce a crash.
Comment 5 Andrew Engelbrecht 2014-07-13 03:39:00 UTC
Created attachment 102685 [details]
weston master core dump and symbols

i crashed weston weston master in windowed mode.

before weston crashed, i was playing around with xman, resizing it, and
scrolling the window. when i clicked xman's close button, weston crashed.

Core was generated by `weston-test'.
Program terminated with signal 5, Trace/breakpoint trap.
#0  0x00007f7fb94ce7bb in raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
37	../nptl/sysdeps/unix/sysv/linux/pt-raise.c: No such file or directory.
(gdb) backtrace
#0  0x00007f7fb94ce7bb in raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
#1  0x0000000000410119 in on_caught_signal (s=11, siginfo=0x7fff10d7d4b0, context=0x7fff10d7d380) at src/compositor.c:3916
#2  <signal handler called>
#3  0x00007f7fba0d1a70 in wl_list_remove (elm=0x25e8390) at src/wayland-util.c:54
#4  0x00007f7faf4ec61c in weston_wm_window_destroy (window=0x25e8270) at xwayland/window-manager.c:1133
#5  0x00007f7faf4ec7f2 in weston_wm_handle_destroy_notify (wm=0x2248c70, event=0x25df2f0) at xwayland/window-manager.c:1176
#6  0x00007f7faf4ed806 in weston_wm_handle_event (fd=33, mask=1, data=0x2248c70) at xwayland/window-manager.c:1775
#7  0x00007f7fba0ce211 in wl_event_source_fd_dispatch (source=0x2242190, ep=0x7fff10d7d8b0) at src/event-loop.c:86
#8  0x00007f7fba0ceb66 in wl_event_loop_dispatch (loop=0x211b220, timeout=-1) at src/event-loop.c:419
#9  0x00007f7fba0cc9f7 in wl_display_run (display=0x211b190) at src/wayland-server.c:969
#10 0x0000000000410ddb in main (argc=1, argv=0x7fff10d7dd78) at src/compositor.c:4326
(gdb)
Comment 6 Boyan Ding 2014-07-13 04:04:23 UTC
For the last crash, try this patch: http://lists.freedesktop.org/archives/wayland-devel/2014-July/015943.html
Comment 7 Andrew Engelbrecht 2014-07-13 21:50:38 UTC
(In reply to comment #6)
> For the last crash, try this patch:
> http://lists.freedesktop.org/archives/wayland-devel/2014-July/015943.html

using this patch in weston master, and xwayland master, i launched xman, and moved it around. i resized it a bit. i then clicked xman's title bar, to move the window around. however, weston appeard to be frozen, as the cursor and window would not move. i stopped trying to move the window, then tried again. this time it worked. i may  have lifted my finger off of the touch pad, or realeased the mouse button, before it started working again. that happened once.

this may be an interaction with the following bug: https://bugs.freedesktop.org/show_bug.cgi?id=81307


when resizing arora's window, i noticed that after clicking and dragging a window corner, the mouse would occasionally freeze in place, so the window would not resize, until i let go of the mouse button. also, sometimes the mouse would keep moving, but the window corner would stay in place, even though i had clicked the corner.

i did not notice any crashing, but the crashing behavior is hard to reproduce and currently depends on luck.

it also looks like this test left a weston cursor floating over the tty in which i had tested weston-launch. (maybe i hit ^C as weston was shutting down? i've done that before, but don't remember a cursor remaining.)
Comment 8 Andrew Engelbrecht 2014-07-14 03:48:32 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > For the last crash, try this patch:
> > http://lists.freedesktop.org/archives/wayland-devel/2014-July/015943.html

all the issues i previously reported about this patch so far i've been able to reproduce under weston master, either normally (with hardware acceleration), or with software rendering; or both.

i'll keep testing this patch, to see if it resolves the original crashing problem.
Comment 9 Andrew Engelbrecht 2014-08-26 22:53:20 UTC
I did more testing of this patch a while back. i don't remember the specific results, but i had a hard time getting it to crash.

it will likely be a while before i can test this patch in a similar environment. if i test again soon, it will likely be with --use-pixman.
Comment 10 Olivier Fourdan 2016-04-07 08:41:25 UTC
Is it still accurate, can we close this bug?
Comment 11 Andrew Engelbrecht 2016-08-15 03:17:55 UTC
I could not reproduce this issue with Fedora 24 on the X60 laptop I originally used. It should be safe to close this bug.
Comment 12 Daniel Stone 2018-06-04 07:20:50 UTC
Closing now, thanks for the report Andrew.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.