#9292: Race condition when multiple threads wait for a process
-------------------------------------+-------------------------------------
Reporter: snoyberg | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/process | Version: 7.8.2
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
-------------------------------------+-------------------------------------
Consider the following code:
{{{
import System.Process
import Control.Concurrent.Async
main :: IO ()
main = do
(_, _, _, ph) <- createProcess $ shell "sleep 1"
let helper i = do
ec <- waitForProcess ph
print (i :: Int, ec)
((), ()) <- concurrently (helper 1) (helper 2)
return ()
}}}
If I compile with the single threaded runtime, I get the output
{{{
(2,ExitSuccess)
(1,ExitSuccess)
}}}
But when compiling with the multithreaded runtime, I get:
{{{
bin: waitForProcess: does not exist (No child processes)
}}}
If you need to wait for a process from multiple threads, you can do so now
by having a dedicated wait thread which writes to an MVar or TMVar, but
the current default behavior can be surprising.
I discussed this in a [http://www.yesodweb.com/blog/2014/07/rfc-new-data-
conduit-process blog post], and there was some
[http://www.reddit.com/r/haskell/comments/2abmwu/rfc_new_dataconduitprocess/…
conversation on Reddit].
At the least, I think we need better documentation, but if there's a
better solution, that would be best.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9292>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#7828: RebindableSyntax and Arrow
----------------------------------------------+----------------------------
Reporter: AlessandroVermeulen | Owner:
Type: bug | jstolarek
Priority: normal | Status: new
Component: Compiler (Type checker) | Milestone: 7.10.1
Resolution: | Version: 7.6.2
Operating System: Unknown/Multiple | Keywords:
Type of failure: GHC rejects valid program | Architecture:
Test Case: | Unknown/Multiple
Blocking: | Difficulty: Unknown
| Blocked By:
| Related Tickets: #1537,
| #3613
----------------------------------------------+----------------------------
Comment (by jstolarek):
I have made some progress on this one today. I'm able to compile
{{{
test :: Arrow a => a i i
test = proc n -> do
returnA -< n
}}}
using the new desugaring, which was not possible earlier. But I'm still
stuck on this:
{{{
test :: Arrow a => a i i
test = proc n -> do
returnA -< n
returnA -< n
}}}
ie. desugaring of `thenA` although now I have gathered more information.
With my new implementation the code above desugars to:
{{{
(>>>) @ i @ (i, ()) @ i
(arr @ i @ (i, ()) (\ (n :: i) -> (n, ())))
(thenA @ arrow @ i @ (GHC.Prim.Any *) @ (GHC.Prim.Any *) @ i $dArrow_auX
((>>>) @ (i, ()) @ i @ i
(arr @ (i, ()) @ i
(\ (ds2 :: (i, ())) ->
case ds2 of _ { (ds4, ds5) -> ds4 }))
(Control.Arrow.returnA @ arrow @ i $dArrow_auX))
((>>>) @ (i, ()) @ i @ i
(arr @ (i, ()) @ i
(\ (ds2 :: (i, ())) ->
case ds2 of _ { (ds4, ds5) -> ds4 }))
(Control.Arrow.returnA @ arrow @ i $dArrow_auX)))
}}}
This looks correct except for the two `(GHC.Prim.Any *)` type parameters
to `thenA`. One corresponds to the type of the stack, the other to result
of first command (`b` in the type signature `a (e,s) b -> a (e,s) c -> a
(e,s) c`). `thenA` should be polymorphic in these, but it seems that
during typechecking I need to instantiate `s` and `b` to concrete values.
I noticed that desugaring of `cmd` stored in the `BodyStmt` always passes
`()` as the type of the stack. If this is correct then there's only the
problem of what to do with `b`. Help needed here becuase I have no idea
how to figure out the type of `b` from within `tcArrDoStmt`.
Ross, I also tried to implement desugaring of `bind`. When generating the
desugared Core for `cmd 'bind' \ p -> do { ss }` I have problem with the
`\p ->` part. So, given the desugared `do { ss }`, `cmd` and the `bind`
operator how should the generated command lambda look like? I'm still at a
loss to undestand how to explicitly manipulate the stack from within Core.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7828#comment:42>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#284: RPM doesn't support --prefix
-------------------------------------+------------------------------------
Reporter: skaller | Owner: juhp
Type: feature request | Status: new
Priority: normal | Milestone: ⊥
Component: Build System | Version: None
Resolution: None | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: N/A | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by ydewit):
This is what I see with {{{otool -L}}}:
{{{
/t/g/l/g/array-0.5.0.0 ❯❯❯ otool -L
libHSarray-0.5.0.0-ghc7.9.20140709.dylib
libHSarray-0.5.0.0-ghc7.9.20140709.dylib:
@rpath/libHSarray-0.5.0.0-ghc7.9.20140709.dylib (compatibility
version 0.0.0, current version 0.0.0)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current
version 7.0.0)
/usr/local/lib/libgmp.10.dylib (compatibility version 13.0.0,
current version 13.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1197.1.1)
@rpath/libHSbase-4.7.1.0-ghc7.9.20140709.dylib (compatibility
version 0.0.0, current version 0.0.0)
@rpath/libHSinteger-gmp-0.5.1.0-ghc7.9.20140709.dylib
(compatibility version 0.0.0, current version 0.0.0)
@rpath/libHSghc-prim-0.3.1.0-ghc7.9.20140709.dylib (compatibility
version 0.0.0, current version 0.0.0)
}}}
My understanding is that {{{@rpath}}}, which seems to be a feature added
in 10.5, means this dylib can be relocated.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/284#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#9291: Best Muscle building supplement
------------------------------------+-------------------------------------
Reporter: herbertlawrence | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Keywords: Horsepower XXL | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
A improvement passim up the ablaze up see you afterwards alright why
potshots it may become bacteria hey it's Kyle Leon here I fabricated the
abbreviate presentation for you because I wish to betrayal the three
biggest bodybuilding Liza mistakes there in actuality authoritative it
impossible for you to anatomy apparent muscle quickly and are amenable for
what you ‘relooking the aforementioned anniversary afterwards week you
will be abashed but you will learn the accuracy about what is captivation
you back from accepting the angular beef you deserve and by the end of
this presentation you also apprentice in actuality how to breach through
your muscle-building Pluto and you'll be on your way to packing on slabs
ripped angular muscle without any fat now that sounds great but if you're
annihilation like me [http://slioswim.com/ Horsepower XXL] you're going to
wish quick safe and permanent results without accepting to await on things
like dangerous steroids pills powders potions or even crazy hours in the
gym I'm going to accord you the band-aid that will do just that I'm
traveling to accord you the band-aid that abandoned use that accustomed me
to overcome my genetics lose my top academy appellation the lanky Leo and
become a supplement sponsored athlete by packing on and befitting 21pounds
a in actuality muscle in just over a week's afterwards advertise aft this
band-aid has landed me on magazine covers a supplement sponsorship and as
ultimately afflicted my action that’s why I'm administration this
admonition with you today I want to accord you.
http://slioswim.com/
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9291>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
#284: RPM doesn't support --prefix
-------------------------------------+------------------------------------
Reporter: skaller | Owner: juhp
Type: feature request | Status: new
Priority: normal | Milestone: ⊥
Component: Build System | Version: None
Resolution: None | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: N/A | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by carter):
I don't think relocating is quite that simple. Eg On OS X, dylibs can't
use relative paths (last I checked), so relocating dylibs requires an
invocation of the install-name-tool to fixup the paths!
(my recollection could be totally wrong mind you)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/284#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler