Closed
Description
Cabal v1-build under WSL1 causes an fdLock invalid argument error.
fdLock: invalid argument (Invalid argument)
To Reproduce
Running cabal v1-build
under Hackage-server's Nix-shell (commit 9e451cb) on a WSL1 Ubuntu 20.04 system.
$ cabal v1-build
System information
cabal-install version 3.4.0.0
compiled using version 3.4.0.0 of the Cabal library
Glasgow Haskell Compilation System, version 8.10.4
WSL1 Ubuntu 20.04
Nix-shell from hackage-server commit 9e451cb off the master branch
A partial strace log leading up to the fdlock:
read(13, "", 32752) = 0
close(13) = 0
unlink("/home/takumi/.cabal/packages/hackage.haskell.org/timestamp.json") = -1 ENOENT (No such file or directory)
futex(0x7f1640000be8, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7f1640000bf0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x1722e38, FUTEX_WAKE_PRIVATE, 1) = 1
openat(AT_FDCWD, "/home/takumi/.cabal/packages/hackage.haskell.org/hackage-security-lock", O_RDWR|O_CREAT, 0666) = 13fcntl(13, F_OFD_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = -1 EINVAL (Invalid argument)
close(13) = 0
poll([{fd=2, events=POLLOUT}], 1, 0) = 1 ([{fd=2, revents=POLLOUT}])
write(2, "fdLock: invalid argument (Invali"..., 44fdLock: invalid argument (Invalid argument)
) = 44
I'm not sure which WSL version is favored by Cabal so I will be testing WSL2 as well.