{"record":{"id":"2f7e9db77e3f3829","repo":"aeron-io/aeron","slug":"cpuset-warnings-as-errors-d-warnings","errorCode":null,"errorMessage":"cpuset warnings as errors, %d warnings","messagePattern":"cpuset warnings as errors, (.+?) warnings","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"aeron-client/src/main/java/io/aeron/topology/CGroupValidator.java","lineNumber":94,"sourceCode":"        validate(cpusetV2Reader.readCpuSet(), warningsAsErrors, System.err);\n    }\n\n    void validate(final Cpuset cpuset, final boolean warningsAsErrors, final PrintStream out)\n    {\n        if (cpuset.cpus().size() < 2)\n        {\n            return;\n        }\n\n        int warnings = 0;\n        for (final TopologyValidator validator : topologyValidators)\n        {\n            warnings += validator.validate(cpuset, out);\n        }\n\n        if (warningsAsErrors && 0 < warnings)\n        {\n            throw new ConfigurationException(\"cpuset warnings as errors, %d warnings\".formatted(warnings));\n        }\n    }\n}\n","sourceCodeStart":76,"sourceCodeEnd":98,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-client/src/main/java/io/aeron/topology/CGroupValidator.java#L76-L98","documentation":"Aeron's CGroupValidator can be configured to treat cpuset validation warnings as fatal. When validate() accumulates one or more warnings from the registered cpuset validators and the warningsAsErrors flag is set, it throws this ConfigurationException with the total warning count. It exists so environments that require strict topology correctness fail fast instead of proceeding with a suspect cpuset.","triggerScenarios":"Calling CGroupValidator.validate() (directly or via validate) after enabling warningsAsErrors (e.g. aeron.dir.warn.if.cpuset.mismatch-as-error style configuration) while at least one cpuset validator reports a warning.","commonSituations":"Running Aeron on hosts where cgroup cpuset does not match the CPUs Aeron expects (container CPU limits, cgroup v1 vs v2 differences, pinned cores missing from cpuset.cpus.effective) with strict validation enabled.","solutions":["Fix the underlying cpuset configuration so no warnings are reported (align CPU affinity with cpuset.cpus / cpuset.cpus.effective).","Disable the warnings-as-errors option in Aeron configuration if warnings are acceptable in your environment.","Inspect the validator output buffer (out) from the prior validate call to see which specific cpuset warnings were counted.","Verify cgroup mount and version (v1 vs v2) on the host; in containers ensure the CPU limit matches the reserved CPU set."],"exampleFix":"// before\nCGroupValidator.validate(cpuset, out, true); // warningsAsErrors=true, host has mismatched cpuset\n// after\n// fix the host cpuset or relax validation\nCGroupValidator.validate(cpuset, out, false);","handlingStrategy":"validation","validationCode":"if (cgroupValidationWarnsAsErrors && !cpusetIsClean) { failFast(\"fix cpuset or disable warnings-as-errors\"); }","typeGuard":null,"tryCatchPattern":"try {\n    CGroupValidator.validate(cpuset, out, warningsAsErrors);\n} catch (ConfigurationException e) {\n    log.warn(\"cpuset validation failed: {}\", e.getMessage());\n}","preventionTips":["Inspect cpuset.cpus(.effective) alignment during host/container provisioning","Only enable warnings-as-errors on environments you control end to end","Log validator output on startup so the first warning is diagnosable"],"tags":["configuration","cpuset","cgroup","fail-fast"],"backgroundTag":"invalid-config-value","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"}