Bug 49598

Summary: Crash at exit due to recent ReleaseButtonsAndKeys addition to 1.12 branch
Product: xorg Reporter: Cyril Brulebois <kibi>
Component: Server/GeneralAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: kibi
Version: gitKeywords: have-backtrace, patch, regression
Hardware: Other   
OS: All   
URL: http://bugs.debian.org/671812
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
gdb backtrace from Jakub Wilk none

Description Cyril Brulebois 2012-05-07 11:32:40 UTC
Created attachment 61167 [details]
gdb backtrace from Jakub Wilk

Hello,

crash with X 1.12 at exit time, with current server-1.12-branch, due to:

commit 90299556db24543bb7365e8c2897deca3aa219e7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Apr 30 10:01:48 2012 +1000

    dix: when disabling a device, release all buttons and keys
    
    A suspend-induced device disable may happen before the device gets to see
    the button release event. On resume, the server's internal state still has
    some buttons pressed, causing inconsistent behaviour.
    
    Force the release and the matching events to be sent to the client.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit f3410b97cf9b48a47bee3d15d232f8a88e75f4ef)
    
    Conflicts:
    
        dix/devices.c


Indeed, as Julien mentioned on IRC, the codepath looks like it, and a revert on top of 22a1953c4a2747d637bb926034f11134809b8d06 makes my 1.12 branch stop crashing.

Full backtrace attached, but also available in:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=13;filename=gdb.txt;att=1;bug=671812
Comment 1 Julien Cristau 2012-05-09 13:24:02 UTC
http://patchwork.freedesktop.org/patch/10200/
Comment 2 Cyril Brulebois 2012-05-20 01:23:21 UTC
Reverted as of: xorg-server-1.12.1.902~2

commit 58dfb13953af71021317b9d85230b1163198f031
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Thu May 10 00:53:20 2012 -0700

    Revert "dix: when disabling a device, release all buttons and keys"
    
    This reverts commit 90299556db24543bb7365e8c2897deca3aa219e7.
    
    The commit being reverted triggered a segfault on server shutdown when a
    device posts raw events after the root windows are forced to NULL.
    
    https://lists.debian.org/debian-x/2012/05/msg00240.html
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

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.