Skip to content

Hang up with 'advanced' IPC deserialization #55834

Closed
@MGorkov

Description

@MGorkov

Version

20.12.2

Platform

RHEL 8.4

Subsystem

child_process

What steps will reproduce the bug?

I start a child process using fork() and { serialization: 'advanced' }. Then transfer messages between the child and the parent process.
Sometimes the transfer hangs at the receiving side.

How often does it reproduce? Is there a required condition?

Rarely, after several hours of high rate messaging

What is the expected behavior? Why is that the expected behavior?

Transmitting messages without hangups

What do you see instead?

The queue (kMessageBuffer) on the receiving side is constantly growing without processing.
The length of the first buffer in the kMessageBuffer is less than 4 bytes, so new messages are not processed and are only added to the end of queue.
image

Additional information

I suppose that this PR led to this behavior.
Instead of concatenating the queue and then checking the length, only the first buffer is checked.
This does not take into account that the first buffer may be smaller than 4 bytes after processing the previous message (code)
If the first buffer is less than 4 bytes, it must be concat with with the next one, if there is one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoIssues without a valid reproduction.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions