{"record":{"id":"d926b8113e7440ea","repo":"slackhq/nebula","slug":"bad-cpulist-entry-q-w","errorCode":null,"errorMessage":"bad cpulist entry %q: %w","messagePattern":"bad cpulist entry %q: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cpupick/perf_linux.go","lineNumber":128,"sourceCode":"\treturn keep, true\n}\n\n// parseCPUList decodes the kernel's cpulist format (\"0-7,16-23\", \"3\") into\n// individual CPU IDs. Empty input yields an empty list.\nfunc parseCPUList(s string) ([]int, error) {\n\tif s == \"\" {\n\t\treturn nil, nil\n\t}\n\tvar out []int\n\tfor part := range strings.SplitSeq(s, \",\") {\n\t\tpart = strings.TrimSpace(part)\n\t\tif part == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tlo, hi, isRange := strings.Cut(part, \"-\")\n\t\ta, err := strconv.Atoi(lo)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"bad cpulist entry %q: %w\", part, err)\n\t\t}\n\t\tif !isRange {\n\t\t\tout = append(out, a)\n\t\t\tcontinue\n\t\t}\n\t\tb, err := strconv.Atoi(hi)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"bad cpulist entry %q: %w\", part, err)\n\t\t}\n\t\tif b < a || b-a > 8192 {\n\t\t\treturn nil, fmt.Errorf(\"bad cpulist range %q\", part)\n\t\t}\n\t\tfor v := a; v <= b; v++ {\n\t\t\tout = append(out, v)\n\t\t}\n\t}\n\treturn out, nil\n}","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/slackhq/nebula/blob/dd8f660c0ac37903ec4080ca4d3c861ba9342ceb/cpupick/perf_linux.go#L110-L146","documentation":"Parse error from parseCPUList: an entry in a kernel cpulist string (e.g. from sysfs topology files, \"0-7,16\") is not a valid decimal CPU number. strconv.Atoi on the lower bound of the entry failed; the whole offending entry is quoted and the Atoi error wrapped with %w.","triggerScenarios":"Thrown at cpupick/perf_linux.go:128 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ignore and fall back to a default CPU selection strategy","Verify the sysfs cpulist file was read correctly (not truncated/garbled)","Report the unexpected kernel format as a bug with the offending value"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dd8f660c0ac37903ec4080ca4d3c861ba9342ceb","analyzedAt":"2026-09-03T11:13:55.444Z","contentChangedAt":"2026-09-03T11:13:55.444Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}