fix(ipc): Add timeout to AwaitMessage to prevent indefinite blocking #401
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prevent IPC hangs during container startup
This PR fixes a long-standing reliability issue in urunc’s IPC handshake between
createandstart.Previously, the IPC helper
AwaitMessage()would block indefinitely while waiting for a Unix socket connection and message. If the peer process never connected — for example becausecontainerdrestarted, theurunc startprocess was OOM-killed, or the node was under heavy load — the waiting process would never exit. This resulted in orphanedurunc --reexecprocesses, containers stuck inContainerCreating, and gradual resource leaks on the node, with no clear error reported.The fix adds a bounded timeout to the IPC accept and read steps. When the expected message is not received in time, the process now exits with a clear error instead of hanging forever. This makes failed container startups deterministic and observable, while leaving the normal, successful startup path unchanged.
In short: container creation now either succeeds, fails, or times out — but it no longer gets stuck silently.