iu-parfunc / lvars

The LVish Haskell library
http://hackage.haskell.org/package/lvish
81 stars 14 forks source link

Spurious thread-blocked-indefinitely leaking in large stress test #62

Open rrnewton opened 10 years ago

rrnewton commented 10 years ago

Currently, if I run stress tests:

cd lvish/tests
STRESSTESTS=500 rep 10 ./AddRemoveSetTests.exe -t v3 +RTS -N4

I eventually get this:

Exception inside child thread "worker thread", ThreadId 8230: thread blocked 
indefinitely in an MVar operation

Could it be that we're just leaking threads and running into a problem because we have too many? 9000 shouldn't be too many, however.

rrnewton commented 10 years ago

Further increasing the number of threads (e.g. -N10) makes this happen more often. Also, cranking up STRESSTESTS makes it happen reliably, even with one run of the process.

rrnewton commented 10 years ago

I repeated the same thing (10K or more runPars) with the old monad-par package and I didn't have any trouble.

rrnewton commented 10 years ago

This may have something to do with the other (even simpler) stress test, #81.