5039226.patch revision 688
341N/A###############################################################################
341N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
341N/A# Use subject to license terms.
341N/A#
341N/A# Permission is hereby granted, free of charge, to any person obtaining a
341N/A# copy of this software and associated documentation files (the
341N/A# "Software"), to deal in the Software without restriction, including
341N/A# without limitation the rights to use, copy, modify, merge, publish,
341N/A# distribute, and/or sell copies of the Software, and to permit persons
341N/A# to whom the Software is furnished to do so, provided that the above
341N/A# copyright notice(s) and this permission notice appear in all copies of
341N/A# the Software and that both the above copyright notice(s) and this
341N/A# permission notice appear in supporting documentation.
341N/A#
341N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
341N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
341N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
341N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
341N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
341N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
341N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
341N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
341N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
341N/A#
341N/A# Except as contained in this notice, the name of a copyright holder
341N/A# shall not be used in advertising or otherwise to promote the sale, use
341N/A# or other dealings in this Software without prior written authorization
341N/A# of the copyright holder.
341N/A#
341N/A
341N/A5039226 Whitebox animation causes Solaris desktop hang
341N/A
341N/AThis problem is caused by a dead lock between java_vm and Xserver:
341N/AXserver is grabbed by java_vm and waiting for XUngrabServer, java_vm
341N/Athought XUngrabServer was already sent and sends another dga lock
341N/Arequest to Xserver and blocked on that request. Here is what happened:
341N/Ajava_vm threads calls XGrabServer and XUngrabServer and then
341N/ASolaris_DGA_GetLock, it seems no problem, but the current
341N/AXUngrabServer requires a XSync call after XUngrabServer in MT
341N/Aenvironment to make sure Xserver is ungrabbed *before* new lock
341N/Arequests come in. Without this XSync, a dead lock may formed just like
341N/Athis case.
341N/A
688N/Adiff -urp -x '*~' -x '*.orig' src/UngrabSvr.c src/UngrabSvr.c
688N/A--- src/UngrabSvr.c 2008-10-07 10:18:18.000000000 -0700
688N/A+++ src/UngrabSvr.c 2009-04-08 00:18:04.825622000 -0700
688N/A@@ -41,6 +41,9 @@ XUngrabServer (
341N/A GetEmptyReq(UngrabServer, req);
341N/A UnlockDisplay(dpy);
341N/A SyncHandle();
341N/A+ /* fix for bug 5039226: desktop hangs */
688N/A+ if (!dpy->synchandler)
341N/A+ XSync(dpy, 0);
341N/A return 1;
341N/A }
341N/A