oracle/graal · error · ValueError

{description} '{path}' is not executable!

Error message

{description} '{path}' is not executable!

What it means

Second half of _require_executable: the path exists as a file but os.access(path, X_OK) fails, i.e. the execute bit is missing. The harness refuses to exec a non-executable tool and raises '{description} {path} is not executable!'. Typical for artifacts copied without permissions or downloaded through a channel that drops modes.

Source

Thrown at sdk/mx.sdk/mx_sdk_benchmark.py:2262

        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:
        return self.output_dir / "staged_benchmark_run_config.json"

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. chmod +x the offending path (the error message names it exactly).
  2. If on a noexec mount, move the build/output tree to an exec-mounted filesystem.
  3. Re-extract archives with permission preservation (unzip preserves modes; some docker cp flows do not).

Example fix

# before
$ mx benchmark polybench-graalhost  # 'GraalHost binary ... is not executable!'

# after
$ chmod +x "$GRAALOS_BUILD"/graalhost/graalhost && mx benchmark polybench-graalhost
Defensive patterns

Strategy: validation

Validate before calling

import os
for p in [Path(os.environ['GRAALOS_BUILD'])/'graalhost'/'graalhost']:
    assert os.access(p, os.X_OK), f'{p} lacks execute permission; run chmod +x'

Try / catch

try/except ValueError; on 'not executable', chmod +x the named path and retry the benchmark once.

Prevention

When it happens

Trigger: graalhost binary or graalos-config-util present but chmod -x applied (copy without -p, unzip without permission bits, Windows filesystem mounts), or a file owned with noexec mount.

Common situations: Artifacts restored from archives that lost the exec bit; noexec-mounted workspace; files transferred via tools that strip modes.

Related errors


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/b0165f614ecb64f0. Report an issue: GitHub.