Skip to content

Commit 063a4ff

Browse files
Merge pull request #3419 from AkihiroSuda/fix-task-start
runtime/v1/linux: ignore ErrCgroupDeleted in Task.Start
2 parents 129942c + fab016c commit 063a4ff

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

runtime/v1/linux/task.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,15 @@ func (t *Task) Start(ctx context.Context) error {
124124
t.pid = int(r.Pid)
125125
if !hasCgroup {
126126
cg, err := cgroups.Load(cgroups.V1, cgroups.PidPath(t.pid))
127-
if err != nil {
127+
if err != nil && err != cgroups.ErrCgroupDeleted {
128128
return err
129129
}
130130
t.mu.Lock()
131-
t.cg = cg
131+
if err == cgroups.ErrCgroupDeleted {
132+
t.cg = nil
133+
} else {
134+
t.cg = cg
135+
}
132136
t.mu.Unlock()
133137
}
134138
t.events.Publish(ctx, runtime.TaskStartEventTopic, &eventstypes.TaskStart{

0 commit comments

Comments
 (0)