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

OOM opening a docker file containing ENV with default value #3312

Closed
rickardgranberg opened this issue Nov 12, 2021 · 6 comments
Closed

OOM opening a docker file containing ENV with default value #3312

rickardgranberg opened this issue Nov 12, 2021 · 6 comments

Comments

@rickardgranberg
Copy link

rickardgranberg commented Nov 12, 2021

Unrelated to any updates, I started having issues with Dockerfiles containing env statements with default values:

ENV VARIABLE=${VARIABLE:-"default"}

If I open a Dockerfile with this statement in it, VSCode starts to use CPU (some) and consume memory (a lot) until VSCode either pops up the dialog that the window has become unresponsive (which it is) or a dialog stating "oom code: -536870904"
If I disable the Docker extension, everything is fine. I've also disabled all other extensions just to be sure.

I tested this on a different computer (same version of VSCode and extension) and it works fine there, so it's specific to my machine. Also did my due diligence and rebooted my machine but the problem persists.

OS: Windows 10
VSCode Version: 1.62.2
Docker Extension Version: 1.17.0

Not sure what to do, is there any type of debugging I can enable?

@bwateratmsft
Copy link
Collaborator

bwateratmsft commented Nov 12, 2021

@rcjsuen maybe an infinite loop issue like #3268?

@rcjsuen
Copy link
Contributor

rcjsuen commented Nov 15, 2021

Unrelated to any updates, I started having issues with Dockerfiles containing env statements with default values:

ENV VARIABLE=${VARIABLE:-"default"}

If I open a Dockerfile with this statement in it

@rickardgranberg So just opening the file is bad but then closing it brings the memory back down? Can you reproduce this with a Dockerfile with just that single line?

@rickardgranberg
Copy link
Author

Unrelated to any updates, I started having issues with Dockerfiles containing env statements with default values:
ENV VARIABLE=${VARIABLE:-"default"}
If I open a Dockerfile with this statement in it

@rickardgranberg So just opening the file is bad but then closing it brings the memory back down? Can you reproduce this with a Dockerfile with just that single line?

Yes, just opening it is bad. Usually there's not enough time to close the file before the UI becomes unresponsive so I cannot really give an answer if the memory usage goes back down. I've succeeded in closing the file if I launch a new instance of VSCode and then it's fine. I'm assuming I succeed because I close the file before the extension is activated.

And yes, all I need is a Dockerfile with that line. I suspected something related to recursion, so I tested something like ENV VARIABLE=${OTHERVAR:-"default"} but the result is the same

@rcjsuen
Copy link
Contributor

rcjsuen commented Nov 16, 2021

@rickardgranberg I haven't been able to reproduce this but I'm also on a Mac and I see that you are on Windows.

Can you try updating to the latest version of the extension? There is a 1.18.0 out now.

@rickardgranberg
Copy link
Author

With version 1.18.0, I no longer experience the problem. Closing this issue.

@rcjsuen
Copy link
Contributor

rcjsuen commented Nov 17, 2021

With version 1.18.0, I no longer experience the problem. Closing this issue.

@rickardgranberg Thanks for testing it out! Have a nice day! 👍

@microsoft microsoft locked and limited conversation to collaborators Jan 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants