nodejs/node · error · Exception

Unable to guess power processor version

Error message

Unable to guess power processor version

What it means

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.

Source

Thrown at deps/v8/tools/testrunner/local/utils.py:136

def GuessPowerProcessorVersion():
  import ctypes, ctypes.util
  os = GuessOS()
  if os == 'linux':
    AT_PLATFORM = 15 # from linux/auxvec.h
    _LIBC = ctypes.CDLL(ctypes.util.find_library('c'))
    _LIBC.getauxval.argtypes = [ctypes.c_ulong]
    _LIBC.getauxval.restype = ctypes.c_char_p
    at_platform = _LIBC.getauxval(AT_PLATFORM).decode('utf-8').lower()
    if at_platform.startswith('power8'):
      return 8
    elif at_platform.startswith('power9'):
      return 9
    elif at_platform.startswith('power10'):
      return 10
    elif at_platform.startswith('power11'):
      return 11
    else:
      raise Exception('Unable to guess power processor version')
  elif os == 'aix':
    # covers aix and os400
    RTLD_MEMBER = 0x00040000
    _LIBC = ctypes.CDLL(ctypes.util.find_library('c'),
                        ctypes.DEFAULT_MODE | RTLD_MEMBER)
    class _system_configuration(ctypes.Structure):
      _fields_ = [
        ('architecture', ctypes.c_int),
        ('implementation', ctypes.c_int),
      ]
    cfg = _system_configuration.in_dll(_LIBC, '_system_configuration')
    # Values found in sys/systemcfg.h
    if cfg.implementation == 0x4000:
      return 6
    elif cfg.implementation == 0x8000:
      return 7
    elif cfg.implementation == 0x10000:
      return 8

View on GitHub (pinned to 1b2de5e052)

Solutions

  1. If on a newer POWER revision, extend the if/elif chain in utils.py with the matching prefix (e.g. at_platform.startswith('power12')).
  2. If on POWER7 or older, build V8 without the code paths that require a known power version, or upgrade hardware.
  3. Verify the actual platform string: python3 -c "import ctypes; print(ctypes.CDLL(None).getauxval(16))" and reconcile it with the expected prefixes.

Example fix

# before
elif at_platform.startswith('power11'):
  return 11
else:
  raise Exception('Unable to guess power processor version')
# after
elif at_platform.startswith('power11'):
  return 11
elif at_platform.startswith('power12'):
  return 12
else:
  raise Exception('Unable to guess power processor version')
Defensive patterns

Strategy: validation

Validate before calling

import ctypes, ctypes.util
AT_PLATFORM = 16
try:
    libc = ctypes.CDLL(None)
    libc.getauxval.argtypes = [ctypes.c_ulong]
    libc.getauxval.restype = ctypes.c_char_p
    plat = libc.getauxval(AT_PLATFORM).decode('utf-8').lower()
    known = any(plat.startswith(p) for p in ('power8','power9','power10','power11'))
except Exception:
    known = False
if not known:
    raise SystemExit('Unsupported/unrecognized PowerPC platform string; extend detection in utils.py')

Type guard

def is_supported_power_at_platform(plat: str) -> bool:
    plat = plat.lower()
    return any(plat.startswith(p) for p in ('power8','power9','power10','power11'))

Try / catch

null

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13). Data as JSON: /api/errors/f7fb40aac9a54ba3. Report an issue: GitHub.