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

buildImage() promises sometimes never resolve #553

Closed
gautaz opened this issue Jan 30, 2020 · 5 comments
Closed

buildImage() promises sometimes never resolve #553

gautaz opened this issue Jan 30, 2020 · 5 comments

Comments

@gautaz
Copy link

gautaz commented Jan 30, 2020

Hello,

I am currently hitting an issue where some image builds never finish.

While pinning down the issue, I have found that neither the end event nor the error event are emitted by the stream by instrumenting the dockerode source code, in particular these lines:

dockerode/lib/docker.js

Lines 310 to 315 in 15b6ed5

pack.on('error', function(error) {
return reject(error);
});
pack.on('end', function() {
return resolve(build(stream));
});

@neophob Looking at the github history, you have already dug into this, do you have any idea why this can happen or how I can diagnose this issue?

I wanted to provide a simple code example for this but the issue seems hard to reproduce depending on where the code is deployed (the original source code itself also runs in a Docker container but the issue can only be reproduced on particular hosts).

Even on hosts where the issue is reproduced, it happens randomly. All I can tell is that multiple successive or parallel builds are needed to reproduce the issue (I was first operating parallel builds but serializing them did not fix the issue).

@apocas
Copy link
Owner

apocas commented Feb 4, 2020

Possibly same as #538
Are you using followProgress?

@gautaz
Copy link
Author

gautaz commented Feb 5, 2020

@apocas Yes I am using followProgress and the build contexts for the images I'm building are just a few kilobytes so I am not sure this is related to #538.

For now I have found a work-around by adding a transform stream that just forwards the chunks between the tar-fs stream and the gzip stream...

@apocas
Copy link
Owner

apocas commented Feb 5, 2020

Wow thats indeed weird.

@stale
Copy link

stale bot commented Apr 25, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Open a new issue if needed.

@stale stale bot added the wontfix label Apr 25, 2021
@apocas apocas added stale and removed wontfix labels Apr 25, 2021
@stale stale bot removed the stale label Apr 25, 2021
@gautaz
Copy link
Author

gautaz commented Apr 21, 2024

Spring cleaning time!
There is no need to keep this issue anymore, feel free to reopen a new one if needed.

@gautaz gautaz closed this as completed Apr 21, 2024
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

2 participants