Changes between Initial Version and Version 1 of Ticket #13945


Ignore:
Timestamp:
Jul 9, 2017 10:12:57 PM (2 years ago)
Author:
mpickering
Comment:

I updated the ticket as I think this will be a more general problem using 8.2.1 on any system where these restrictions exist. I can't properly diagnose the problem but geekosaur speculates an explanation which seemed plausible.

This also seems the same issue that Richard was having back in March. https://mail.haskell.org/pipermail/ghc-devs/2017-March/013915.html

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13945

    • Property Cc goldfire added
    • Property Summary changed from make install fails when registering packages to 'ghc-pkg update' fails due to bad file descriptor error
  • Ticket #13945 – Description

    initial v1  
    2121It might be something to do with the permissions I have on my machine but I used to be able to install ghc if I gave it a suitable prefix other than `/usr/local`.
    2222
    23 Here is the call stack from the crash if that's useful.
     23A workaround is to make sure that `HAVE_FLOCK` is not defined, the way I did this was commenting out the three relevant lines in libraries/base/configure.ac.
    2424
    25 {{{
    26 CallStack (from HasCallStack):
    27   die', called at libraries/Cabal/Cabal/Distribution/Simple/Program/Run.hs:142:7 in main:Distribution.Simple.Program.Run
    28   runProgramInvocation, called at libraries/Cabal/Cabal/Distribution/Simple/Program/HcPkg.hs:167:5 in main:Distribution.Simple.Program.HcPkg
    29   register, called at libraries/Cabal/Cabal/Distribution/Simple/GHC.hs:1709:5 in main:Distribution.Simple.GHC
    30   registerPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Register.hs:350:14 in main:Distribution.Simple.Register
    31   registerPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Register.hs:172:16 in main:Distribution.Simple.Register
    32   registerAll, called at libraries/Cabal/Cabal/Distribution/Simple/Register.hs:125:5 in main:Distribution.Simple.Register
    33   register, called at libraries/Cabal/Cabal/Distribution/Simple.hs:770:10 in main:Distribution.Simple
    34   defaultRegHook, called at libraries/Cabal/Cabal/Distribution/Simple.hs:584:20 in main:Distribution.Simple
    35   regHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:120:5 in main:Distribution.Simple.UserHooks
    36   regHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:120:5 in main:Distribution.Simple.UserHooks
    37   cmd_hook, called at libraries/Cabal/Cabal/Distribution/Simple.hs:452:38 in main:Distribution.Simple
    38   cmd_hook, called at libraries/Cabal/Cabal/Distribution/Simple.hs:469:4 in main:Distribution.Simple
    39   hookedActionWithArgs, called at libraries/Cabal/Cabal/Distribution/Simple.hs:451:5 in main:Distribution.Simple
    40   hookedAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:430:5 in main:Distribution.Simple
    41   registerAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:184:50 in main:Distribution.Simple
    42   defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:133:28 in main:Distribution.Simple
    43   defaultMainWithHooksArgs, called at utils/ghc-cabal/Main.hs:214:6 in main:Main
    44 }}}
     25geekosaur suggests on IRC that the problem might be
     26
     27> what might be possible is that hLock uses fcntl locking, ghc-pkg opens a database r/o if it can't open it > r/w, and it tried to acquire a write lock (which will fail with EBADF if the file descriptor is only open for > > read). and there is an SElinux context prohibiting your process opening the db for write