Skip to content

Copy received RPC frames to avoid a shared file offset race - #546

Merged
hadfl merged 2 commits into
omniosorg:masterfrom
citrus-it:pipe
Aug 21, 2026
Merged

Copy received RPC frames to avoid a shared file offset race#546
hadfl merged 2 commits into
omniosorg:masterfrom
citrus-it:pipe

Conversation

@citrus-it

Copy link
Copy Markdown
Member

No description provided.

@citrus-it
citrus-it marked this pull request as draft August 21, 2026 17:11
Linked image operations are carried out in child images by 'pkg
remote' subprocesses, with requests and responses exchanged over a
pipe by the transport in pkg.pipeutils. Each message is written to
an unlinked temporary file whose descriptor is passed through the
pipe with I_SENDFD; the receiver rewinds the descriptor and reads
the message back. There is a race between the descriptor being used
in the child and being closed in the parent. Fix that by copying
the frame with positional reads.
@citrus-it
citrus-it marked this pull request as ready for review August 21, 2026 19:59
@hadfl
hadfl merged commit b8546e9 into omniosorg:master Aug 21, 2026
1 check passed
@citrus-it
citrus-it deleted the pipe branch August 21, 2026 20:13
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