File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -550,6 +550,18 @@ func (p *initProcess) start() (retErr error) {
550
550
return fmt .Errorf ("unable to start init: %w" , err )
551
551
}
552
552
553
+ // If the runc-create process is terminated due to receiving SIGKILL signal,
554
+ // it may lead to the runc-init process leaking due
555
+ // to issues like cgroup freezing,
556
+ // and it cannot be cleaned up by runc delete/stop
557
+ // because the container lacks a state.json file.
558
+ // This typically occurs when higher-level
559
+ // container runtimes terminate the runc create process due to context cancellation or timeout.
560
+ _ , err = p .container .updateState (nil )
561
+ if err != nil {
562
+ return fmt .Errorf ("unable to store init state before creating cgroup: %w" , err )
563
+ }
564
+
553
565
defer func () {
554
566
if retErr != nil {
555
567
// Find out if init is killed by the kernel's OOM killer.
You can’t perform that action at this time.
0 commit comments