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

[help] ERR_WORKER_INVALID_PACKET error #7

Open
ggb88 opened this issue Sep 12, 2020 · 0 comments
Open

[help] ERR_WORKER_INVALID_PACKET error #7

ggb88 opened this issue Sep 12, 2020 · 0 comments

Comments

@ggb88
Copy link

ggb88 commented Sep 12, 2020

I'm running node.js app with bthreads 0.5.1 and spawning (in this case) 3 processes with the same source file using
require('bthreads/process');

....

    start() {
        this._worker = new threads.Worker(this._workerFilename, {
            workerData: this._workerData
        });

        this._worker.once('exit', (code) => {
            this.emit('done');
        });
    } 

These can be long running processes - after approx 10 mins of processing, the following error occurs:

Error [ERR_WORKER_INVALID_PACKET]: Received invalid packet (10).
    at Parser.parseHeader (/Users/.../node_modules/bthreads/lib/process/parser.js:138:13)
    at Parser.parse (/Users/.../node_modules/bthreads/lib/process/parser.js:103:23)
    at Parser.feed (/Users/.../node_modules/bthreads/lib/process/parser.js:50:12)
    at Socket.<anonymous> (/Users/.../node_modules/bthreads/lib/process/worker.js:355:22)
    at Socket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:182:23)

The only lead I have is that when I reduce the amount of console logging (to simulate prod ops) the problem has not recurred. That said, I'd rather try and find the issue rather than hope it doesn't occur in prod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant