Ticket #2122 (closed merge: fixed)

Opened 5 years ago

Last modified 5 years ago

file locked even though hClose called

Reported by: JeremyShaw Owned by: igloo
Priority: normal Milestone: 6.8.3
Component: Runtime System Version: 6.8.2
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: Difficulty: Unknown
Test Case: 2122 Blocked By:
Blocking: Related Tickets:

Description

If I open the same file twice with openFile, then close both handles, and then use writeFile to overwrite the file, I get a locked file error.

I have attached a file which includes three test cases. One always fails, one always succeeds, and one sometimes fails when run multiple times, but only in GHCi.

Attachments

Test.hs Download (2.1 KB) - added by JeremyShaw 5 years ago.
a test case for causing an unexpected locked file error

Change History

Changed 5 years ago by JeremyShaw

a test case for causing an unexpected locked file error

Changed 5 years ago by simonmar

  • owner set to simonmar
  • difficulty set to Unknown

Nice report, thanks. I'm testing a fix now.

Changed 5 years ago by simonmar

  • owner changed from simonmar to igloo
  • type changed from bug to merge
  • component changed from libraries/base to Runtime System
  • milestone set to 6.8.3

Fixed. The only workaround is not to have the file open more than once.

Tue Feb 26 10:46:50 GMT 2008  Simon Marlow <simonmar@microsoft.com>
  * FIX #2122: file locking bug

Changed 5 years ago by JeremyShaw

Thanks, this seems to have fixed the problem we were seeing in our real code. It may have also helped with some space usage as well. No good data on that though.

Changed 5 years ago by igloo

  • status changed from new to closed
  • testcase set to 2122
  • resolution set to fixed

Merged

Note: See TracTickets for help on using tickets.