{"record":{"id":"cc031363fc615572","repo":"oracle/graal","slug":"guest-launcher-guest-launcher-does-not-resolve","errorCode":null,"errorMessage":"Guest launcher '{guest_launcher}' does not resolve to a file!","messagePattern":"Guest launcher '(.+?)' does not resolve to a file!","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdk/mx.sdk/mx_sdk_benchmark.py","lineNumber":2090,"sourceCode":"            cmd = [self.launcher, str(self.staged_program_file_path)]\n            s.execute_command(self, cmd)\n\n    def get_stage_runner(self) -> SimpleStageRunner:\n        return SimpleStageRunner(self.stages_info, self.bmSuite, self.stages_context)\n\n\nclass PolyBenchEmscriptenHostVm(PolyBenchStagingVm):\n    \"\"\"Host VM that implements Emscripten used for running staged PolyBench programs through a guest-provided launcher.\"\"\"\n    def run_stage_run(self):\n        vm = bm_exec_context().get(\"vm\")\n        if not isinstance(vm, PolyBenchEmscriptenGuestVm):\n            mx.abort(f\"{self.__class__.__name__} expects a PolyBenchEmscriptenGuestVm guest VM in the execution context.\")\n        if vm.host_vm() != self:\n            mx.abort(f\"Guest VM '{vm.name()}:{vm.config_name()}' is not hosted by '{self.name()}:{self.config_name()}'.\")\n\n        guest_launcher = vm.guest_launcher(self)\n        if not Path(guest_launcher).is_file():\n            raise ValueError(f\"Guest launcher '{guest_launcher}' does not resolve to a file!\")\n        with self.get_stage_runner() as s:\n            cmd = [self.launcher, guest_launcher, str(self.staged_program_file_path)]\n            s.execute_command(self, cmd)\n\n\nclass PolyBenchEmscriptenGuestVm(mx_benchmark.GuestVm):\n    \"\"\"Abstract PolyBench Guest VM entry for running on an Emscripten host VM.\"\"\"\n    def __init__(self, host_vm=None):\n        super().__init__(host_vm)\n        self._guest_run_on_java_home_value = None\n        self._guest_run_on_java_home_set = False\n\n    def guest_launcher(self, host_vm: PolyBenchEmscriptenHostVm) -> str:\n        \"\"\"\n        Return the launcher executable that the Emscripten host should invoke for this guest.\n        The returned path must resolve to a file and is used as the first command element.\n        \"\"\"\n        raise NotImplementedError()","sourceCodeStart":2072,"sourceCodeEnd":2108,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/mx.sdk/mx_sdk_benchmark.py#L2072-L2108","documentation":"Raised by the Emscripten host VM in run_stage_run: the guest VM's launcher path (produced by vm.guest_launcher(self)) must be an existing file, because the host will exec it to run the staged program. A missing file means the guest image/staging stage did not produce the expected launcher, and a ValueError aborts the stage.","triggerScenarios":"Running the 'run' stage of a PolyBench Emscripten benchmark where the guest VM (e.g. a GraalWasm/GraalJS guest) did not generate its launcher file, or the guest_launcher() path points into a clean/rotated output directory.","commonSituations":"Running the run stage without a prior successful image stage (staged-benchmark output missing), stale output dirs from previous runs, or a mismatch between guest and host VM configs in the mx benchmark invocation.","solutions":["Re-run the full staged pipeline (image stage then run stage) so the guest launcher is generated under the image output dir.","Verify the guest/host VM pairing in the benchmark command matches (host must be PolyBenchEmscriptenHostVm and guest PolyBenchEmscriptenGuestVm).","Check that the output directory was not cleaned between stages; inspect vm.guest_launcher(self) return value manually."],"exampleFix":"# before\nmx benchmark polybench-js -- --stages=run   # launcher not yet generated\n\n# after\nmx benchmark polybench-js -- --stages=image,run","handlingStrategy":"validation","validationCode":"launcher_path = Path(guest_vm.guest_launcher(host_vm))\nif not launcher_path.is_file():\n    sys.exit(f\"guest launcher missing at {launcher_path}; run the image stage first\")","typeGuard":null,"tryCatchPattern":"try/except ValueError around the run stage; if raised, re-run the image stage then retry the run stage once.","preventionTips":["Always run stages as image,run in one invocation for staged benchmarks.","Do not clean output dirs between stages.","Assert guest/host VM pairing before starting long benchmark jobs."],"tags":["mx","benchmark","polybench","emscripten","staging"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}