opam icon indicating copy to clipboard operation
opam copied to clipboard

`opam admin` fails on NFS directory due to lockf missing

Open mattam82 opened this issue 6 years ago • 3 comments

We're building Coq's opam index and repository files on an NFS mounted filesystem, and these days opam admin check/make both fail with:

Fatal error:
opam2: "lockf" failed: No locks available

Can the use of locks be avoided?

mattam82 avatar May 29 '19 18:05 mattam82

It's suspicious indeed, opam admin is not supposed to require locks, and should even be read-only in the case of check. Could you precise:

  • your opam version (opam config report) ?
  • a stacktrace, if you can get one (OCAMLRUNPARAM=b opam admin check)

Thanks!

AltGr avatar Jun 03 '19 08:06 AltGr

Closing this, just as it's two years old with no feedback. Please feel free to re-open if it's still an issue!

dra27 avatar Jul 13 '21 15:07 dra27

Hello, I had the exact same error on machines with the .opam served by an nfs. This prevented me from executing opam env, and thus get the PATH correctly setup. The backtrace leads to this line: https://github.com/ocaml/opam/blob/fee5861395d6a575c16a7b403012823829946c88/src/format/opamFile.ml#L118.

The reason of this error is that I was using nfsv3, which does not support file locking. Upgrading to nfsv4.2 was enough to get everything working.

jboillot avatar Mar 13 '24 14:03 jboillot