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

do not have any error about runc init exit #4699

Closed
kamizjw opened this issue Mar 26, 2025 · 6 comments
Closed

do not have any error about runc init exit #4699

kamizjw opened this issue Mar 26, 2025 · 6 comments

Comments

@kamizjw
Copy link

kamizjw commented Mar 26, 2025

Description

execute cmd runc run testcontainer,if init's parent process pid is change,runc init process will send SIGKILL singal to itself.but if it exits the process in this way, there is not enough log information printed.

Steps to reproduce the issue

1.change runc init code,to make sure it will send SIGKILL to itself,and compile the binary.
2.execute cmd `runc run testcontainer

Describe the results you received and expected

results i received:

[root@localhost test]# runc run mycontainer
libcontainer: container init failed to execERRO[0000] runc run failed: container process is already dead

results i expected:
have more clear log i know where init exits.

What version of runc are you using?

[root@localhost ~]# runc --version
runc version 1.1.3
commit: b896a87f74e20c2584632594b48043271448713a
spec: 1.0.2-dev
go: go1.21.4
libseccomp: 2.5.3

Host OS information

No response

Host kernel information

No response

@rata
Copy link
Member

rata commented Apr 7, 2025

@kamizjw sorry, I don't think I understand the issue.

You modify runc to kill itself, runc shows an error saying the process is already dead. What would you like to be different?

@kamizjw kamizjw closed this as completed Apr 7, 2025
@rata
Copy link
Member

rata commented Apr 7, 2025

@kamizjw is this solved then?

@kamizjw
Copy link
Author

kamizjw commented Apr 7, 2025

@kamizjw is this solved then?

not solved,but it can not report error to containerd when runc kill itself,pipe is closed

@rata
Copy link
Member

rata commented Apr 7, 2025

Sorry, I still don't understand what the issue is nor how it is triggered. Can you provide a repro and explain what is the setup that triggers it?

@kamizjw
Copy link
Author

kamizjw commented Apr 7, 2025

Sorry, I still don't understand what the issue is nor how it is triggered. Can you provide a repro and explain what is the setup that triggers it?

i just review code and found it.when it's parent pid changed,runc will kill itself. if runc init process exit,i think it can not report error to upper layer app via pipe,like containerd or docker.

@rata
Copy link
Member

rata commented Apr 7, 2025

Sorry, I'm definitely not understanding. How can the parent pid change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants