{"record":{"id":"36ec3b5422b1893d","repo":"aeron-io/aeron","slug":"unable-to-find-cpuset-cpus-effective-in-path","errorCode":null,"errorMessage":"unable to find 'cpuset.cpus.effective' in path '","messagePattern":"unable to find 'cpuset\\.cpus\\.effective' in path '","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"aeron-client/src/main/java/io/aeron/topology/CpusetV2Reader.java","lineNumber":75,"sourceCode":"        }\n    }\n\n    private Path retrieveEffectiveCgroupFilePath(final String pid) throws IOException\n    {\n        final String cgroupPath = resolveCgroupPath(pid);\n        Path directory = cgroupRoot.resolve(cgroupPath.substring(1));\n\n        while (true)\n        {\n            final Path candidate = directory.resolve(CPUSET_CPUS_EFFECTIVE);\n            if (Files.exists(candidate))\n            {\n                return candidate;\n            }\n\n            if (directory.equals(cgroupRoot))\n            {\n                throw new IOException(\n                    \"unable to find '\" + CPUSET_CPUS_EFFECTIVE + \"' in path '\" + cgroupRoot + \"'\");\n            }\n\n            directory = directory.getParent();\n        }\n    }\n\n    private Cpuset readCpuSet(final String pid)\n    {\n        try\n        {\n            final Path effectiveCgroupFilePath = retrieveEffectiveCgroupFilePath(pid);\n            final String formattedCpus = Files.readString(effectiveCgroupFilePath).strip();\n            return new Cpuset(AffinityParser.parse(formattedCpus), formattedCpus);\n        }\n        catch (final IOException e)\n        {\n            throw new RuntimeException(e);","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-client/src/main/java/io/aeron/topology/CpusetV2Reader.java#L57-L93","documentation":"CpusetV2Reader.retrieveEffectiveCgroupFilePath walks up the cgroup directory hierarchy looking for 'cpuset.cpus.effective'. If it reaches the cgroup root without finding the file, it throws an IOException. This indicates the process is running on a system without cgroup v2 cpuset data (or an unexpected mount layout), so the effective CPU set cannot be determined.","triggerScenarios":"Calling CpusetV2Reader.effectiveCgroupFilePath (via retrieveEffectiveCgroupFilePath) on a filesystem where no directory from the process's cgroup path up to the cgroup root contains cpuset.cpus.effective — e.g. cgroup v1 systems or non-Linux platforms.","commonSituations":"Running on older Linux with cgroup v1 only, inside containers without the cpuset controller mounted, or on macOS/Windows where /sys/fs/cgroup does not exist.","solutions":["Verify cgroup v2 is enabled (mount -t cgroup2 /stat of /sys/fs/cgroup) and that cpuset.cpus.effective exists for the process's cgroup.","If cgroup v1 is in use, use the v1 reader or disable cpuset-based topology checks in Aeron configuration.","Run on a platform/kernel where cgroup v2 unified hierarchy is available, or skip the cpuset validation.","Check that the cgroup root path Aeron detects matches the actual mount point of the container."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"Path p = Path.of(cgroupRoot, \"cpuset.cpus.effective\");\nboolean v2 = Files.exists(p); // guard before reading topology","typeGuard":"static boolean hasCgroupV2Cpuset(String cgroupRoot) { return Files.isRegularFile(Path.of(cgroupRoot, \"cpuset.cpus.effective\")); }","tryCatchPattern":"try {\n    path = CpusetV2Reader.effectiveCgroupFilePath();\n} catch (IOException e) {\n    log.warn(\"no cgroup v2 cpuset file, skipping topology check: {}\", e.getMessage());\n}","preventionTips":["Detect cgroup version at startup and choose the matching reader","Skip cpuset validation on non-Linux or controller-less containers","Pin deployments to kernels with cgroup v2 unified hierarchy"],"tags":["cgroup","cpuset","linux","file-not-found"],"backgroundTag":"file-not-found","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}