[GHC] #15313: Framework failures on windows with plugins
#15313: Framework failures on windows with plugins -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- On Windows, when the load is heavy (i.e. when doing a full `sh validate` I get a bunch of framework failures in the `plugins/` testsuite directory {{{ Framework failures: plugins/plugins07.run plugins07 [normal] (pre_cmd failed: 2) plugins/T10420.run T10420 [normal] (pre_cmd failed: 2) plugins/T11244.run T11244 [normal] (pre_cmd failed: 2) plugins/plugin-recomp-pure.run plugin-recomp-pure [normal] (pre_cmd failed: 2) plugins/plugin-recomp-impure.run plugin-recomp-impure [normal] (pre_cmd failed: 2) plugins/plugin-recomp-flags.run plugin-recomp-flags [normal] (pre_cmd failed: 2) }}} I sent a full log to Tamar who said: Thanks for the log, that does give a clue. The command fails with {{{ setup.exe: 'C:/code/HEAD/inplace/bin/ghc-pkg.exe' exited with an error: ... rule-defining-plugin-0.1: cannot find any of ["libHSrule-defining-plugin-0.1-GxqqrdsQ5NRK9hAhEkvz8Z.a","libHSrule- defining-plugin-0.1-GxqqrdsQ5NRK9hAhEkvz8Z.p_a","libHSrule-defining- plugin-0.1-GxqqrdsQ5NRK9hAhEkvz8Z-ghc8.5.20180616.so","libHSrule-defining- plugin-0.1-GxqqrdsQ5NRK9hAhEkvz8Z-ghc8.5.20180616.dylib","HSrule-defining- plugin-0.1-GxqqrdsQ5NRK9hAhEkvz8Z-ghc8.5.20180616.dll"] on library path (use --force to override) make[2]: *** [Makefile:18: package.T10420] Error 1 }}} so it's the `setup install` from https://github.com/ghc/ghc/blob/c2783ccf545faabd21a234a4dfc569cd856082b9/tes... /rule-defining-plugin/Makefile failing. Unfortunately, all those tests run with -v0 which is annoying because now the verbosity of the testsuite doesn't control that of these tests. I'm not sure why these commands fail under heavy load though. I'll need to dive into the source of ghc-pkg to figure out what's happening. Notice that all the framework failures are these plugin tests which modify a package database. A wild guess is that `ghc-pkg` tries to take a lock on all package-databases or something when it's mutating one. But I'm not intimately familiar with the package store and this doesn't explain why it doesn't happen on Linux. For now one solution I can propose is to create a ticket to track these and mark these tests as cpu multirace on Windows. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15313> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15313: Framework failures on windows with plugins -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4918 Wiki Page: | -------------------------------------+------------------------------------- Changes (by Phyx-): * differential: => Phab:D4918 Comment: This patch will force these tests serially until the package registration can be fixed. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15313#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15313: Framework failures on windows with plugins -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4918 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Tamar Christina <tamar@…>): In [changeset:"b290f15c4d01d45c41c02ae5c5333a1fab022a32/ghc" b290f15c/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="b290f15c4d01d45c41c02ae5c5333a1fab022a32" testsuite: force plugin tests sequentially on Windows. Summary: Package registration does not seem to be thread-safe on Windows. Placing the system under heavily load seems to trigger registration failures even though they are all different package-dbs. This makes the plugin tests a bit flaky. I think this is because on Windows we use pessimistic locks while on Linux we use atomic file replacement. On Windows ReplaceFile is atomic, just the metadata write may not be. Since the metadata is not of importance we should either switch over to ReplaceFile or fix the locking code to not error out but wait. For now however I have to force these 25 tests to run serially in order to guarantee their correctness. Test Plan: ./validate Reviewers: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15313, #13194 Differential Revision: https://phabricator.haskell.org/D4918 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15313#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC