JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
619 stars 260 forks source link

Libgit2 has problems cloning on NFS mounts #1247

Open sbromberger opened 5 years ago

sbromberger commented 5 years ago

Using dev when home directory is an NFS mount results in the following error:

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.2.0-rc1.0 (2019-05-30)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(v1.2) pkg> dev LightGraphs
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
┌ Warning: Some registries failed to update:
│     — /nfs/auto/home/seth/.julia/registries/General — failed to fetch from repo
└ @ Pkg.Types /buildworker/worker/package_linuxarmv7l/build/usr/share/julia/stdlib/v1.2/Pkg/src/Types.jl:1171
   Cloning git-repo `https://github.com/JuliaGraphs/LightGraphs.jl.git`
ERROR: failed to clone from https://github.com/JuliaGraphs/LightGraphs.jl.git, error: GitError(Code:ERROR, Class:OS, failed to truncate pack file '/nfs/auto/home/seth/.julia/clones/2040551779_full/.git/objects/pack/pack_git2_mBsfFV': Permission denied)

I have r/w permissions for /nfs/auto/home/seth and have confirmed there is no concurrent access occurring. Not sure how to go about troubleshooting this but it's reproducible here so please let me know what other information I can provide.

julia> versioninfo()
Julia Version 1.2.0-rc1.0
Commit 7097799cf1 (2019-05-30 02:22 UTC)
Platform Info:
  OS: Linux (arm-linux-gnueabihf)
  CPU: ARMv7 Processor rev 3 (v7l)
  WORD_SIZE: 32
  LIBM: libm
  LLVM: libLLVM-6.0.1 (ORCJIT, cortex-a72)
sbromberger commented 5 years ago

ref: https://github.com/rust-lang/cargo/issues/6652

DilumAluthge commented 5 years ago

Is this only happening on NFS mounts?

sbromberger commented 5 years ago

as far as I can tell. I can't reproduce it with a user that is using a local fs.

thomasjm commented 5 years ago

I'm seeing this as well, using NFS in a different context: in a Kubernetes pod that has a mounted volume provisioned by the AWS EFS provisioner. Seems to be the same problem since EFS uses the NFS protocol.

There's a longstanding issue in libgit2 that might be the root cause: https://github.com/libgit2/git2go/issues/194. Seems like certain filesystems behave slightly differently and cause problems like this.

pfitzseb commented 3 years ago

Did anyone give the suggested patch a go?