Open mcollina opened 5 years ago
@mcollina Any update on this? i am trying to use clinic.js on a Node.js application using Piscina (so worker_threads) but whe i enter CTRL+C i receive your same error.
@mcollina Any update on this? i am trying to use clinic.js on a Node.js application using Piscina (so worker_threads) but whe i enter CTRL+C i receive your same error.
Unfortunately, I have the same issue. As soon as I added piscina and workers_threads, the exception occurs when closing the server execution analyzed by doctor.
if (!found0 || !found1 || !found2 || !found3 || !found4) throw new Error("Decoded message is not valid")
^
Error: Decoded message is not valid
at Object.decode (eval at line.toFunction (/Users/fherrero/Library/Application Support/fnm/node-versions/v20.14.0/installation/lib/node_modules/clinic/node_modules/generate-function/index.js:172:21), <anonymous>:23:70)
at ProcessStatDecoder._transform (/Users/fherrero/Library/Application Support/fnm/node-versions/v20.14.0/installation/lib/node_modules/clinic/node_modules/@clinic/doctor/format/abstract-decoder.js:42:31)
at Transform._write (node:internal/streams/transform:171:8)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)
at Writable.write (node:internal/streams/writable:502:10)
at ReadStream.ondata (node:internal/streams/readable:1007:22)
at ReadStream.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
@franher please sse the note in README https://github.com/clinicjs/node-clinic?tab=readme-ov-file#clinicjs
I'm getting a:
on a huge profile.
I think this might be due to truncation.
Overall we should try not to crash in these situation, but display a warning and try to continue.