id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
4850	Segfault when lots of blocked MVar messages	NeilMitchell		"I reduced the original problem I started with in #4835 to the following example, which spans 3 files. There is still further scope for reducing the test case - I have stopped now it's standalone without any data file or package dependencies. I have reproduced this bug on GHC 7.0.2-rc1.

The program does has some parallelism, and due to a bug in the parallel-io library (since fixed) it causes lots of MVar blocked messages. This program sometimes runs to completion, sometimes gives a blocked MVar, and sometimes segfaults. I see the segfault > 50% of the time.

The program is compiled and run with:

{{{
ghc --make Main.hs -threaded && Main.exe
}}}

Line 82 of {{{Main.hs}}} does {{{getDirectoryContents ""C:/Windows""}}}. It seems to crash if I put file or directory operations here, but not if I put sleep or pure computation there. This line can be changed to any reasonably sized directory to get the same effects - there is nothing specific to that folder."	bug	closed	high	7.0.2	Runtime System	7.0.1	fixed			Windows	Unknown/Multiple	Runtime crash					
