Invoking jrm with a glob with many files, e.g. jrm ./build/bazel-out/combined-junit.xml "build/bazel-out/*/testlogs/**/test.xml", fails with an error like this:
node:events:492
throw er; // Unhandled 'error' event
^
Error: EMFILE: too many open files, open './build/bazel-out/combined-junit.xml'
Emitted 'error' event on WriteStream instance at:
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -24,
code: 'EMFILE',
syscall: 'open',
path: './build/bazel-out/combined-junit.xml'
}
Node.js v20.9.0
🚨 Error: The command exited with status 1
ulimit -n reports 1024, so I suspect this is occurring because we have > 1024 files returned by the test.xml glob and jrm is not limiting its use of file descriptors in this situation.
Invoking
jrm
with a glob with many files, e.g.jrm ./build/bazel-out/combined-junit.xml "build/bazel-out/*/testlogs/**/test.xml"
, fails with an error like this:ulimit -n
reports1024
, so I suspect this is occurring because we have > 1024 files returned by thetest.xml
glob andjrm
is not limiting its use of file descriptors in this situation.