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

repack: pipe errors don't propagate #33

Closed
cyphar opened this issue Nov 20, 2016 · 1 comment
Closed

repack: pipe errors don't propagate #33

cyphar opened this issue Nov 20, 2016 · 1 comment

Comments

@cyphar
Copy link
Member

cyphar commented Nov 20, 2016

In layer.GenerateLayer we use CloseWithError to try to propagate layer generation errors to the reader. However, it looks like the errors are dropped at some point (or the pipe is already closed when we error out). This causes us to generate new invalid layers when we should be erroring out.

This is a critical issue and must be solved before 0.0.0.

@cyphar
Copy link
Member Author

cyphar commented Nov 20, 2016

This is somewhat of an upstream issue and is caused by golang/go#17992.

@cyphar cyphar closed this as completed in 5c1e562 Nov 20, 2016
cyphar referenced this issue Nov 20, 2016
It turns out that .Close() will reset the error set by .CloseWithError()
which means that using defer will always cause errors to not be
propagated properly. To fix this, only call .Close* once (though this is
probably a Golang lib bug).

Fixes: cyphar/umoci#33
Reference: golang/go#17992
Signed-off-by: Aleksa Sarai <[email protected]>
cyphar referenced this issue Nov 21, 2016
This is mainly to make sure there are no regressions in cyphar/umoci#33.

Signed-off-by: Aleksa Sarai <[email protected]>
cyphar referenced this issue Nov 21, 2016
This is mainly to make sure there are no regressions in cyphar/umoci#33.

Signed-off-by: Aleksa Sarai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant