nodejs/node · error · Exception
Present value is %s
Error message
Present value is %s
What it means
Thrown by CustomMachineConfiguration.SetASLR in run_perf.py after writing a value to /proc/sys/kernel/randomize_va_space and reading it back: the read-back value differs from what was requested, so the kernel rejected or ignored the write. ASLR is pinned for benchmark reproducibility, so a mismatch aborts the run.
Source
Thrown at deps/v8/tools/run_perf.py:1089
with open('/proc/sys/kernel/randomize_va_space', 'r') as f:
return int(f.readline().strip())
except Exception:
logging.exception('Failed to get current ASLR settings.')
raise
@staticmethod
def SetASLR(value):
try:
with open('/proc/sys/kernel/randomize_va_space', 'w') as f:
f.write(str(value))
except Exception:
logging.exception(
'Failed to update ASLR to %s. Are we running under sudo?', value)
raise
new_value = CustomMachineConfiguration.GetASLR()
if value != new_value:
raise Exception('Present value is %s' % new_value)
@staticmethod
def GetCPUCoresRange():
try:
with open('/sys/devices/system/cpu/present', 'r') as f:
indexes = f.readline()
r = list(map(int, indexes.split('-')))
if len(r) == 1:
return list(range(r[0], r[0] + 1))
return list(range(r[0], r[1] + 1))
except Exception:
logging.exception('Failed to retrieve number of CPUs.')
raise
@staticmethod
def GetCPUPathForId(cpu_index):
ret = '/sys/devices/system/cpu/cpu'
ret += str(cpu_index)View on GitHub (pinned to 1b2de5e052)
Solutions
- Run the perf harness as root (sudo) so the write to /proc/sys/kernel/randomize_va_space takes effect.
- If in a container, run with --privileged or mount /proc/sys read-write and confirm the host kernel allows the change.
- Check for kernel lockdown / SELinux / AppArmor policies that block randomize_va_space writes and relax them for the benchmark host.
- Manually verify with: sudo bash -c 'echo 0 > /proc/sys/kernel/randomize_va_space' then cat the file to confirm it stuck.
Example fix
# before ./run_perf.py --d8-path=out/Release/d8 suite.json # after sudo ./run_perf.py --d8-path=out/Release/d8 suite.json
Defensive patterns
Strategy: validation
Validate before calling
import os
def can_set_aslr() -> bool:
p = '/proc/sys/kernel/randomize_va_space'
if not os.path.isfile(p):
return False
if os.access(p, os.W_OK):
return True
return os.geteuid() == 0 # will be writable once privileged Type guard
null
Try / catch
try:
CustomMachineConfiguration.SetASLR(0)
except Exception as e:
logging.warning('ASLR could not be pinned (%s); perf numbers may be noisy. Re-run with sudo / privileged container.', e) Prevention
- Run perf benchmarks as root or in a privileged container.
- Pre-check writability of /proc/sys/kernel/randomize_va_space before the run.
- Disable ASLR manually (sudo sysctl kernel.randomize_va_space=0) and confirm before launching the harness.
When it happens
Trigger: SetASLR(value) is called (typically to disable ASLR for stable perf numbers); the write succeeds without exception but GetASLR() returns a different value. Common when not running as root (write silently fails or is buffered), when a security module (lockdown, GRKERNSEC) blocks the change, or inside a container/VM where /proc/sys is read-only.
Common situations: Running ./run_perf.py without sudo; running inside Docker/containerd where /proc/sys/kernel/randomize_va_space is mounted read-only or virtualized; kernel hardening that pins ASLR.
Related errors
- Could not set CPU governor. Present value is %s
- CPU cores have differing governor settings
- --v8-enable-hugepage is supported only on linux.
- %s only allows TraceConfig and LeafTraceConfig as child conf
- Invalid suite configuration.%s
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/3d8cd7dfafeac4b2.
Report an issue: GitHub.