Skip to content
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

[GHC 7.10.1-RC2] shake and vector-algorithms test suites hang #6259

Closed
MP2E opened this issue Feb 9, 2015 · 6 comments
Closed

[GHC 7.10.1-RC2] shake and vector-algorithms test suites hang #6259

MP2E opened this issue Feb 9, 2015 · 6 comments
Assignees
Labels

Comments

@MP2E
Copy link

MP2E commented Feb 9, 2015

Whenever nix runs ./Setup test for vector-algorithms or shake with GHC 7.10.1-RC2 the tests run forever, I left them running for 6 hours(!) on an i7 3770K. The tests don't give me any failing messages, they just run until I hit ctrl+c

GHC 7.8.4 does not have this issue

vector-algorithms
http://lpaste.net/120194

shake
http://lpaste.net/120195

strace on shake build
http://lpaste.net/120197

I originally asked for help on #ghc but pacak could not reproduce these issues, and he told me to try running shake-test directly instead of running ./Setup test (which runs runhaskell). When I overrode checkPhase to run the local binary directly the test fails immediately because it can't find a file that hasn't been created yet. (Probably created by installPhase?)

Direct run of ./dist/build/shake-test/shake-test
http://lpaste.net/120199

Direct run of the test from vector-algorithms:
http://lpaste.net/120398

Note that disabling the test suite for these 2 packages works fine, and projects that depend on them work as intended

@MP2E MP2E changed the title [haskell-ng] shake and vector-algorithms test suites hang [GHC 7.10.1-RC2] shake and vector-algorithms test suites hang Feb 9, 2015
@peti peti added 6.topic: haskell 0.kind: bug Something is broken labels Feb 9, 2015
@peti
Copy link
Member

peti commented Feb 12, 2015

I observe the same problem, but I have no idea what's causing it.

@MP2E MP2E self-assigned this Feb 13, 2015
@bennofs
Copy link
Contributor

bennofs commented Feb 13, 2015

@peti Compiling Setup.hs with -threaded should fix the issue. The problem is that the Cabal library uses the FFI to wait for the test process to finish, and uses a thread to consume the output of the test process (it's passed to a pipe). Without -threaded, the FFI call will block the whole program and the pipe consumers never run, therefore filling up the pipe.

@bennofs
Copy link
Contributor

bennofs commented Feb 13, 2015

See haskell/cabal#2398

@peti
Copy link
Member

peti commented Feb 13, 2015

Ah, very nice catch. Thanks for the pointer.

@MP2E
Copy link
Author

MP2E commented Feb 13, 2015

Thanks for the help, @bennofs !

@nomeata
Copy link
Contributor

nomeata commented Nov 6, 2015

BTW, I have submitted a work-around for this at haskell/cabal#2913 that does not require a threaded Setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants