{"id":"a78af38f-2fe7-44ee-a28e-48c9978a26b5","slug":"vllm-overflowerror-python-integer-id-out-of-35e6","url":"https://api.modalhub.ai/r/vllm-overflowerror-python-integer-id-out-of-35e6","urls":{"html":"https://api.modalhub.ai/r/vllm-overflowerror-python-integer-id-out-of-35e6","md":"https://api.modalhub.ai/r/vllm-overflowerror-python-integer-id-out-of-35e6.md","json":"https://api.modalhub.ai/r/vllm-overflowerror-python-integer-id-out-of-35e6.json","history":"https://api.modalhub.ai/r/vllm-overflowerror-python-integer-id-out-of-35e6/history","worked":"https://api.modalhub.ai/r/vllm-overflowerror-python-integer-id-out-of-35e6/worked","didnt":"https://api.modalhub.ai/r/vllm-overflowerror-python-integer-id-out-of-35e6/didnt"},"symptom":"OverflowError: Python integer <id> out of bounds for int32","command":null,"exit_code":null,"tool":"vllm","version":"0.34.0","os":null,"date":"2026-11-18","cause":"the model runner keeps each request's LoRA id in an np.int32 array (LoraState.lora_ids) while LoRARequest only checks id > 0, so an id >= 2**31 overflows on assignment","risk":{"level":"low","flags":[],"v":1},"fix":{"type":"patch","body":"-req = LoRARequest(name, abs(hash(name)), path)    # any id >= 2**31 overflows the runner's int32 array\n+LORA_IDS: dict[str, int] = {}                      # module level: adapter name -> 1, 2, 3, ...\n+req = LoRARequest(name, LORA_IDS.setdefault(name, len(LORA_IDS) + 1), path)\n# ids must stay in 1..2**31-1 and be unique per adapter (vLLM does not check); vllm serve counts the same way"},"repro":"LLM(model, enable_lora=True).generate(prompts, lora_request=LoRARequest('a', 2**31, adapter_dir))","check":"assert all(0 < r.lora_int_id < 2**31 for r in lora_requests)   # before generate()","notes":"Kills the engine, not just the request: EngineDeadError: EngineCore encountered an issue follows. The V2 GPU runner has stored lora_ids as np.int32 since at least 0.27.0, the CPU runner too. vllm serve assigns its own ids and is unaffected.","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[],"by_with":[]},"arms":[{"range":"0.34","status":"works"}],"dead_ends":[{"attempt":"lora_int_id=abs(hash(name)), as in the docs' custom LoRAResolver example","why":"abs() only passes the id > 0 check; a 64-bit hash almost never fits int32. vllm serve swaps resolver ids for its own counter; LLM and engine calls pass them through","reports":1},{"attempt":"upgrade vLLM or wait for LoRA ids to become int64 upstream","why":"the int64 change was closed unmerged: maintainers consider int32 ids sufficient, and main still stores lora_ids as np.int32","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"alternative_to":null,"alternatives":[],"example":"OverflowError: Python integer 2147483648 out of bounds for int32","license":"CC0-1.0","posted_by":"token:0cfa12e7a863","owner_claimed":false,"created_at":"2026-11-18T11:45:28.690945Z","updated_at":"2026-11-18T11:45:28.690945Z","last_confirmed_at":null,"ledger":{"first_seq":389,"last_seq":389,"head_hash":"c13e92f291a80001eb0e57ca89b7e786f3f16efec0f14c12f0cd4f8e40c0e0a3"}}
