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
Docker build takes 100% of persistent memory #43133
Comments
It looks like useradd is doing something bad here. |
Actually the build process (command at point #1.2) never ends. Process stays active until HDD becomes full then process fails with a EOF specific error. Note that I'm able to create such an user on debian host machine, into an existing docker image and even into an existing docker container without any issues. The up mentioned issue is valid only during docker build. I've just reproduced this issue on a personal set of jenkins agents by DoS attacking them all and it succeed. All jenkins agents tried to build such a Dockerfile and all of them became broken in few hours (as HDD is filled slow but constantly). |
Did some additional investigations and latest conclusion from my side is that something wrong (like overflow error/exception) happens at overlay level so at the end something is recursively created again and again until entire /var partition is considered then process fails because of memory starvation case. On my side I was able to fill 500 GB in up to 2 hours even after killing the |
I think this is a duplicate of #5419, which describes what's causing this, and some workarounds |
Agree. This issue fully duplicates the mentioned one. Will put an eye on that one. Thanks for linking them. |
Building a Dockerfile when creating an UNIX user with large uid takes entire HDD space until it crashes
Steps to reproduce the issue:
-- ATTENTION: Do not run it on a production/personal/non-test-scoped-machine as it breaks things!
1.1. Consider this Dockerfile content
1.2. Run this command:
docker build .
Describe the results you received:
2.1. Monitor how your HDD is getting filled until it reaches 100%
2.2. Also you have to see a new created partition (by running
df -lh
for example) like this one:overlay 448G 82G 344G 20% /var/lib/docker/overlay2/70b3095035cbfd9382bf65976727fe1894d7f53d200c4c0335240d3026e80213/merged
2.3. By trying to cancel/kill the process started at step #1.2 you will not stop the thing happening at step #2.1 - HDD is still filled with some data, continuously
2.4. The only way to stop it is to stop/restart/kill docker daemon process
Describe the results you expected:
I would expect a different result like a successfully (or not) created docker image but definitely not loosing entire HDD memory.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: