-
Notifications
You must be signed in to change notification settings - Fork 352
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
Unexpected chdir
invoked on container init
and start
#2772
Comments
I want to make sure something before the investigation: |
I will try to reproduce this in youki, getting back to you later. |
Okay I spent more time tracing where the root cause is, and found that after handling the Question: why does youki |
@Furisto Hi, Thomas. I'd like to know about your comment https://github.com/containers/youki/pull/143/files#r673503679. Is this assuming that |
chdir
invoked on container init
and start
|
Hey @Mossaka , The related PR will release soon, but I had a question with this issue -
I'm not sure why youki setting cwd in the container init process would have any issues with shim? The start, run and delete youki processes (created using |
The shim process's working directory has been changed by youki APIs, and that directory was never changed back (and in fact, was deleted in |
Hey, thanks for the explanation, you are completely right. I had missed the library invocation aspect completely! |
While investigating a performance issue, I observed that the working directory
/run/containerd/io.containerd.runtime.v2.task/<namespace>/<containerid>/
becomes inaccessible or gets deleted after executing theshim::wait()
call in therunwasi
shim process. This deletion prevents the shim process from reading theaddress
file to delete the shim socket. (e.g. ref code)Logs
I ran bpftrace on
unlink
andunlinkat
syscalls on that paths and found thatyouki
inner processunlink
s the bundle path before containerd callsdelete-shim
(before process2611761
gets started).Specifically, this caught my attention:
PID 2611707 (youki:[2:INIT]): File unlink in target directory: /run/containerd/io.containerd.runtime.v2.task/default/testwasm/..
Question:
I am raising this issue to try to understand why youki does that. This might be the reason why the shim process is not able to delete the socket address after the ttrpc server shuts down.
FYI: @utam0k @jprendes
The text was updated successfully, but these errors were encountered: