Repository navigation
runcexecutor: change how the runc executor kills runc processes - #6779
Conversation
|
How did you test this PR? |
|
@AkihiroSuda beyond just pushing to run CI I haven't done any special testing. I'll change this to draft and try to mess with the runc binary a little bit just to verify the messages get printed as I expect them to. |
Change how the runc executor kills runc processes by removing the previous warning message that occurred every 50 milliseconds with a bit more precision in how it sends the warning. The previous version could potentially successfully kill the runc process and then the runc process could take some time to exit. It would spam the logs every 50 milliseconds until the process exited and would attempt to rekill a container that was already marked as killed. This change makes it so we detect a successful kill. If we detect a successful kill, we then wait for the process while writing a warning to the log that the process is taking a long time to end. We print one message 50 milliseconds after the kill and then an additional one with the exact time it took to exit after the exit succeeds. If the kill is not successful, we stay in the same loop as previously existed. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
cb62c9b to
87627f0
Compare
|
@AkihiroSuda I added a I then used that version of runc and created a buildkit container. I created a dockerfile that just does this: FROM alpine
RUN echo hi; sleep 60; falseI ran it against this change and pushed ctrl+c during the build. I get this output. This is the output I would expect from the change. Without this change, here's the output that I get with the same There's a lot more of that same message so I do think that this message is likely just caused by some logging code for |
Change how the runc executor kills runc processes by removing the
previous warning message that occurred every 50 milliseconds with a bit
more precision in how it sends the warning.
The previous version could potentially successfully kill the runc
process and then the runc process could take some time to exit. It would
spam the logs every 50 milliseconds until the process exited and would
attempt to rekill a container that was already marked as killed.
This change makes it so we detect a successful kill. If we detect a
successful kill, we then wait for the process while writing a warning to
the log that the process is taking a long time to end. We print one
message 50 milliseconds after the kill and then an additional one with
the exact time it took to exit after the exit succeeds.
If the kill is not successful, we stay in the same loop as previously
existed.
Related to #4483.