[GHC] #13945: 'ghc-pkg update' fails due to bad file descriptor error
GHC
ghc-devs at haskell.org
Tue Aug 29 23:10:43 UTC 2017
#13945: 'ghc-pkg update' fails due to bad file descriptor error
---------------------------------+----------------------------------------
Reporter: mpickering | Owner: (none)
Type: bug | Status: patch
Priority: high | Milestone: 8.2.2
Component: Compiler | Version: 8.2.1-rc3
Resolution: | Keywords:
Operating System: Linux | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3897
Wiki Page: |
---------------------------------+----------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"f86de44dac0a6ca40c5fcd65f3a1944c45fa6011/ghc" f86de44/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="f86de44dac0a6ca40c5fcd65f3a1944c45fa6011"
ghc-pkg: Try opening lockfiles in read-write mode first
As pointed out in #13945, some filesystems only allow allow exclusive
locks if the fd being locked was opened for write access. This causes
ghc-pkg to fail as it first attempts to open and exclusively lock its
lockfile in read-only mode to accomodate package databases for which we
lack write permissions (e.g. global package databases).
Instead, we now try read-write mode first, falling back to read-only
mode if this fails.
Reviewers: austin
Subscribers: rwbarton, thomie
GHC Trac Issues: #13945
Differential Revision: https://phabricator.haskell.org/D3897
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13945#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list