[xmonad] Re: Issue 91 in xmonad: DynamicLog causes xmonad to hang
when the output pipe is full
codesite-noreply at google.com
codesite-noreply at google.com
Thu Nov 12 16:52:41 EST 2009
Comment #11 on issue 91 by elias.kunnas: DynamicLog causes xmonad to hang
when the output pipe is full
http://code.google.com/p/xmonad/issues/detail?id=91
I've been researching this bug for a long-ish time. It might be that the
way EPIPE is
handled by xmonad or GHC has some relevance to this, but it's very likely
not the
primary cause.
I've been rather exhaustively trying different combinations of EPIPE
handlers in
xmonad (including not handling it at all, setting arbitrary handlers and
using the
default handler), and nothing so far has affected the buggy behaviour that
I'm able
to reproduce ~30% of the time with the config on comment 5.
One fairly sure sign that GHC itself has much to do with this, although I
haven't
been able to replicate the behaviour outside xmonad, is that even setting a
timeout
to each log write will still cause xmonad to hang.
I mentioned this in #haskell at freenode and it turns out people have
experienced
similar issues with fdRead (assuming pipe writes are ultimately calling
that, though
I haven't been able to follow the code to this point). In
http://upcycle.it/~blackh,/Server.hs, the issue with fdRead was fixed
apparently by
adapting the code from ghc-6.12. Since this fixes the issue with fdRead, it
seems it
may well be the case that just using GHC-6.12 would fix pipe writes as well
(so
presumably fdWrite).
It seems the reason for this is that up to GHC-6.10, fdRead (and presumably
fdWrite?
Haven't been able to verify this yet) were implemented using unsafe ccalls
whereas
they now use safe ones. Following the discussion on #haskell, the unsafe
ccalls might
then starve the threads of their process, which would be consistent with
seeing
'timeout' not halting the IO writes.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the xmonad
mailing list