Skip to content

fdLock invalid argument on WSL1 #7528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gmtcrary opened this issue Aug 11, 2021 · 2 comments
Closed

fdLock invalid argument on WSL1 #7528

gmtcrary opened this issue Aug 11, 2021 · 2 comments

Comments

@gmtcrary
Copy link

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.

@Mikolaj
Copy link
Member

Mikolaj commented Aug 11, 2021

Hi @adpextwindong! Thank you for the report. Yes, I've heard people having similar problems with cabal on WSL1, but no problem with WSL2. Please let us know if that's the case for you, as well.

@phadej
Copy link
Collaborator

phadej commented Aug 12, 2021

This is duplicate of #6551

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants