[GHC] #13194: Concurrent modifications of package.cache are not safe

GHC ghc-devs at haskell.org
Wed Jul 18 20:26:39 UTC 2018


#13194: Concurrent modifications of package.cache are not safe
-------------------------------------+-------------------------------------
        Reporter:  arybczak          |                Owner:  arybczak
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.2.1
       Component:  ghc-pkg           |              Version:  8.0.1
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13354, #13375,   |  Differential Rev(s):  Phab:D3090
  #14017                             |
       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/13194#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list