{"record":{"id":"ba7ef030b18f84fa","repo":"oracle/graal","slug":"expected-staged-graalhost-run-config-at-run-conf","errorCode":null,"errorMessage":"Expected staged GraalHost run config at '{run_config_path}' but it does not exist!","messagePattern":"Expected staged GraalHost run config at '(.+?)' but it does not exist!","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdk/mx.sdk/mx_sdk_benchmark.py","lineNumber":2364,"sourceCode":"            \"--endpoint-config\", str(file_path),\n            \"--extra-config-path\", str(extra_config_path),\n        ]\n        out = mx.OutputCapture()\n        err = mx.OutputCapture()\n        rc = mx.run(cmd, out=out, err=err, nonZeroIsFatal=False)\n        mx.log(out.data)\n        if rc != 0:\n            mx.log(err.data)\n            raise ChildProcessError(f\"graalos-config-util finished unsuccessfully with return code {rc}!\")\n        return file_path\n\n    def run_stage_run(self):\n        rootfs = self._resolve_rootfs()\n        build_dir = self._resolve_graalos_build_dir()\n        graalhost = self._resolve_graalhost_binary(build_dir)\n        run_config_path = self._get_staged_benchmark_run_config_path()\n        if not run_config_path.is_file():\n            raise ValueError(f\"Expected staged GraalHost run config at '{run_config_path}' but it does not exist!\")\n        ephemeral_dir = tempfile.mkdtemp(prefix=\"graalhost_staged_benchmark_\", dir=rootfs / \"tmp\")\n        with self.get_stage_runner() as s:\n            cmd = [\n                str(graalhost),\n                f\"--ephemeral_dir={ephemeral_dir}\",\n                \"--enable_resolving_env_refs\",\n                \"--visorcalloutput=@none\",\n                \"--log_to=file\",\n                f\"--run_config=@{run_config_path}\",\n                \"--run\",\n                self.launcher,\n                str(self.staged_program_file_path),\n            ]\n            s.execute_command(self, cmd)\n\n\ndef register_graalvm_vms():\n    # a simple JVM config that runs without any custom flag","sourceCodeStart":2346,"sourceCodeEnd":2382,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/mx.sdk/mx_sdk_benchmark.py#L2346-L2382","documentation":"Raised by run_stage_run in the staged GraalHost benchmark flow (mx_sdk_benchmark.py). Before launching GraalHost with --run_config=@<path>, the suite verifies that a staged benchmark run-config file exists at the path returned by _get_staged_benchmark_run_config_path(). If the file is missing, the run refuses to start because GraalHost cannot resolve its run configuration.","triggerScenarios":"Calling the staged GraalHost benchmark run without having executed the earlier staging step (e.g. the config/stage phase of the native-image benchmark pipeline) that writes the run config into the staged working area, or when the staged program/config files were cleaned up or written to a different directory.","commonSituations":"Running only the RUN stage via -Dnative-image.benchmark.stages=run on a fresh checkout; CI wiping the staging directory between stages; a mismatch between the staged benchmark directory the config was written to and the one run_stage_run reads from.","solutions":["Run the full staged pipeline (including the stage/config step that produces the run config) instead of only the run step.","Verify the file printed in the message exists: ls <run_config_path>; if not, re-run the staging step that generates it.","Check that the staged program file and working directory were not removed (e.g. by mx clean or a temp-dir cleanup) between staging and running.","If the path itself is wrong, inspect _get_staged_benchmark_run_config_path() and the staged benchmark name/selector used to confirm they match what was staged."],"exampleFix":"# before\nmx benchmark ... -- -Dnative-image.benchmark.stages=run   # config never staged\n\n# after\nmx benchmark ... -- -Dnative-image.benchmark.stages=config,run   # stage config first, then run","handlingStrategy":"validation","validationCode":"from pathlib import Path\nrun_config = suite._get_staged_benchmark_run_config_path()\nassert Path(run_config).is_file(), f\"stage the benchmark first; missing {run_config}\"","typeGuard":null,"tryCatchPattern":"try:\n    suite.run_stage_run()\nexcept ValueError as e:\n    if 'staged GraalHost run config' in str(e):\n        # re-run the config/stage phase, then retry once\n        raise","preventionTips":["Always run the staging (config) step before the run step in scripted pipelines.","Do not clean temp/staging directories between stages of one benchmark job.","Log the staged run-config path at staging time so a missing file is immediately diagnosable."],"tags":["graalvm","benchmark","graalos","staging","mx"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}