[MacPorts] #18491: XtAppPending and XtAppProcessEvent infloop
MacPorts
noreply at macports.org
Sat Feb 14 03:34:32 PST 2009
#18491: XtAppPending and XtAppProcessEvent infloop
--------------------------------+-------------------------------------------
Reporter: stephen@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone: Port Bugs
Component: ports | Version: 1.8.0
Keywords: | Port: xorg-libXt
--------------------------------+-------------------------------------------
XtAppPending can block; this is a complex of X.org bugginess reported as
http://bugs.freedesktop.org/show_bug.cgi?id=20048.
On recent Mac OS X (10.5.6 and 10.4.11+security update 2008-008), one of
the problems results in an infloop in _XtWaitForSomething, the basic event
gathering function for both XtAppPending and XtAppProcessEvent. I have no
clue why, but under certain circumstances poll(2) will return with a fd in
POLLNVAL state (ie, not open). _XtWaitForSomething ignores this, and
loops looking for input, but I guess the POLLNVAL fd is at the head of the
queue and never gets processed. (That's idle speculation, to be honest I
really have no clue why this happens.)
The attached patch patch-NextEvent.c-XPOLL_EXCEPT teaches
_XtWaitForSomething to notice this event, which fixes the infloop for me.
I recommend application to MacPorts strongly (see the bug referenced above
for rationale).
A second patch seems to me to be correct in principle, but it is neither
necessary nor sufficient to fix the infloop. Since I've got it, Ill post
it here for your consideration.
--
Ticket URL: <http://trac.macports.org/ticket/18491>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list