[GHC] #8591: Concurrent executions of ghc-pkg can cause inconstant package.cache files
GHC
ghc-devs at haskell.org
Sun Jun 14 10:48:10 UTC 2015
#8591: Concurrent executions of ghc-pkg can cause inconstant package.cache files
-------------------------------------+-------------------------------------
Reporter: janm | Owner: pgj
Type: bug | Status: new
Priority: normal | Milestone:
Component: Package system | Version: 7.6.3
Resolution: | Keywords: ghc-pkg
Operating System: Unknown/Multiple | race
Type of failure: Other | Architecture:
Blocked By: | Unknown/Multiple
Related Tickets: #10205 | Test Case:
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by thomie):
* os: FreeBSD => Unknown/Multiple
* related: => #10205
Comment:
janm: are you installing the packages with cabal or manually?
The GHC build system (in ghc.mk) contains the following comment:
{{{
# register the boot packages in strict sequence, because running
# multiple ghc-pkgs in parallel doesn't work (registrations may get
# lost).
}}}
Presumably `cabal -j` also registers the packages sequentially, or there'd
be many more reported issues.
Changing just `withFileAtomic` as you propose in comment:2 and comment:5
wouldn't solve the problem. Two concurrent ghc-pkg processes still
wouldn't know about each other's modifications to the package database, so
the last one to call `withFileAtomic` would still win.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8591#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list