oracle/graal · error · ValueError
{description} '{path}' does not exist!
Error message
{description} '{path}' does not exist! What it means
Generic guard inside _require_executable: for a described tool path (GraalHost binary, graalos-config-util) the file must exist (is_file()); otherwise ValueError '{description} {path} does not exist!'. It is used whenever the harness resolves concrete binaries needed for staging/running GraalHost benchmarks.
Source
Thrown at sdk/mx.sdk/mx_sdk_benchmark.py:2260
if not build_dir.is_dir():
raise ValueError(f"Environment variable 'GRAALOS_BUILD' points to '{build_dir}' which is not a directory!")
return build_dir
@staticmethod
def _resolve_rootfs() -> Path:
"""Verifies that the ROOTFS env var is set and points to a directory. Returns the directory path."""
rootfs_env_var = os.getenv("ROOTFS")
if rootfs_env_var is None:
raise ValueError("Environment variable 'ROOTFS' is unset! It must point to the CPython file-system root!")
rootfs = Path(rootfs_env_var).resolve()
if not rootfs.is_dir():
raise ValueError(f"Environment variable 'ROOTFS' points to '{rootfs}' which is not a directory!")
return rootfs
@staticmethod
def _require_executable(path: Path, description: str) -> Path:
if not path.is_file():
raise ValueError(f"{description} '{path}' does not exist!")
if not os.access(path, os.X_OK):
raise ValueError(f"{description} '{path}' is not executable!")
return path
@staticmethod
def _resolve_graalhost_binary(build_dir: Path) -> Path:
"""Resolve the GraalHost binary from the GraalOS build directory."""
return GraalHostPolyBenchStagingVm._require_executable(build_dir / "graalhost" / "graalhost", "GraalHost binary")
@staticmethod
def _resolve_graalos_config_util() -> Path:
"""Resolve the graalos-config-util CLI from PATH."""
config_util = shutil.which("graalos-config-util")
if config_util is None:
raise ValueError("Could not resolve 'graalos-config-util' from PATH!")
return GraalHostPolyBenchStagingVm._require_executable(Path(config_util).resolve(), "graalos-config-util")
def _get_staged_benchmark_run_config_path(self) -> Path:View on GitHub (pinned to a66e9ccd1d)
Solutions
- Build the missing artifact (GraalOS graalhost target) so GRAALOS_BUILD/graalhost/graalhost exists and is a regular file.
- For graalos-config-util, reinstall it or fix PATH so it resolves to a real file.
- Verify manually: ls -la "$GRAALOS_BUILD/graalhost/graalhost".
Example fix
# before $GRAALOS_BUILD/graalhost/graalhost # absent -> 'GraalHost binary ... does not exist!' # after $ ninja -C "$GRAALOS_BUILD" graalhost && mx benchmark polybench-graalhost
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
gh = Path(os.environ['GRAALOS_BUILD']) / 'graalhost' / 'graalhost'
assert gh.is_file(), f'missing GraalHost binary at {gh}; build it first' Try / catch
try/except ValueError; the message embeds both description and path — use it to drive a rebuild step then retry.
Prevention
- Preflight-check required binaries after any mx clean or workspace refresh.
- Treat partial build trees as a smell: verify expected artifacts exist before benchmarking.
When it happens
Trigger: GRAALOS_BUILD/graalhost/graalhost missing because the GraalOS build did not produce the binary, or a graalos-config-util resolved from PATH but deleted/being a dangling symlink; also paths into a partially cleaned build tree.
Common situations: Incomplete or failed GraalOS build; build artifacts removed by mx clean; running the benchmark on a machine that never built graalhost but only set the env vars.
Related errors
- Environment variable 'GRAALOS_BUILD' points to '{build_dir}'
- Environment variable 'ROOTFS' points to '{rootfs}' which is
- {description} '{path}' is not executable!
- GraalHost toolchain library directory '{toolchain_lib_path}'
- Environment variable 'GRAALOS_BUILD' is unset! It must point
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/5f022049ddbaa791.
Report an issue: GitHub.