[Haskell-cafe] Possible bug in Criterion or Statistics package

Aleksey Khudyakov alexey.skladnoy at gmail.com
Tue Aug 7 17:15:07 CEST 2012


On 07.08.2012 18:16, Till Berger wrote:
> Dear all,
>
> I may have stumbled upon a bug in the Criterion package. When running
> the attached Haskell program (Benchmark.hs, a simple test case) on
> multiple cores (with +RTS -N, +RTS -N2, +RTS -N3 etc.) it sooner or
> later crashes with the following exception:
>
> Benchmark: thread blocked indefinitely in an MVar operation
>
> With profiling support enabled and run with the xc flag I get the
> following output before the crash:
>
> *** Exception (reporting due to +RTS -xc): (THUNK_STATIC), stack trace:
> Statistics.Resampling.Bootstrap.bootstrapBCA,
> called from Main.main,
> called from Main.CAF
> --> evaluated by: Main.main,
> called from Main.CAF
> *** Exception (reporting due to +RTS -xc): (THUNK_STATIC), stack trace:
> Statistics.Resampling.Bootstrap.bootstrapBCA,
> called from Main.main
> *** Exception (reporting due to +RTS -xc): (THUNK_STATIC), stack trace:
> Statistics.Resampling.Bootstrap.bootstrapBCA,
> called from Main.main
> *** Exception (reporting due to +RTS -xc): (THUNK_STATIC), stack trace:
> Statistics.Resampling.Bootstrap.bootstrapBCA,
> called from Main.main,
> called from Main.CAF
>
> I have tested this with GHC versions 7.0.4 and 7.4.2 and Criterion 0.6.0.1.
>
> So I am not sure if this is a bug in Criterion itself, the Statistics
> package or any dependency or if I am doing something obviously wrong. I
> would be grateful if someone could look into this as it is holding me
> back from using Criterion for benchmarking my code.
>
I would suspect Statistics.Resampling.resample. From quick glance 
criterion doesn't use any concurrent stuff. I'll try create smaller test 
case



More information about the Haskell-Cafe mailing list