[Pkg-haskell-maintainers] Bug#681621: use of logging functions by hPipeFrom, etc, causes hangs with threaded runtime

Joey Hess joeyh at debian.org
Sat Jul 14 20:11:40 UTC 2012

Package: libghc-missingh-dev
Severity: normal

As described in this thread:

The attached testcase will hang after a short while once compiled with -threaded.
Comment out the "LINE OF DEATH" and it runs as expected.

Apparently hPipeFrom etc's use of System.Log.Logger is the culprit. logM uses
a MVar, and this is a MVar deadlock. But I don't understand exactly why this
happens only with the threaded runtime, or really, why the attempt to use the MVar
*before* forkProcess causes problems at all.

This also seems disturbingly similar to #624389. In both cases System.Cmd.Utils
falls over under heavy load, or is somehow racy.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 3.2.0-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libghc-missingh-dev depends on:
ii  ghc [libghc-unix-dev-]                        7.4.1-4
ii  libc6                                                      2.13-32
ii  libffi5                                                    3.0.10-3
ii  libghc-array-dev-                             <none>
ii  libghc-base-dev-                              <none>
ii  libghc-containers-dev-                        <none>
ii  libghc-directory-dev-                         <none>
ii  libghc-filepath-dev-                          <none>
ii  libghc-hslogger-dev [libghc-hslogger-dev-1.1.4-94350]      1.1.4+dfsg1-2+b3
ii  libghc-hunit-dev [libghc-hunit-dev-]
ii  libghc-mtl-dev [libghc-mtl-dev-2.1.1-ae9b4]                2.1.1-1
ii  libghc-network-dev [libghc-network-dev-]
ii  libghc-old-locale-dev-                        <none>
ii  libghc-old-time-dev-                          <none>
ii  libghc-parsec3-dev [libghc-parsec-dev-3.1.2-ad4f8]         3.1.2-1+b3
ii  libghc-process-dev-                           <none>
ii  libghc-random-dev [libghc-random-dev-]
ii  libghc-regex-compat-dev [libghc-regex-compat-dev-0.95.1-c  0.95.1-2+b1
ii  libgmp10                                                   2:5.0.5+dfsg-2

libghc-missingh-dev recommends no packages.

Versions of packages libghc-missingh-dev suggests:
pn  libghc-missingh-doc   <none>
pn  libghc-missingh-prof  <none>

-- no debconf information

see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.hs
Type: text/x-haskell
Size: 2102 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-haskell-maintainers/attachments/20120714/cc458e7f/attachment.hs>

More information about the Pkg-haskell-maintainers mailing list