-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
gitlab CI (bullseye-slim) - Error: end() called before task completed #168
Comments
|
Thanks for the detailed reply @mceachen I knew I should have taken more time to strip down the example, sorry. Here is a stripped down repro. Doesn't seem that node16 is the issue as 18 fails with same error...
Old project that is not actively developed. But that doesn't seem to be the issue here as 18 has the same issue.
If it turns out this is a missing perl or whatever issue, that information isn't getting surfaced. Maybe that isn't it.
Sure. Repro above stripping out copy and mkdir stuff to show that isn't related to the problem (it was synchronous mkdirp under the hood FWIW)
Fair enough. In a parallelized build there are a lot of places the node process can crash. I just wanted to make sure we weren't ending up with zombie processes due to build crashes where To be clear, I wasn't implying you would handle other codes' exceptions or prevent node from crashing...just that you would detect node is crashing and do some cleanup to avoid zombie processes if batchcluster isn't doing that itself already.
Thanks. Could be. I'll open a separate issue if I continue to notice zombie processes after build crashes. |
I pulled your repo and tried to reproduce locally:
If you change your exiftool = new ExifTool({ taskTimeoutMillis: 5000, logger: () => require("batch-cluster").ConsoleLogger }), You'll see the following output:
Turns out that Node's It's even easier to validate by hand: $ docker run -v.:/code -it node:18-bullseye-slim bash
root@5c5130e1a33d:/# cd /code
root@5c5130e1a33d:/code# node_modules/exiftool-vendored.pl/bin/exiftool -Creator= /code/src/files/dummy.pdf
Can't locate mro.pm in @INC (you may need to install the mro module) (@INC contains: node_modules/exiftool-vendored.pl/bin/lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at /usr/lib/x86_64-linux-gnu/perl-base/overload.pm line 123. I'll update the docs and error handling to detect this and throw this as an error in the future. |
Thanks for taking another look at this. No problem to add missing deps to the slim image during the build. Very helpful to have the underlying issue surfaced of course. I also appreciate the debugging tip about adding the logger. Thanks for the fix! |
Getting an error on gitlab CI using docker image
node:16-bullseye-slim
which I can't reproduce locally (on macos).exiftool-vendored
version24.3.0
.some.pdf
in the error below is generally the FIRST pdf to be processed in the build job...so I suspect the error message is just a red herring and there is rather some environmental problem (missing dep, perl, etc that isn't installed with withnpm ci
).So I guess this is more question than bug report... any recommendations on how to troubleshoot underlying issues with the
batch-cluster
so I have a more useful error message?Build job
gitlab CI error
aside: I also noticed locally (macos) that after a build crash there is a zombie perl process running exiftool that is never cleaned up. I've added my own SIG/process cleanup try and prevent this from happening in the future, but would be nice if maybe exiftool-vendored handled this internally using a
process.on('uncaughtException',...
orprocess.on('exit',...
to try and kill off any batch-cluster stuff.The text was updated successfully, but these errors were encountered: