Xorg freezes with mwm

Bug #599547 reported by Peter Buhr
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xserver-xorg-video-ati (Ubuntu)
Expired
Low
Unassigned

Bug Description

Binary package hint: xorg

Problem occurred with Ubuntu 10.4

Package xserver-xorg-core 2:1.7.6-2ubuntu7.2

mwm has a stuck grab when handling Alt-button key-press causing the mwm to freeze.

I reported the problem to <email address hidden>. It was confirmed as a problem and a patch was generated. Can this patch be applied to this package? Please refer to the mailing list for details. The patch is
attached below.

===============================================================================

Date: Fri, 25 Jun 2010 09:48:10 +1000
From: Peter Hutterer <email address hidden>
To: "X.Org Devel List" <email address hidden>
Cc: "Peter A. Buhr" <email address hidden>,
        Keith Packard <email address hidden>,
        Daniel Stone <email address hidden>
Subject: [PATCH] Revert "dix: use the event mask of the grab for
 TryClientEvents."
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Behaviour of earlier X servers was to deliver the ButtonPress event
unconditionally, regardless of the actual event mask being set. Thus, a
GrabButton event will always deliver the button press event, a GrabKey
always the key press event, etc. Same goes for XI and XI2.

Reproducible with a simple client requesting a button grab in the form of:
    XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask,
                GrabModeAsync, GrabModeAsync, None, None);

On servers before MPX/XI2, the client will receive a button press and
release event. On current servers, the client receives only the release.
Clients that expect the press event to be delivered unconditionally may
leave the user with a stuck grab.

XTS test results for XGrabButton are identical with and without this patch.

This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc.

Conflicts:

 dix/events.c

Signed-off-by: Peter Hutterer <email address hidden>
---
 dix/events.c | 52 ++--------------------------------------------------
 1 files changed, 2 insertions(+), 50 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index ae9847c..e1c3d0a 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3420,7 +3420,6 @@ CheckPassiveGrabsOnWindow(
     {
  DeviceIntPtr gdev;
  XkbSrvInfoPtr xkbi = NULL;
- Mask mask = 0;

  gdev= grab->modifierDevice;
         if (grab->grabtype == GRABTYPE_CORE)
@@ -3535,9 +3534,6 @@ CheckPassiveGrabsOnWindow(
                 }
                 xE = &core;
                 count = 1;
- mask = grab->eventMask;
- if (grab->ownerEvents)
- mask |= pWin->eventMask;
             } else if (match & XI2_MATCH)
             {
                 rc = EventToXI2((InternalEvent*)event, &xE);
@@ -3549,34 +3545,6 @@ CheckPassiveGrabsOnWindow(
                     continue;
                 }
                 count = 1;
-
- /* FIXME: EventToXI2 returns NULL for enter events, so
- * dereferencing the event is bad. Internal event types are
- * aligned with core events, so the else clause is valid.
- * long-term we should use internal events for enter/focus
- * as well */
- if (xE)
- mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
- else if (event->type == XI_Enter || event->type == XI_FocusIn)
- mask = grab->xi2mask[device->id][event->type/8];
-
- if (grab->ownerEvents && wOtherInputMasks(grab->window))
- {
- InputClientsPtr icp =
- wOtherInputMasks(grab->window)->inputClients;
-
- while(icp)
- {
- if (rClient(icp) == rClient(grab))
- {
- int evtype = (xE) ? ((xGenericEvent*)xE)->evtype : event->type;
- mask |= icp->xi2mask[device->id][evtype/8];
- break;
- }
-
- icp = icp->next;
- }
- }
             } else
             {
                 rc = EventToXI((InternalEvent*)event, &xE, &count);
@@ -3587,23 +3555,6 @@ CheckPassiveGrabsOnWindow(
                                 "(%d, %d).\n", device->name, event->type, rc);
                     continue;
                 }
- mask = grab->eventMask;
- if (grab->ownerEvents && wOtherInputMasks(grab->window))
- {
- InputClientsPtr icp =
- wOtherInputMasks(grab->window)->inputClients;
-
- while(icp)
- {
- if (rClient(icp) == rClient(grab))
- {
- mask |= icp->mask[device->id];
- break;
- }
-
- icp = icp->next;
- }
- }
             }

      (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
@@ -3612,7 +3563,8 @@ CheckPassiveGrabsOnWindow(
             {
                 FixUpEventFromWindow(device, xE, grab->window, None, TRUE);

- TryClientEvents(rClient(grab), device, xE, count, mask,
+ TryClientEvents(rClient(grab), device, xE, count,
+ GetEventFilter(device, xE),
                                        GetEventFilter(device, xE), grab);
             }

--
1.7.1

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: xorg 1:7.5+5ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-22.36-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
Architecture: i386
Date: Mon Jun 28 16:15:15 2010
DkmsStatus: Error: [Errno 2] No such file or directory
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta i386 (20100317.1)
MachineType: LENOVO 200793U
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-22-generic root=UUID=f5b377fb-90cf-4601-b325-07416c8ae837 ro quiet splash nomodeset
ProcEnviron:
 LANGUAGE=en_CA:en
 PATH=(custom, user)
 LANG=en_CA.UTF-8
 SHELL=/bin/tcsh
SourcePackage: xorg
Symptom: display
Title: Xorg freeze
dmi.bios.date: 11/24/2006
dmi.bios.vendor: LENOVO
dmi.bios.version: 79ETC7WW (2.07 )
dmi.board.name: 200793U
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr79ETC7WW(2.07):bd11/24/2006:svnLENOVO:pn200793U:pvrThinkPadT60p:rvnLENOVO:rn200793U:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 200793U
dmi.product.version: ThinkPad T60p
dmi.sys.vendor: LENOVO
glxinfo: Error: [Errno 2] No such file or directory
system:
 distro: Ubuntu
 codename: lucid
 architecture: i686
 kernel: 2.6.32-22-generic
xkbcomp:
 Error: command ['xkbcomp', ':0', '-w0', '-'] failed with exit code 1: No protocol specified
 Error: Cannot open display ":0"
                   Exiting

Revision history for this message
Peter Buhr (pabuhr) wrote :
Bryce Harrington (bryce)
affects: xorg (Ubuntu) → xserver-xorg-video-ati (Ubuntu)
Bryce Harrington (bryce)
Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

Peter Buhr, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p xserver-xorg-video-ati REPLACE-WITH-BUG-NUMBER

Please note, given that the information from the prior release is already available, doing this on a release prior to the development one would not be helpful.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

Changed in xserver-xorg-video-ati (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xserver-xorg-video-ati (Ubuntu) because there has been no activity for 60 days.]

Changed in xserver-xorg-video-ati (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.