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

ci: race in TestExecIn #4437

Open
kolyshkin opened this issue Oct 10, 2024 · 0 comments · May be fixed by #4445
Open

ci: race in TestExecIn #4437

kolyshkin opened this issue Oct 10, 2024 · 0 comments · May be fixed by #4445

Comments

@kolyshkin
Copy link
Contributor

kolyshkin commented Oct 10, 2024

Description

Just saw this in CI here on alma-linux-8:

=== RUN   TestExecIn
    execin_test.go:63: unexpected running process, output "PID   USER     TIME  COMMAND\n    1 root      0:00 [runc:[2:INIT]]\n    7 root      0:00 ps\n"
--- FAIL: TestExecIn (0.17s)

Apparently it's a race -- container "init" process (cat) in this case has not yet started, but the container "exec" process (ps) already ran.

@lifubang lifubang linked a pull request Oct 14, 2024 that will close this issue
lifubang added a commit to lifubang/runc that referenced this issue Oct 15, 2024
Fixes: opencontainers#4437
We can use a chan to wait the output from init process. After we received the content,
it means that the init process has started. Then we can exec into this container to use
ps command to check the init process and the exec process are both exist.

Signed-off-by: lifubang <[email protected]>
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 a pull request may close this issue.

1 participant