photostructure / exiftool-vendored.js

Fast, cross-platform Node.js access to ExifTool
https://photostructure.github.io/exiftool-vendored.js/
MIT License
405 stars 37 forks source link

Random error when doing Write #135

Closed pleezzz closed 1 year ago

pleezzz commented 1 year ago

Describe the bug I have experienced a weird random error after upgrading the library from 15.6.0 to 19.0.0, saying

"Error: end() called before task completed ({"gracefully":false,"lastTask":{"command":"-sep\n\u001f\n-E\n-OriginalTransmissionReference=123\n-TransmissionReference=456\n-ImageSupplierName=ABC\n/tmp/tmp-24-QABEzr6MKdsr\n-ignoreMinorErrors\n-execute\n","taskId":2,"args":["-sep","\u001f","-E","-OriginalTransmissionReference=123","-TransmissionReference=456","-ImageSupplierName=ABC","/tmp/tmp-24-QABEzr6MKdsr"],"errors":[],"sourceFile":"/tmp/tmp-24-QABEzr6MKdsr"}})
at BatchProcess._BatchProcess_end (/app/node_modules/batch-cluster/dist/BatchProcess.js:373:29)
at async observe (/app/node_modules/batch-cluster/dist/Deferred.js:108:19)"

one weird thing is that, after this error, the consecutive write is still success with the same argument to different photos

To Reproduce Currently I dont have any idea how to reproduce it, happened quite randomly, would like to find some clues here

Environment (please complete the following information): node:16-alpine3.13

mceachen commented 1 year ago

The batch-cluster library supported "recycling" child processes after a certain number of uses, and those construction parameters are exposed in this library. You could try disabling process recycling by setting that parameter to zero, perhaps?

(It's there to work around memory leaks in long-lived exiftool/perl processes. It very well could be the case that you don't need that feature).

If you find a way to reproduce this issue on demand, please comment here and I'll reopen this and dig into it.