kubernetes: [Failing Test][sig-node][Serial] oom-score-adj should be -998 and best effort container's should be 1000

Which jobs are failing?

Which tests are failing?

E2eNode Suite.[It] [sig-node] Container Manager Misc [Serial] Validate OOM score adjustments [NodeFeature:OOMScoreAdj] once the node is setup with test pods pod infra containers oom-score-adj should be -998 and best effort container’s should be 1000

Since when has it been failing?

10-16

Testgrid link

https://testgrid.k8s.io/sig-node-containerd#cos-cgroupv2-containerd-node-e2e-serial, https://testgrid.k8s.io/sig-node-containerd#cos-cgroupv1-containerd-node-e2e-serial, https://testgrid.k8s.io/sig-node-containerd#ci-cgroupv2-containerd-node-e2e-serial-ec2

Reason for failure (if possible)

{ failed [FAILED] Timed out after 120.000s.
Expected
    <*errors.errorString | 0xc0020ce560>: 
    expected pid 59090's oom_score_adj to be 1000; found -998
    {
        s: "expected pid 59090's oom_score_adj to be 1000; found -998",
    }
to be nil
In [It] at: k8s.io/kubernetes/test/e2e_node/container_manager_test.go:194 @ 10/17/24 04:30:16.775
}

Anything else we need to know?

No response

Relevant SIG(s)

/sig node

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

It looks like that commit did create a bug. Here’s a simple unit test demonstrating that the NRI library is incorrectly clearing existing OOMScoreAdj: https://github.com/containerd/nri/pull/116

https://github.com/containerd/nri/pull/94 this commit is included in the diff and looks suspect (just based on it adjusting oom_score_adj).

containerd/containerd#10884 this should now be fixed.

Great. Thanks @samuelkarp for the quick fix.

I will close this once the CI bumped the containerd.

https://github.com/containerd/containerd/compare/8b41368e7...3a6e5fcb1 this is the diff between the two versions (the commit sha is the last few characters of that generated version number, since these are both untagged builds).

Checking the shared failed run, i notice from containerd.log pid:18341 is related

Oct 17 16:10:11 n1-standard-2-cos-beta-117-18613-0-79-66cd92e1 containerd[10226]: time=“2024-10-17T16:10:11.616760589Z” level=info msg=“received exit event container_id:"8b0c46d33f98429f27094fc8d0cc5b2378c10f6fe6e391fe78f725c763b4921f" id:"8b0c46d33f98429f27094fc8d0cc5b2378c10f6fe6e391fe78f725c763b4921f" pid:18341 exit_status:2 exited_at:{seconds:1729181411 nanos:616146447}”

with container agnhost executing the agnhost pause command

Oct 17 16:08:11 n1-standard-2-cos-beta-117-18613-0-79-66cd92e1 containerd[10226]: time=“2024-10-17T16:08:11.785722567Z” level=debug msg="Container "8b0c46d33f98429f27094fc8d0cc5b2378c10f6fe6e391fe78f725c763b4921f" spec: (*specs.Spec)(0xc000c18ab0){Version:(string)1.2.0 Process:(*specs.Process)(0xc0009d3e00){Terminal:(bool)false ConsoleSize:(*specs.Box)<nil> User:(specs.User){UID:(uint32)0 GID:(uint32)0 Umask:(*uint32)<nil> AdditionalGids:([]uint32)<nil> Username:(string)} Args:([]string)[/agnhost pause] CommandLine:(string) Env:([]strin

pause.go seems it is a direct syscall call according to pause.go .

Want to test my theory if this is the root cause, so i started the container this time adding an args parameter to overcome getting the pause command. Ths CI of #128270 should test this theory.

[UPDATE] Failed both tests , continuing investigation