Skip to content
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

x/tools/gopls: creates many /tmp/go-build* directories #41331

Open
OneOfOne opened this issue Sep 11, 2020 · 7 comments
Open

x/tools/gopls: creates many /tmp/go-build* directories #41331

OneOfOne opened this issue Sep 11, 2020 · 7 comments
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.

Comments

@OneOfOne
Copy link
Contributor

This is a dup of #37368, it was never fixed for me, I still end up with a few (mostly empty) /tmp/go-build* folders.

I can reproduce with current release, master and my ghetto rebased master on top of dev.go2go.

$ ls /tmp/go-build* | wc -l
2874
$ find /tmp/go-build* -type f | wc -l
261
$ ● find /tmp/go-build* -type f | tail -n 6
/tmp/go-build969177635/b001/exe/a.out
/tmp/go-build969177635/b001/importcfg.link
/tmp/go-build992265488/b001/exe/a.out
/tmp/go-build992265488/b001/importcfg.link
/tmp/go-build996176431/b001/exe/a.out
/tmp/go-build996176431/b001/importcfg.link
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Sep 11, 2020
@gopherbot gopherbot added this to the Unreleased milestone Sep 11, 2020
@OneOfOne
Copy link
Contributor Author

@stamblerre @hyangah

@stamblerre
Copy link
Contributor

/cc @heschik

@stamblerre stamblerre removed this from the Unreleased milestone Sep 11, 2020
@stamblerre stamblerre added this to the gopls/unplanned milestone Oct 21, 2020
@OneOfOne
Copy link
Contributor Author

This is still an issue, both latest release and latest master.

● ls /tmp/ | grep go-b
go-build1081835929/
go-build2583266889/
go-build293315992/
go-build3386006498/

@heschi
Copy link
Contributor

heschi commented Mar 16, 2021

I think I had at some point suspected that this was a bug in the go command: it needs to call base.Exit for https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/work/action.go;l=273-293 to fire, and it's not totally obvious to me that it does on all code paths. But I'm not sure. I don't know how to investigate this further offhand.

I guess I can just crank the current 1-second delay up and hope that it's a timing problem.

@bcmills @jayconrod @matloob

@OneOfOne
Copy link
Contributor Author

❯ ls /tmp/ | grep go
go-build101694532/
go-build1285297711/
go-build161651095/
go-build2269050694/
go-build350919396/
go-build3747762176/
go-build447607287/
go-build638421048/
gopls-1435512.1/
gopls-1837144.1/
gopls-1913223.1/
gopls-2013061.1/
gopls-2017375.1/
gopls-2165234.1/
gopls-2187450.1/
gopls-2188351.1/
vscode-go4hQyjh/
go.049a684e4ab2ba2c4b7e59e76e2dbc2c4b8cb1b66dab78cc96925018108d750b.2776018223.mod
go.049a684e4ab2ba2c4b7e59e76e2dbc2c4b8cb1b66dab78cc96925018108d750b.3320824545.mod
go.049a684e4ab2ba2c4b7e59e76e2dbc2c4b8cb1b66dab78cc96925018108d750b.4069772916.mod
go.04e38ae1791965ced00378dd68f73bbb2a2d18f28b513ddfab42bae02b6411ca.3207838501.mod
go.04e38ae1791965ced00378dd68f73bbb2a2d18f28b513ddfab42bae02b6411ca.3207838501.sum*
gocode.vsix
go.e26d71d1081531b94be31235a5f4069319715213391d0b0dc13a3ad7fdd35549.1143449637.mod
go.e26d71d1081531b94be31235a5f4069319715213391d0b0dc13a3ad7fdd35549.1143449637.sum*
go.e26d71d1081531b94be31235a5f4069319715213391d0b0dc13a3ad7fdd35549.3404522945.mod
go.e26d71d1081531b94be31235a5f4069319715213391d0b0dc13a3ad7fdd35549.3404522945.sum*
go.e26d71d1081531b94be31235a5f4069319715213391d0b0dc13a3ad7fdd35549.880138469.mod
go.e26d71d1081531b94be31235a5f4069319715213391d0b0dc13a3ad7fdd35549.880138469.sum*
gopls.1435512-1GiB-nonames.zip
gopls.1435512-1GiB-withnames.zip
gopls.1435512-2GiB-nonames.zip
gopls.1435512-2GiB-withnames.zip
gopls.1435512-3GiB-nonames.zip
gopls.1435512-3GiB-withnames.zip
gopls.1435512-4GiB-nonames.zip
gopls.1435512-4GiB-withnames.zip
gopls.2017375-1GiB-nonames.zip
gopls.2017375-1GiB-withnames.zip
gopls.2017375-2GiB-nonames.zip
gopls.2017375-2GiB-withnames.zip
gopls.2017375-3GiB-nonames.zip
gopls.2017375-3GiB-withnames.zip
gopls.2187450-1GiB-nonames.zip
gopls.2187450-1GiB-withnames.zip
gopls.2187450-2GiB-nonames.zip
gopls.2187450-2GiB-withnames.zip
gopls.2187450-3GiB-nonames.zip
gopls.2187450-3GiB-withnames.zip
gopls.2187450-4GiB-nonames.zip
gopls.2187450-4GiB-withnames.zip
gopls.755629-1GiB-nonames.zip
gopls.755629-1GiB-withnames.zip
gopls.755629-2GiB-nonames.zip
gopls.755629-2GiB-withnames.zip
gopls.755629-3GiB-nonames.zip
gopls.755629-3GiB-withnames.zip

Still an issue.

@olivatooo
Copy link

Still a big issue, when working with big libraries this eats the entire ram

@adonovan
Copy link
Member

Still a big issue, when working with big libraries this eats the entire ram

Next time it happens, could you run du -sh /tmp/gopls.* and compare with du -sh /tmp/go-build*? I suspect that the gopls files are rather larger, and I just mailed https://go.dev/cl/496191 to eliminate them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

6 participants