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
Can't stack more than 42 aufs layers #1171
Comments
Could you start the deamon in debug mode (with Thanks. |
As soon as I'm able to reproduce it I'll post (next broken image) Thank you ! |
Nothing special in this output, aufs module is always loaded, the error is not there event if docker tries to modprobe again the driver. As I said before with another image it's working. I'm using Ubuntu 12.04 LTS with PPA docker repository. |
/cc @jpetazzo |
I don't see any useful clue here, unfortunately! |
Ok next case I'll export the container if that's possible ! (Maybe the same error will occure) |
Broken Image :
Working Image :
What is the best way to export the image ? Thank you ! |
I'm tarring and uploading /var/lib/docker/graph/[IMAGE_ID] will you be able to do something with that ? |
In fact this is the at least the 20th layers. (Each parent has a parent on more than 20 levels) Is their a limitation with AUFS on the number of layers we can mount ? (Because the command which fails is directly |
@Soulou no, because the parents arent' there. could you |
@Soulou yes there is a limit in the number of aufs layers, I think it's 42 (at least in the default build on ubuntu kernels). On Mon, Jul 22, 2013 at 8:32 AM, Victor Vieux notifications@github.com
|
I'm getting this also, 38 RUN commands plus one EXPOSE above the base image, on Ubuntu 13.0.4. Could it have something to do with the
If it isn't feasible to increase aufs's maximum depth, implementing #332 would help a lot, especially if we could put some kind of FLATTEN command in dockerfiles. One stopgap solution would be to let us group several shell commands into a single RUN command, so that we can decrease the number of layers we create without sacrificing too much readability:
|
When you get the "Unable to mount using aufs" error, do you get something On Mon, Jul 22, 2013 at 10:50 PM, Anand Patil notifications@github.comwrote:
|
From the Docker daemon:
This is with revision a93a87f. Haven't found anything in the kernel logs. |
I can reproduce the problem by putting
in a dockerfile, and doing |
@apatil there's a limit to how many AUFS layers can be created. I believe it's 42. |
Should we have an error message that is returned before doing docker build or when the maximum is reached? |
I'm having the same problem on Ubuntu 12.04 LTS with PPA docker repository. |
Reproduced. Gist with sample Dockerfile and build output: |
This is weird, once you reached the limit (use the Dockerfile fom @metalivedev) |
Same problem here, also. I understand why creating an image per step in the Dockerfile helps, noticeably while growing / debugging an image. Maybe either a flag passed to the command line to prevent the commit of intermediate images. Or directives inside the Dockerfile. (the former seems more interesting since you won't have to change the Dockerfile everytime you want to rewrite on it - and just before you want to create the final production image - ) |
@laurentpetit I believe #332 is the answer for that. |
@fsouza It's answer proposal which would solve the same problem, but not the same proposal :-). I like it also, but am not seeing it make progress :-/ |
I had the same problem
Merging a few RUN commands, and the container starts normally. |
Hey Guys - We're experiencing the same problem with some images. We do not believe we have a layer issue (is there a way to check)? In our kernel logs, we see this error |
so docker history shows that we are hitting the limit :( |
Yash, currently the only way to "squashing" the image is to create a There are 2 things we can do to improve the situation:
On Mon, Aug 19, 2013 at 9:00 PM, Yash Kumar notifications@github.comwrote:
|
Thanks solomon. We're also playing around with aubrsync to copy down branches. Do you not recommend this approach? We're expecting our commit history to get 100-150 layers long. |
This is related to issue #332. On Mon, Aug 19, 2013 at 9:24 PM, Yash Kumar notifications@github.comwrote:
|
@lox can you post the output of |
|
A testcase to reproduce: https://gist.github.com/dhotson/8883c2e8ebf79ce95115 |
After some testing, this appears to specifically affect the kernel used in EC2, can't reproduce the issue elsewhere, but on |
Possibly also related to? #4338 We'll do some testing on whether it's related to having docker's layers stored in |
I seem to remember this being hard coded at 42 due to some AUFS limitations but after searching the code a tad now I’m not as sure. On Sep 16, 2014, at 8:16 PM, Lachlan Donald notifications@github.com wrote:
|
Its 127 now
|
Strangely, the problem occurs with docker mounted on |
Fixes moby#1171 Fixes moby#6465 Data passed to mount(2) is clipped to PAGE_SIZE if its bigger. Previous implementation checked if error was returned and then started to append layers one by one. But if the PAGE_SIZE clipping appeared in between the paths, in the permission sections or in xino definition the call would not error and remaining layers would just be skipped(or some other unknown situation). This also optimizes system calls as it tries to mount as much as possible with the first mount. Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Fixes moby#1171 Fixes moby#6465 Data passed to mount(2) is clipped to PAGE_SIZE if its bigger. Previous implementation checked if error was returned and then started to append layers one by one. But if the PAGE_SIZE clipping appeared in between the paths, in the permission sections or in xino definition the call would not error and remaining layers would just be skipped(or some other unknown situation). This also optimizes system calls as it tries to mount as much as possible with the first mount. Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
I can reproduce this on 1.10.3 . Any reason why this is closed? |
@agherzan If you are reproducing a 42-layer issue, then most likely it's due to how your aufs kernel module is compiled. What's your setup? |
Are you referring to the max branch config of aufs? @cpuguy83 EDIT: I run docker 1.10.3 on an armv7 board, aufs, linux 4.1.15, 42 layers |
@agherzan Yes. |
@cpuguy83 I have 127
|
Just for reference I will tell here what happened in my case for people to benefit from it. I was using golang 1.6 which hardcodes the page size of arm64 to 64. This made docker generate aufs mount commands that would make options not fit in 4K. In my case the kernel is configured without 64K page size support so mount command would return invalid argument due to string truncation as it uses a page size as maximum option size. There are some patches in master (of golang) which removes this static behaviour and detects the pagesize at runtime. (https://go-review.googlesource.com/#/c/25021/) Backporting these fixed my problem. |
@agherzan Thanks for the report! |
Edited to clarify @cpuguy83 . Typo. |
Thanks again! |
Hello, thanks for this fabulous project
I'm encountering quite often an issue that I associate to broken images. In fact sometimes when I create a container, I'm getting the following error :
However AUFS is working fine, using base image is just ok. The only way to use that image is to remove it and rebuild it again. What can be the causes of this image corruption ?
Thank you.
However, aufs is completely working
The text was updated successfully, but these errors were encountered: