Skip to content

Executing the CodeQL GitHub Action within a Docker container results in the detection of only a single CPU, due to the /sys/fs/cgroup/cpuset.cpus file being empty. #2139

Closed
@thomas-koppera-keenfinity

Description

Hi,

when using the github action in a container action with a docker image which has cgroup v2 it cannot be run multithreaded.

Example output:

While resolving threads, found a cgroup CPUs file with 32 CPUs in /sys/fs/cgroup/cpuset.cpus.effective.
While resolving threads, found a cgroup CPUs file with 1 CPUs in /sys/fs/cgroup/cpuset.cpus.

This happens because at my docker image (ubuntu:22.04) the /sys/fs/cgroup/cpuset.cpus is empty which is legit:
see https://www.kernel.org/doc/Documentation/admin-guide/cgroup-v2.rst

If "cpuset.cpus" is empty, the "cpuset.cpus.effective" file shows
all the CPUs from the parent cgroup that can be available to
be used by this cgroup.

Now this lead to a maximum number of 1 CPU.
Relates to #2083

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions