
#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 | Version: 7.6.3 system | Keywords: ghc-pkg race Resolution: | Architecture: Unknown/Multiple Operating System: FreeBSD | Difficulty: Unknown Type of failure: Other | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by janm): Thanks for the reply. A quick code inspection of the renameFile function shows the same race. The function is atomic for single threaded execution (ie. all or nothing for the updated file), but updates can be lost when there is concurrent execution of two processes. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8591#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler