Skip to content

Commit

Permalink
[debug] find out why signal is called on create
Browse files Browse the repository at this point in the history
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Sep 12, 2024
1 parent 2eb28b5 commit 15b4383
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libcontainer/container_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"path"
"path/filepath"
"reflect"
"runtime/debug"
"slices"
"strconv"
"strings"
Expand Down Expand Up @@ -389,6 +390,7 @@ func (c *Container) Signal(s os.Signal) error {
if s == unix.SIGKILL && !c.config.Namespaces.IsPrivate(configs.NEWPID) {
if err := signalAllProcesses(c.cgroupManager, unix.SIGKILL); err != nil {
if c.config.RootlessCgroups { // may not have an access to cgroup
logrus.Warn(debug.Stack())
logrus.WithError(err).Warn("failed to kill all processes, possibly due to lack of cgroup (Hint: enable cgroup v2 delegation)")
// Some processes may leak when cgroup is not delegated
// https://github.com/opencontainers/runc/pull/4395#pullrequestreview-2291179652
Expand Down

0 comments on commit 15b4383

Please sign in to comment.