Ticket #5891 (closed bug: fixed)

Opened 15 months ago

Last modified 15 months ago

"createDirectory: already exists" error with parallel build

Reported by: akio Owned by: simonmar
Priority: high Milestone: 7.4.2
Component: Compiler Version: 7.4.1
Keywords: Cc: conrad@…, rrnewton@…
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

When I invoke multiple instances of GHC in parallel, I sometimes get an error: <path>: createDirectory: already exists (File exists). The attached script demonstrates this.

Attachments

ghc-race.hs Download (0.5 KB) - added by akio 15 months ago.
program to reproduce
0001-Replace-createDirectoryHierarchy-with-createDirector.patch Download (5.9 KB) - added by akio 15 months ago.
proposed patch

Change History

Changed 15 months ago by akio

program to reproduce

Changed 15 months ago by akio

proposed patch

Changed 15 months ago by conrad

  • cc conrad@… added

Changed 15 months ago by akio

  • status changed from new to patch

Changed 15 months ago by rrnewton

  • cc rrnewton@… added

Changed 15 months ago by simonmar

  • owner set to simonmar
  • difficulty set to Unknown
  • priority changed from normal to high
  • milestone set to 7.4.2

Thanks - I'll commit.

Changed 15 months ago by simonmar

  • status changed from patch to merge

commit ffe282cef4213ab8de515a8574d366994d38d5dd

Author: Takano Akio <aljee@hyper.cx>
Date:   Wed Feb 22 10:18:29 2012 +0800

    Replace createDirectoryHierarchy with createDirectoryIfMissing True
    
    createDirectoryHierarchy consisted of an existence test followed by
    createDirectory, which failed if that directory was creted just after
    the test. createDirectoryifMissing does not have this problem.

Changed 15 months ago by pcapriotti

  • status changed from merge to closed
  • resolution set to fixed

Merged as 02eab9a56b0151b952bd09d65c2f6061c461d168.

Note: See TracTickets for help on using tickets.