{"record":{"id":"5008c48216f6fe17","repo":"vllm-project/vllm","slug":"numa-bind-nodes-must-contain-non-negative-integers","errorCode":null,"errorMessage":"numa_bind_nodes must contain non-negative integers.","messagePattern":"numa_bind_nodes must contain non-negative integers\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/parallel.py","lineNumber":422,"sourceCode":"        default_factory=FaultToleranceConfig\n    )\n    \"\"\"The configurations for fault tolerance.\"\"\"\n\n    @field_validator(\"disable_nccl_for_dp_synchronization\", mode=\"wrap\")\n    @classmethod\n    def _skip_none_validation(cls, value: Any, handler: Callable) -> Any:\n        \"\"\"Skip validation if the value is `None` when initialisation is delayed.\"\"\"\n        return None if value is None else handler(value)\n\n    @field_validator(\"numa_bind_nodes\")\n    @classmethod\n    def _validate_numa_bind_nodes(cls, value: list[int] | None) -> list[int] | None:\n        if value is None:\n            return None\n        if not value:\n            raise ValueError(\"numa_bind_nodes must not be empty.\")\n        if any(node < 0 for node in value):\n            raise ValueError(\"numa_bind_nodes must contain non-negative integers.\")\n        return value\n\n    @field_validator(\"numa_bind_cpus\")\n    @classmethod\n    def _validate_numa_bind_cpus(cls, value: list[str] | None) -> list[str] | None:\n        if value is None:\n            return None\n        if not value:\n            raise ValueError(\"numa_bind_cpus must not be empty.\")\n\n        for cpuset in value:\n            if not cpuset:\n                raise ValueError(\"numa_bind_cpus entries must not be empty.\")\n            if not _NUMACTL_CPUSET_PATTERN.fullmatch(cpuset):\n                raise ValueError(\n                    \"numa_bind_cpus entries must use numactl CPU list syntax, \"\n                    \"for example '0-3' or '0,2,4-7'.\"\n                )","sourceCodeStart":404,"sourceCodeEnd":440,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/parallel.py#L404-L440","documentation":"The same ParallelConfig field validator rejects any negative integer inside numa_bind_nodes. NUMA node ids are non-negative by definition (as reported by numactl / /sys/devices/system/node), so a negative entry is always a typo or bad arithmetic.","triggerScenarios":"Passing --numa-bind-nodes -1 or a computed list like [0, -1] (e.g. node_count - 1 style bug producing -1 when count is 0).","commonSituations":"Off-by-one bugs in generated configs; shell scripts passing $((VAR-1)) when VAR is unset, yielding -1.","solutions":["Check the node ids actually available: numactl --hardware or ls /sys/devices/system/node.","Fix the generating script's arithmetic so empty inputs produce an omitted flag, not -1.","Pass only ids in [0, max_node], e.g. --numa-bind-nodes 0,1."],"exampleFix":"# before (VAR unset -> -1)\nvllm serve model --numa-bind-nodes $((NUM_NODES-1))\n\n# after\nvllm serve model --numa-bind-nodes 0,1","handlingStrategy":"validation","validationCode":"def check_numa_nodes(nodes: list[int] | None) -> None:\n    if nodes is not None and any(n < 0 for n in nodes):\n        raise SystemExit(f\"numa_bind_nodes must be non-negative: {nodes}\")","typeGuard":"def valid_numa_nodes(nodes: list[int] | None) -> bool:\n    return nodes is None or (len(nodes) > 0 and all(n >= 0 for n in nodes))","tryCatchPattern":null,"preventionTips":["Cross-check against numactl --hardware output before pinning.","Guard shell arithmetic: skip the flag when the count variable is unset."],"tags":["vllm","config","numa","parallel","validation"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}