{"record":{"id":"a67a2e7fc075a680","repo":"oracle/graal","slug":"graalos-config-util-finished-unsuccessfully-with-r","errorCode":null,"errorMessage":"graalos-config-util finished unsuccessfully with return code {rc}!","messagePattern":"graalos-config-util finished unsuccessfully with return code (.+?)!","errorType":"exception","errorClass":"ChildProcessError","httpStatus":null,"severity":"error","filePath":"sdk/mx.sdk/mx_sdk_benchmark.py","lineNumber":2355,"sourceCode":"        file_path = self._get_staged_benchmark_run_config_path()\n        binsweep = self._require_executable(build_dir / \"binsweep\" / \"home\" / \"bin\" / \"binsweep\", \"binsweep\")\n\n        extra_config_path = self._create_staged_benchmark_fs_mapping_file()\n        config_util = self._resolve_graalos_config_util()\n        cmd = [\n            str(config_util),\n            \"--host-dir\", str(rootfs),\n            \"--binsweep\", str(binsweep),\n            \"--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}\",","sourceCodeStart":2337,"sourceCodeEnd":2373,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/mx.sdk/mx_sdk_benchmark.py#L2337-L2373","documentation":"Raised after the harness runs graalos-config-util as a subprocess (mx.run with nonZeroIsFatal=False): a nonzero return code means config generation failed. The harness logs captured stderr first, then raises ChildProcessError with the return code so the benchmark aborts instead of running with a missing/partial endpoint config.","triggerScenarios":"The graalos-config-util invocation with --host-dir/--binsweep/--endpoint-config/--extra-config-path fails: bad ROOTFS layout, missing binsweep input, invalid extra config JSON, or a version mismatch between the tool and the harness arguments.","commonSituations":"ROOTFS missing files the tool expects to sweep; corrupted or schema-mismatched extra config; older graalos-config-util on PATH that does not know the flags; disk-full during config write.","solutions":["Read the logged stderr line directly above the exception — it contains the tool's real error message; fix that root cause (paths, config contents).","Update/reinstall graalos-config-util to the version matching this mx SDK revision.","Validate the extra-config-path JSON and the binsweep/rootfs inputs by running graalos-config-util manually with the same arguments shown in the failure."],"exampleFix":"# before (tool fails opaquely inside mx)\nmx benchmark polybench-graalhost\n# ChildProcessError: graalos-config-util finished unsuccessfully with return code 1!\n\n# after (reproduce manually to see stderr, fix inputs, then rerun)\ngraalos-config-util --host-dir \"$ROOTFS\" --binsweep <binsweep> \\\n  --endpoint-config /tmp/t.json --extra-config-path <extra>   # fix reported issue\nmx benchmark polybench-graalhost","handlingStrategy":"retry","validationCode":"import subprocess\nrc = subprocess.run(['graalos-config-util', '--help'], capture_output=True).returncode\nassert rc == 0, 'graalos-config-util is broken; fix/reinstall before benchmarking'","typeGuard":null,"tryCatchPattern":"try/except ChildProcessError; capture mx's logged stderr (printed just before the raise), fix the tool's reported problem (paths/config), then retry the run stage.","preventionTips":["Pin a graalos-config-util version matching the mx SDK revision.","Smoke-test the tool manually with the same arguments before long benchmark runs.","Validate extra-config JSON schema and rootfs contents as part of environment setup."],"tags":["mx","benchmark","graalos","subprocess","child-process","cli-tool"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}