-
Notifications
You must be signed in to change notification settings - Fork 113
agent: sandbox_pause should not take arguments #585
Conversation
I faced a similar issue with other cgo implementations that I did in the past, the solution was to read the arguments from |
@devimc Good point! I've updated the PR to follow your suggestion. Thanks! |
Dropping |
/test |
Codecov Report
@@ Coverage Diff @@
## master #585 +/- ##
==========================================
+ Coverage 50.45% 50.62% +0.16%
==========================================
Files 17 17
Lines 2392 2392
==========================================
+ Hits 1207 1211 +4
+ Misses 1028 1026 -2
+ Partials 157 155 -2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! the commit lgtm with a minor comment inline.
/test |
fclose(f); | ||
free(p); | ||
|
||
if (do_pause == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use braces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really necessary right? C code doesn't need to follow go coding style here.
Since this pause process will be an init process in its pid namespace, does it need to do reap the exited orphan child processes? |
c7a37f6
to
6b7b6d8
Compare
@lifupan That's handled by the agent reaper instead. |
/test |
I think the commit subject needs an update 😉 |
Ouch! Updated. Thanks @liwei ! |
/test |
Hi @bergwolf, actually the kata-agent child subreaper cannot
actually after kernel applying this patch, https://lkml.org/lkml/2017/1/30/630 , the kata-agent cannot reap the orphan child processes in sub-namespace. |
@lifupan Then it's a bigger problem. Let me take a closer look. |
/test |
Odd. One of the Travis builds failed with a timeout... building a golang program!
Any thoughts @nitkon? |
@jodh-intel: That was odd. I have restarted the Travis-CI and now it's green. |
Restarted initrd CI which had a transitory failure. |
flake test for initrd?
|
@bergwolf - this should be backport candidate as well, correct? I think it should be -- please add backport label if you agree. The commit message seems to indicate the fix is not using args, whereas you are just grabbing the args now via proc sysfs, right? Can you update commit message accordingly? |
gcc __attribute__ constructors cannot take arguments and cannot access main function arguments on musl. Such functionality is glibc specific and only works on x86 and x86_64. As a result, the pause binary always quits on musl causing sandbox share pidns to malfunction. Fix it by grabbing arguments from /proc/self/cmdline instead. Fixes: kata-containers#584 Signed-off-by: Peng Tao <[email protected]>
/test |
@egernst Yes, I agree it should go to stable. tag added. Thanks. |
rebuilding ubuntu-18-04-initrd |
functional tests are failing again, nothing related to this pr, I think
|
gcc attribute constructors cannot take arguments and cannot
access main function arguments on musl. Such functionality is glibc
specific and only works on x86 and x86_64. As a result, the pause
binary always quits on musl causing sandbox share pidns to malfunction.