oracle/graal · error · ValueError
Environment variable 'ROOTFS' points to '{rootfs}' which is
Error message
Environment variable 'ROOTFS' points to '{rootfs}' which is not a directory! What it means
Same _resolve_rootfs resolver, but ROOTFS is set and resolves to something that is not a directory (file, nonexistent path, broken symlink). Since the harness will write staged files and create temp directories inside it, it validates is_dir() and raises ValueError with the resolved path.
Source
Thrown at sdk/mx.sdk/mx_sdk_benchmark.py:2254
def _resolve_graalos_build_dir() -> Path:
"""Verifies that the GRAALOS_BUILD env var is set and points to a directory. Returns the directory path."""
graalos_build_env_var = os.getenv("GRAALOS_BUILD")
if graalos_build_env_var is None:
raise ValueError("Environment variable 'GRAALOS_BUILD' is unset! It must point to the GraalOS build directory!")
build_dir = Path(graalos_build_env_var).resolve()
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."""View on GitHub (pinned to a66e9ccd1d)
Solutions
- Extract/prepare the CPython root directory and export its absolute path as ROOTFS.
- Verify with 'test -d "$ROOTFS" && ls "$ROOTFS"/tmp'.
- Re-create rootfs/tmp if it was cleaned.
Example fix
# before export ROOTFS=$HOME/downloads/cpython-rootfs.tar.gz # after export ROOTFS=$HOME/graalos/roots/cpython-rootfs
Defensive patterns
Strategy: validation
Validate before calling
r = Path(os.environ['ROOTFS']).resolve()
assert r.is_dir(), f'ROOTFS={r} is not a directory; extract the CPython rootfs and export its path' Try / catch
try/except ValueError; print the resolved path plus whether its parent exists to distinguish typos from missing mounts.
Prevention
- Export the extracted root directory, never the tarball.
- Check mounts (noexec/NFS availability) before runs.
When it happens
Trigger: ROOTFS pointing at a tarball instead of the extracted root, a removed directory, or a typo. Path.resolve() absolutizes, so relative paths that made sense in another cwd fail here.
Common situations: ROOTFS set to the .tar.gz artifact name by mistake; build cleaned between runs; NFS/symlink to an unmounted share.
Related errors
- Environment variable 'GRAALOS_BUILD' points to '{build_dir}'
- Environment variable 'GRAALOS_BUILD' is unset! It must point
- Environment variable 'ROOTFS' is unset! It must point to the
- {description} '{path}' does not exist!
- Could not resolve 'graalos-config-util' from PATH!
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/d0bc2a57f820b360.
Report an issue: GitHub.