{"record":{"id":"b0165f614ecb64f0","repo":"oracle/graal","slug":"description-path-is-not-executable","errorCode":null,"errorMessage":"{description} '{path}' is not executable!","messagePattern":"(.+?) '(.+?)' is not executable!","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdk/mx.sdk/mx_sdk_benchmark.py","lineNumber":2262,"sourceCode":"        return build_dir\n\n    @staticmethod\n    def _resolve_rootfs() -> Path:\n        \"\"\"Verifies that the ROOTFS env var is set and points to a directory. Returns the directory path.\"\"\"\n        rootfs_env_var = os.getenv(\"ROOTFS\")\n        if rootfs_env_var is None:\n            raise ValueError(\"Environment variable 'ROOTFS' is unset! It must point to the CPython file-system root!\")\n        rootfs = Path(rootfs_env_var).resolve()\n        if not rootfs.is_dir():\n            raise ValueError(f\"Environment variable 'ROOTFS' points to '{rootfs}' which is not a directory!\")\n        return rootfs\n\n    @staticmethod\n    def _require_executable(path: Path, description: str) -> Path:\n        if not path.is_file():\n            raise ValueError(f\"{description} '{path}' does not exist!\")\n        if not os.access(path, os.X_OK):\n            raise ValueError(f\"{description} '{path}' is not executable!\")\n        return path\n\n    @staticmethod\n    def _resolve_graalhost_binary(build_dir: Path) -> Path:\n        \"\"\"Resolve the GraalHost binary from the GraalOS build directory.\"\"\"\n        return GraalHostPolyBenchStagingVm._require_executable(build_dir / \"graalhost\" / \"graalhost\", \"GraalHost binary\")\n\n    @staticmethod\n    def _resolve_graalos_config_util() -> Path:\n        \"\"\"Resolve the graalos-config-util CLI from PATH.\"\"\"\n        config_util = shutil.which(\"graalos-config-util\")\n        if config_util is None:\n            raise ValueError(\"Could not resolve 'graalos-config-util' from PATH!\")\n        return GraalHostPolyBenchStagingVm._require_executable(Path(config_util).resolve(), \"graalos-config-util\")\n\n    def _get_staged_benchmark_run_config_path(self) -> Path:\n        return self.output_dir / \"staged_benchmark_run_config.json\"\n","sourceCodeStart":2244,"sourceCodeEnd":2280,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/mx.sdk/mx_sdk_benchmark.py#L2244-L2280","documentation":"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.","triggerScenarios":"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.","commonSituations":"Artifacts restored from archives that lost the exec bit; noexec-mounted workspace; files transferred via tools that strip modes.","solutions":["chmod +x the offending path (the error message names it exactly).","If on a noexec mount, move the build/output tree to an exec-mounted filesystem.","Re-extract archives with permission preservation (unzip preserves modes; some docker cp flows do not)."],"exampleFix":"# before\n$ mx benchmark polybench-graalhost  # 'GraalHost binary ... is not executable!'\n\n# after\n$ chmod +x \"$GRAALOS_BUILD\"/graalhost/graalhost && mx benchmark polybench-graalhost","handlingStrategy":"validation","validationCode":"import os\nfor p in [Path(os.environ['GRAALOS_BUILD'])/'graalhost'/'graalhost']:\n    assert os.access(p, os.X_OK), f'{p} lacks execute permission; run chmod +x'","typeGuard":null,"tryCatchPattern":"try/except ValueError; on 'not executable', chmod +x the named path and retry the benchmark once.","preventionTips":["Preserve permissions when copying/extracting artifacts (tar -p, rsync -a).","Avoid noexec mounts for build and output trees."],"tags":["mx","benchmark","permissions","executable","graalos"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}