Bug 79725 - SIGSEGV in Weston data_device_start_drag() during weston-dnd
Summary: SIGSEGV in Weston data_device_start_drag() during weston-dnd
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 critical
Assignee: Wayland bug list
QA Contact: Michał Budzyński
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-06 14:14 UTC by Michał Budzyński
Modified: 2014-06-26 09:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
gdb stacktrace (956 bytes, text/plain)
2014-06-06 14:14 UTC, Michał Budzyński
Details

Description Michał Budzyński 2014-06-06 14:14:53 UTC
Created attachment 100519 [details]
gdb stacktrace

Tested on ubuntu 13.10 64bit dell xps 13 cypress touchpad 

weston:   6d1d1121a58b19db6e4a60939cbede1fed3d93e2
wayland:  3de6a1de3f860fdb4e0eb8c09e9a868295f44643
pixman:   9cd283b2eb8279824406bfd47b020d21fc00cf82
mesa:     dfd117b8570a69a429e660c069997e78b181ab6d
cairo:    ead5c7909f3db1d0d81121fc2775c458871891b2
mesa/drm: 8fc62ca8ac010659023bb63c4759eb683de4f9af

Steps to reproduce:
1. start weston
2. start weston-dnd
3. click quickly on flowers
4. SIGSEGV in data_device_start_drag (stack trace below) due to (seat->touch == NULL)

gdb-stacktrace:
#0  data_device_start_drag (client=0x8bbb40, resource=0x8b98e0, source_resource=0x9099a0, origin_resource=0x8cd630, icon_resource=0x90abe0,
    serial=355) at src/data-device.c:656
#1  0x00007ffff67bbadc in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#2  0x00007ffff67bb40c in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#3  0x00007ffff7bd377a in wl_closure_invoke (closure=<optimized out>, flags=<optimized out>, target=0x8b98e0, opcode=0, data=0x8bbb40)
    at src/connection.c:936
#4  0x00007ffff7bcfcae in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0x8bbb40) at src/wayland-server.c:333
#5  0x00007ffff7bd1c22 in wl_event_loop_dispatch (loop=0x628240, timeout=timeout@entry=-1) at src/event-loop.c:419
#6  0x00007ffff7bd0265 in wl_display_run (display=display@entry=0x6281b0) at src/wayland-server.c:969
#7  0x0000000000407a24 in main (argc=1, argv=<optimized out>) at src/compositor.c:4316

Error is 100% reproducible on both x11 and drm backend
Comment 1 Michał Budzyński 2014-06-06 14:34:35 UTC
Possible fix sent to mailing list http://lists.freedesktop.org/archives/wayland-devel/2014-June/015350.html
In case it is important. Cypress touchpad was used for input.
Comment 2 Pekka Paalanen 2014-06-26 09:37:27 UTC
Marking as fixed, in Weston master:

commit 8202d72054575bea0cd20cb252c119cac6b12561
Author: Jason Ekstrand <jason.ekstrand@intel.com>
Date:   Tue Jun 24 21:19:24 2014 -0700

    data-device: Clean up the logic in start_drag
    
    Previoiusly, we had a mess of logic that was repeated with one of the
    repeats negated.  Not only was this unnecisaraly confusing, but it
    segfaulted and one of the negations was wrong.  This cleans the whole mess
    up and should fix bug #79725.


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.