{"record":{"id":"e0b737f580c745bd","repo":"hashicorp/nomad","slug":"failed-to-initialize-process-manager-w","errorCode":null,"errorMessage":"failed to initialize process manager: %w","messagePattern":"failed to initialize process manager: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/client.go","lineNumber":499,"sourceCode":"\n\t// Create the dynamic workload users pool\n\tc.users = dynamic.New(&dynamic.PoolConfig{\n\t\tMinUGID: cfg.Users.MinDynamicUser,\n\t\tMaxUGID: cfg.Users.MaxDynamicUser,\n\t})\n\n\t// Create the cpu core partition manager\n\tc.partitions = cgroupslib.GetPartition(c.logger.Named(\"partitions\"),\n\t\tc.topology.UsableCores(),\n\t)\n\n\t// Create the process wranglers\n\twranglers, err := proclib.New(&proclib.Configs{\n\t\tUsableCores: c.topology.UsableCores(),\n\t\tLogger:      c.logger.Named(\"proclib\"),\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to initialize process manager: %w\", err)\n\t}\n\tc.wranglers = wranglers\n\n\t// Build the allow/denylists of drivers.\n\t// COMPAT(1.0) uses inclusive language. white/blacklist are there for backward compatible reasons only.\n\tallowlistDrivers := cfg.ReadStringListToMap(\"driver.allowlist\", \"driver.whitelist\")\n\tblocklistDrivers := cfg.ReadStringListToMap(\"driver.denylist\", \"driver.blacklist\")\n\n\t// Setup the csi manager\n\tcsiConfig := &csimanager.Config{\n\t\tLogger:                c.logger,\n\t\tDynamicRegistry:       c.dynamicRegistry,\n\t\tUpdateNodeCSIInfoFunc: c.batchNodeUpdates.updateNodeFromCSI,\n\t\tTriggerNodeEvent:      c.triggerNodeEvent,\n\t}\n\tcsiManager := csimanager.New(csiConfig)\n\tc.csimanager = csiManager\n\tc.pluginManagers.RegisterAndRun(csiManager.PluginManager())","sourceCodeStart":481,"sourceCodeEnd":517,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/client.go#L481-L517","documentation":"NewClient returns this when proclib.New fails to construct the process wranglers that manage external plugin driver processes. The wranglers need a valid usable-core count from the detected topology and a logger; construction failure aborts client startup.","triggerScenarios":"proclib.New returns an error — practically only when the proclib.Configs are invalid (e.g. UsableCores computed as 0 or negative from a failed/broken topology fingerprint).","commonSituations":"Environments where CPU detection yields zero usable cores (cgroup limits, restricted /sys) so downstream proclib setup cannot proceed; bug-level misconfiguration rather than user error.","solutions":["Fix the underlying topology fingerprinting issue so UsableCores > 0 (see fingerprinting failure remedies).","Check cgroup CPU limits / taskset restrictions that could make the core count zero.","Upgrade Nomad to get improved topology detection for constrained environments.","Report to Nomad if it reproduces on normal hardware — this indicates an internal invariant violation."],"exampleFix":"// before (container)\ndocker run --cpus=0 nomad agent -client  # invalid: 0 usable cores\n// after\ndocker run --cpus=2 nomad agent -client","handlingStrategy":"validation","validationCode":"// ensure the client will detect at least one usable core before starting\nif runtime.NumCPU() == 0 || cgroupCPULimit() == 0 {\n    return errors.New(\"zero usable CPUs detected; proclib init would fail\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never configure containers/units with zero CPU quota for the Nomad agent","Verify cgroup cpu.max / cpuset leaves at least one core to the agent","Re-run fingerprinting after topology-affecting host changes before restarting clients","Treat this error as a symptom of a fingerprinting failure and fix the root cause"],"tags":["client","process-management","initialization"],"backgroundTag":"client-initialization-failed","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}