-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Client-side frontend leaks local source snapshots. #581
Labels
Comments
ijc
pushed a commit
to ijc/buildkit
that referenced
this issue
Aug 20, 2018
Tests such as TestNoSnapshotLeak were failing in client mode (e.g. using moby#522) because we weren't releasing the intermediate refs. Resolve this by refactoring the existing code which frees the intermediate refs from `gatewayFrontend.Solve` into a method on `llbBridgeForwarder` and as well as the original site also call from the solver when the top-level solve (in clientside frontend mode) completes. The original call (which is via a defer) could likely sensibly be moved either earlier or later if desired but leave it here it is to minimise the scope of the change. The previous code used the `retErr` named return but the code between that point and the end of the function already ensured that `lbf.err` is the same as `retErr`. Note that the `res` named return was previously unused by name. Fixes moby#581. Signed-off-by: Ian Campbell <ijc@docker.com>
ijc
pushed a commit
to ijc/buildkit
that referenced
this issue
Aug 20, 2018
Tests such as TestNoSnapshotLeak were failing in client mode (e.g. using moby#522) because we weren't releasing the intermediate refs. Resolve this by refactoring the existing code which frees the intermediate refs from `gatewayFrontend.Solve` into a method on `llbBridgeForwarder` and as well as the original site also call from the solver when the top-level solve (in clientside frontend mode) completes. The original call (which is via a defer) could likely sensibly be moved either earlier or later if desired but leave it here it is to minimise the scope of the change. The previous code used the `retErr` named return but the code between that point and the end of the function already ensured that `lbf.err` is the same as `retErr`, thus the only change in the code which has moved is `s/retErr/lbf.err/`. Note that the `res` named return was previously unused by name. Fixes moby#581. Signed-off-by: Ian Campbell <ijc@docker.com>
ijc
pushed a commit
to ijc/buildkit
that referenced
this issue
Aug 30, 2018
Tests such as TestNoSnapshotLeak were failing in client mode (e.g. using moby#522) because we weren't releasing the intermediate refs. Resolve this by refactoring the existing code which frees the intermediate refs from `gatewayFrontend.Solve` into a method on `llbBridgeForwarder` and as well as the original site also call from the solver when the top-level solve (in clientside frontend mode) completes. The original call (which is via a defer) could likely sensibly be moved either earlier or later if desired but leave it here it is to minimise the scope of the change. The previous code used the `retErr` named return but the code between that point and the end of the function already ensured that `lbf.err` is the same as `retErr`, thus the only change in the code which has moved is `s/retErr/lbf.err/`. Note that the `res` named return was previously unused by name. Fixes moby#581. Signed-off-by: Ian Campbell <ijc@docker.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I first noticed this with #552. With that PR it can be reproduced with:
The result includes:
A slightly easier reproducer is to use
examples/build-using-dockerfile
with--clientside-frontend
:And the resulting diff
I think the issue is the
Type: regular
. It should besource.local
I think (and there are others with that type in the list). Each run leaks another pair.I can repro with both oci and containerd worker. Without
--clientside-frontend
the is no leak.I'll investigate today, just filing since I'm away from Wednesday.
The text was updated successfully, but these errors were encountered: