golang / dep

Go dependency management tool experiment (deprecated)
https://golang.github.io/dep/
BSD 3-Clause "New" or "Revised" License
12.87k stars 1.05k forks source link

Dep ensure creates thousands of lock files running out of file handles #2232

Closed KpaBap closed 3 years ago

KpaBap commented 4 years ago

What version of dep are you using (dep version)?

dep: version : v0.5.4 build date : 2019-07-01 git hash : 1f7c19e go version : go1.12.6 go compiler : gc platform : linux/amd64 features : ImportDuringSolve=false

What dep command did you run?

dep ensure

What did you expect to see?

dep to resolve dependencies and bring them in

What did you see instead?

waiting for lockfile /home/kpabap/work/src/golang/pkg/dep/sm.lock: open /home/kpabap/work/src/golang/pkg/dep/sm.lock: too many open files unable to lock /home/kpabap/work/src/golang/pkg/dep/sm.lock: open /home/kpabap/work/src/golang/pkg/dep/sm.lock: too many open files

I progressively raised ulimits from 1024 to 18k but each time dep just seems to consume open files up to the limit. Looking in the pkg/dep folder I can see 18k lock files created while dep ensure runs.

This appears to happen if the source code folder is mounted over SMB/cifs. Running the same thing on the same folder copied locally does not reproduce this issue.

byron70 commented 4 years ago

I have a very similar scenario, running docker on windows. When I spin up a container to run dep ensure and mount my windows GOPATH in the container as the linux container GOPATH.

I've had success preventing the multiple lock files in $GOPATH/pkg/dep by setting DEPNOLOCK=1

mvdan commented 3 years ago

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!