Skip to content

test: stabilize worker exec pid1 lifetime - #6810

Merged
crazy-max merged 2 commits into
moby:masterfrom
tonistiigi:containerd-exec-test-fix
Jun 10, 2026
Merged

crazy-max merged 2 commits into
moby:masterfrom
tonistiigi:containerd-exec-test-fix

Conversation

@tonistiigi

Copy link
Copy Markdown
Member

Drive the background pid1 process with stdin so the test controls its lifetime explicitly. Add a bounded wait after closing stdin to avoid hanging if executor cleanup regresses.

Flaky test fix for:

2026-05-13T08:16:16.2381395Z === FAIL: worker/containerd TestContainerdWorkerIntegration/TestContainerdWorkerExec/worker=containerd-2.1 (12.03s)
2026-05-13T08:16:16.2382346Z     common.go:103: Stdout: hello
2026-05-13T08:16:16.2382768Z     common.go:104: Stderr: 
2026-05-13T08:16:16.2383536Z     common.go:141: Stdout: PID   COMMAND
2026-05-13T08:16:16.2384015Z             1 sleep
2026-05-13T08:16:16.2384321Z             7 ps
2026-05-13T08:16:16.2384642Z     common.go:142: Stderr: 
2026-05-13T08:16:16.2385034Z     common.go:160: 
2026-05-13T08:16:16.2385439Z         	Error Trace:	/src/worker/tests/common.go:160
2026-05-13T08:16:16.2385994Z         	Error:      	Received unexpected error:
2026-05-13T08:16:16.2386441Z         	            	exit code: 137
2026-05-13T08:16:16.2387165Z         	Test:       	TestContainerdWorkerIntegration/TestContainerdWorkerExec/worker=containerd-2.1

@tonistiigi

Copy link
Copy Markdown
Member Author

The second commit is actual bugfix that was exposed by the modified test.

@tonistiigi tonistiigi added this to the v0.31.0 milestone Jun 8, 2026
@tonistiigi
tonistiigi requested a review from crazy-max June 8, 2026 19:21

@crazy-max crazy-max left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Needs rebase otherwise LGTM

Drive the background pid1 process with stdin so the test controls its
lifetime explicitly. Add a bounded wait after closing stdin to avoid
hanging if executor cleanup regresses.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Delay containerd stdin CloseIO until BuildKit's stdin reader reaches EOF.
This avoids racing the shim FIFO copy path, where closing stdin before
the copy completes can leave execs stuck or missing stdin data.

Add a client gateway regression that runs concurrent execs writing stdin
into files and verifies every payload is present.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi
tonistiigi force-pushed the containerd-exec-test-fix branch from cc9567d to cb6df1c Compare June 10, 2026 00:29
@crazy-max
crazy-max merged commit 7a2c61e into moby:master Jun 10, 2026
225 of 226 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants