{"record":{"id":"f7fb40aac9a54ba3","repo":"nodejs/node","slug":"unable-to-guess-power-processor-version","errorCode":null,"errorMessage":"Unable to guess power processor version","messagePattern":"Unable to guess power processor version","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"deps/v8/tools/testrunner/local/utils.py","lineNumber":136,"sourceCode":"def GuessPowerProcessorVersion():\n  import ctypes, ctypes.util\n  os = GuessOS()\n  if os == 'linux':\n    AT_PLATFORM = 15 # from linux/auxvec.h\n    _LIBC = ctypes.CDLL(ctypes.util.find_library('c'))\n    _LIBC.getauxval.argtypes = [ctypes.c_ulong]\n    _LIBC.getauxval.restype = ctypes.c_char_p\n    at_platform = _LIBC.getauxval(AT_PLATFORM).decode('utf-8').lower()\n    if at_platform.startswith('power8'):\n      return 8\n    elif at_platform.startswith('power9'):\n      return 9\n    elif at_platform.startswith('power10'):\n      return 10\n    elif at_platform.startswith('power11'):\n      return 11\n    else:\n      raise Exception('Unable to guess power processor version')\n  elif os == 'aix':\n    # covers aix and os400\n    RTLD_MEMBER = 0x00040000\n    _LIBC = ctypes.CDLL(ctypes.util.find_library('c'),\n                        ctypes.DEFAULT_MODE | RTLD_MEMBER)\n    class _system_configuration(ctypes.Structure):\n      _fields_ = [\n        ('architecture', ctypes.c_int),\n        ('implementation', ctypes.c_int),\n      ]\n    cfg = _system_configuration.in_dll(_LIBC, '_system_configuration')\n    # Values found in sys/systemcfg.h\n    if cfg.implementation == 0x4000:\n      return 6\n    elif cfg.implementation == 0x8000:\n      return 7\n    elif cfg.implementation == 0x10000:\n      return 8","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/v8/tools/testrunner/local/utils.py#L118-L154","documentation":"Raised in the Linux branch of the power-version detection helper in deps/v8/tools/testrunner/local/utils.py: it queries AT_PLATFORM via libc getauxval and matches the returned string against 'power8'..'power11'. If the platform string does not start with any of those prefixes (unknown/unsupported POWER chip, or a non-POWER kernel where this branch was nonetheless entered), it gives up.","triggerScenarios":"Running on a Linux/PowerPC host where getauxval(AT_PLATFORM) returns a value not prefixed by power8/9/10/11 (e.g. 'power7' on older hardware, a future 'power12', or a malformed/empty string when running under emulation).","commonSituations":"Older POWER7 hardware that V8 no longer special-cases; a new POWER generation not yet added to the prefix list; QEMU emulation returning an unexpected AT_PLATFORM.","solutions":["If on a newer POWER revision, extend the if/elif chain in utils.py with the matching prefix (e.g. at_platform.startswith('power12')).","If on POWER7 or older, build V8 without the code paths that require a known power version, or upgrade hardware.","Verify the actual platform string: python3 -c \"import ctypes; print(ctypes.CDLL(None).getauxval(16))\" and reconcile it with the expected prefixes."],"exampleFix":"# before\nelif at_platform.startswith('power11'):\n  return 11\nelse:\n  raise Exception('Unable to guess power processor version')\n# after\nelif at_platform.startswith('power11'):\n  return 11\nelif at_platform.startswith('power12'):\n  return 12\nelse:\n  raise Exception('Unable to guess power processor version')","handlingStrategy":"validation","validationCode":"import ctypes, ctypes.util\nAT_PLATFORM = 16\ntry:\n    libc = ctypes.CDLL(None)\n    libc.getauxval.argtypes = [ctypes.c_ulong]\n    libc.getauxval.restype = ctypes.c_char_p\n    plat = libc.getauxval(AT_PLATFORM).decode('utf-8').lower()\n    known = any(plat.startswith(p) for p in ('power8','power9','power10','power11'))\nexcept Exception:\n    known = False\nif not known:\n    raise SystemExit('Unsupported/unrecognized PowerPC platform string; extend detection in utils.py')","typeGuard":"def is_supported_power_at_platform(plat: str) -> bool:\n    plat = plat.lower()\n    return any(plat.startswith(p) for p in ('power8','power9','power10','power11'))","tryCatchPattern":"null","preventionTips":["Confirm the host's AT_PLATFORM string before relying on detection.","Extend the prefix list when adopting a new POWER generation.","Run on hardware V8 explicitly supports for the testrunner."],"tags":["v8","testrunner","powerpc","platform-detection","linux"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}