Skip to content

thread blocked indefinitely in an MVar operation

Summary

Write a brief description of the issue.

I got this message:

*Main> ghc: panic! (the 'impossible' happened) (GHC version 7.10.3 for x86_64-unknown-linux): thread blocked indefinitely in an MVar operation

Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug

Steps to reproduce

Please provide a set of concrete steps to reproduce the issue.

I had been fiddling around for a while. The only code loaded was:

factors n = [x | x <- [1..n], mod n x == 0]

isPrime n = (length (factors n)) == 2


primeFactors n = filter isPrime (factors n)

primeFactorized :: Integral a => a -> [a]
primeFactorized n
  | n == 1 = []
  | otherwise = x:primeFactorized (div n x) where x = (last (primeFactors n)) 

This is what I issued and what I got:

*Main>
*Main>
*Main> primeFactorized (3*3*3*31*37*37*83)
[83,37,37,31,3,3,3]
*Main>
ghc: panic! (the 'impossible' happened)
  (GHC version 7.10.3 for x86_64-unknown-linux):
        thread blocked indefinitely in an MVar operation

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Expected behavior

What do you expect the reproducer described above to do?

Environment

  • GHC version used:

Optional:

  • Operating System:
  • System Architecture:
Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information