New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
thread blocked indefinitely in an MVar operation (HP 2013 ghc 7.6.3 on mac) #28
Comments
huh, i seem to have given you a wrong repro. I'll post a corrected one that does trigger it later |
heres the REPRO that works this is for current haskell platform, and using the current version of monad-par, statistics, and criterion call this code {-# LANGUAGE BangPatterns #-}
module Main where
import Criterion.Main
import Criterion.Config
import Data.Word
import Data.Foldable
whnfIter:: Int ->(a->a)-> a -> Pure
whnfIter cnt f arg = whnf (\v -> foldl' (\ a b -> f a ) v [0 .. cnt] ) arg
main = defaultMainWith defaultConfig{cfgSamples=ljust 10} (return ()) [
bgroup "Morton Z" [
bcompare [
bench "addingNumbersIter1000" $! whnfIter 1000 ( (7 + ):: Word->Word) 9, -- ,
bench "other thing "$! whnfIter 1000 ( (7 + ):: Word->Word) 9
]] ] build this using
then run
then you'll get
|
I can reproduce this with HP 2013 ghc 7.6.3 and with 7.6.1 on mac too. No problem with -N1, one "thread blocked indefinitely in an MVar operation" with -N2, two with -N3 and three with -N4. I'm using Carter's code a few hours ago, from the last comment. criterion-0.8, monad-par 0.3.4.2, statistics 0.10.4.1, for what it's worth. |
@alpmestan thanks for adding the version numbers to the mix (was a bit tired yesterday) We should probably figure out how to repro this directly in in terms of monad-par so we can give them a useful test case. |
i've simplified the test case a teeny bit more {-# LANGUAGE BangPatterns #-}
module Main where
import Criterion.Main
import Criterion.Config
import Data.Word
import Data.Foldable
whnfIter:: Int ->(a->a)-> a -> Pure
whnfIter cnt f arg = whnf (\v -> foldl' (\ a b -> f a ) v [0 .. cnt] ) arg
main = defaultMainWith defaultConfig{cfgSamples=ljust 10} (return ()) [
bench "addingNumbersIter1000" $! whnfIter 1000 ( (7 + ):: Word->Word) 9, -- ,
bench "other thing "$! whnfIter 1000 ( (7 + ):: Word->Word) 9
] should be doable to figure out a direct repro in monad-par using this |
This is due to the upstream monad-par bug => closing. |
I get the following error in my criterion code
heres a simplified piece of code that replicates this error
heres the ghc options i'd used, most of these probably are irrelevant, but i'm putting them here for completeness
The text was updated successfully, but these errors were encountered: