Bug 65910 - Killing weston-launch causes segv in desktop-shell
Summary: Killing weston-launch causes segv in desktop-shell
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: EGL (show other bugs)
Version: git
Hardware: Other Linux (All)
: low normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-18 19:47 UTC by Joe Konno
Modified: 2013-06-18 22:28 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
backtrace of desktop-shell segv (9.98 KB, text/plain)
2013-06-18 19:50 UTC, Joe Konno
Details

Description Joe Konno 2013-06-18 19:47:13 UTC
When weston-launch is killed with SIGINT or SIGTERM, weston-launch exits as expected. However, attaching to the desktop-shell process prior to killing weston-launch reveals that desktop-shell segfaults (100% of the time).

Further, the segv is masked. Running `echo $?` immediately after killing weston-launch does not give any indication of the desktop-shell segv. There is no stdout or stderr log messages indicating that an error occurred. This is undesired behavior.

Steps to reproduce:

  1. Run as a normal user (member of weston-launch group):
    weston-launch

  2. Attach gdb to the desktop-shell process, continue execution

  3. Kill weston-launch, either with SIGTERM or SIGINT

  4. gdb will catch a segv

It is expected that weston-launch somehow communicate an unclean exit from its shell (or modules).

In actuality, whatever launched weston-launch is not informed of the unclean exit.

State of (select components of) the s/w stack:
wayland (master) heads/master-0-g7094441
mesa (HEAD) mesa-9.1.3-0-gf32ec82
cairo (HEAD) 1.12.8-0-gcc16291
weston (master) heads/master-0-ga58290b
Comment 1 Joe Konno 2013-06-18 19:50:49 UTC
Created attachment 81035 [details]
backtrace of desktop-shell segv
Comment 2 Joe Konno 2013-06-18 20:26:29 UTC
The segv scenario is only exposed when weston is built with cairo-gl support. Lowering severity.
Comment 3 Kristian Høgsberg 2013-06-18 21:48:03 UTC
This was a mesa bug:

commit 712269d6744a8849d1d0cf01fa0132d969b79ed4
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Tue Jun 18 16:53:46 2013 -0400

    wayland: Handle global_remove event as well
    
    We need to set up a handler for the global_remove event that gets sent
    out when a global gets removed.  Without the handler we end up calling
    a NULL pointer.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=65910
    
    NOTE: This is a candidate for the stable branches.
    
    Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Comment 4 Kristian Høgsberg 2013-06-18 21:52:00 UTC
(added EGL component for mesa, moved bug there)
Comment 5 Joe Konno 2013-06-18 22:28:53 UTC
Thanks krh!

I can verify your fix corrects the reported issue, so I'm setting status to "verified."

(In reply to comment #3)
> This was a mesa bug:
> 
> commit 712269d6744a8849d1d0cf01fa0132d969b79ed4
> Author: Kristian Høgsberg <krh@bitplanet.net>
> Date:   Tue Jun 18 16:53:46 2013 -0400
> 
>     wayland: Handle global_remove event as well
>     
>     We need to set up a handler for the global_remove event that gets sent
>     out when a global gets removed.  Without the handler we end up calling
>     a NULL pointer.
>     
>     https://bugs.freedesktop.org/show_bug.cgi?id=65910
>     
>     NOTE: This is a candidate for the stable branches.
>     
>     Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>


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.