Bug 82827 - crashes when running any XWayland app
Summary: crashes when running any XWayland app
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: 1.5.0
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-19 21:06 UTC by smikims.me
Modified: 2014-09-03 13:15 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
A patch that may fix the issue (818 bytes, patch)
2014-08-20 10:03 UTC, Boyan Ding
Details | Splinter Review

Description smikims.me 2014-08-19 21:06:57 UTC
Using Arch Linux package version 1.5.0-1. Crashes usually happen after about a minute, give or take.


Additional info:

My weston.ini has

[core]
modules=xwayland.so,desktop-shell.so


Steps to reproduce: Open any X app (I used glxgears) in weston with XWayland enabled and play around with it for about a minute.

Two backtraces:

Reading symbols from /usr/bin/weston...done.
[New LWP 1003]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/weston'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0 0x00007fa251329d67 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007fa251329d67 in raise () from /usr/lib/libc.so.6
#1 <signal handler called>
#2 surface_resize (shsurf=0xfe75a0, seat=0x0, edges=1) at desktop-shell/shell.c:1772
#3 0x00007fa24ba3452f in weston_wm_handle_button (wm=<optimized out>, wm=<optimized out>, event=<optimized out>) at xwayland/window-manager.c:1650
#4 weston_wm_handle_event (fd=0, mask=16847332, data=0xfcc7a0) at xwayland/window-manager.c:1742
#5 0x00007fa2522b8042 in wl_event_loop_dispatch () from /usr/lib/libwayland-server.so.0
#6 0x00007fa2522b6535 in wl_display_run () from /usr/lib/libwayland-server.so.0
#7 0x0000000000407d9b in main (argc=1, argv=<optimized out>) at src/compositor.c:4316
(gdb) quit

Reading symbols from /usr/bin/weston...done.
[New LWP 23814]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/weston'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0 0x00007fe8d4617d67 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007fe8d4617d67 in raise () from /usr/lib/libc.so.6
#1 <signal handler called>
#2 surface_move (shsurf=0xafa060, client_initiated=1, seat=<optimized out>) at desktop-shell/shell.c:1577
#3 0x00007fe8ced22550 in weston_wm_handle_button (wm=<optimized out>, wm=<optimized out>, event=<optimized out>) at xwayland/window-manager.c:1645
#4 weston_wm_handle_event (fd=11534192, mask=11510576, data=0xe45800) at xwayland/window-manager.c:1742
#5 0x00007fe8d55a6042 in wl_event_loop_dispatch () from /usr/lib/libwayland-server.so.0
#6 0x00007fe8d55a4535 in wl_display_run () from /usr/lib/libwayland-server.so.0
#7 0x0000000000407d9b in main (argc=1, argv=<optimized out>) at src/compositor.c:4316
(gdb) quit
Comment 1 Boyan Ding 2014-08-20 10:03:54 UTC
Created attachment 104968 [details] [review]
A patch that may fix the issue

Please test this patch although I can't reproduce it myself.

If weston no longer crashes at weston_wm_handle_button (1.5.0 has some other bugs elsewhere which have been fixed upstream). I'll send it to the mailing list.
Comment 2 Boyan Ding 2014-08-29 14:07:04 UTC
Okay, managed to reproduce the bug.

Patch sent at http://lists.freedesktop.org/archives/wayland-devel/2014-August/016975.html
Comment 3 Pekka Paalanen 2014-09-03 13:15:08 UTC
Supposedly fixed by

commit 3c6d20c5eb51d20dce337961a3a5e5342315da49
Author: Boyan Ding <stu_dby@126.com>
Date:   Wed Sep 3 17:25:30 2014 +0800

    xwm: Check whether the seat is NULL when needed in weston_wm_handle_button


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.