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

pg16-disk-test: add mkfifo #944

Merged
merged 2 commits into from
May 27, 2024
Merged

pg16-disk-test: add mkfifo #944

merged 2 commits into from
May 27, 2024

Conversation

Omrigan
Copy link
Contributor

@Omrigan Omrigan commented May 24, 2024

The virtio-serial interface can be opened only once.
Consider the following scenario:

  1. Process A starts writing to the serial device.
  2. Process A spawns a fork, Process B. It inherits the open file descriptor.
  3. Process A dies; Process B survives and preserves the file descriptor.
  4. Process A is restarted but cannot open the serial device again,
    causing it to crash-loop.

To fix it, we are creating FIFO special file, which supports multiple
writers, and spawning cat to redirect it to the virtio-serial.

Part of the #939.

@Omrigan Omrigan requested a review from sharnoff May 24, 2024 11:45
The virtio-serial interface can be opened only once.
Consider the following scenario:

1. Process A starts writing to the serial device.
2. Process A spawns a fork, Process B. It inherits the open file descriptor.
3. Process A dies; Process B survives and preserves the file descriptor.
4. Process A is restarted but cannot open the serial device again,
   causing it to crash-loop.

To fix it, we are creating FIFO special file, which supports multiple
writers, and spawning cat to redirect it to the virtio-serial.

Signed-off-by: Oleg Vasilev <[email protected]>
Copy link
Member

@sharnoff sharnoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's update branch to get the codespell fix, otherwise lgtm, as long as you've tested locally (as a follow-up, it'd be nice to check in CI that log forwarding works as expected).

Also, keep in mind that setting this in neondatabase/neon may not be so simple, because the control plane specifies the redirection.

@Omrigan Omrigan merged commit 99f6f05 into main May 27, 2024
15 checks passed
@Omrigan Omrigan deleted the oleg/mkfifo branch May 27, 2024 10:27
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

Successfully merging this pull request may close these issues.

2 participants