{"record":{"id":"3cee910f192addab","repo":"oracle/graal","slug":"native-image-benchmarks-do-not-support-additional","errorCode":null,"errorMessage":"Native Image benchmarks do not support additional options, besides the file name, with --bundle-create: {arg}","messagePattern":"Native Image benchmarks do not support additional options, besides the file name, with --bundle-create: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdk/mx.sdk/mx_sdk_benchmark.py","lineNumber":543,"sourceCode":"            mx.copyfile(cached_bundle_path, bundle_copy_path)\n            return bundle_copy_path\n\n        return None\n\n    def get_bundle_create_path_if_present(self) -> Path | None:\n        \"\"\"\n        Scans the image build arguments and looks for ``--bundle-create``\n\n        :return: Absolute path of the bundle's ``.output`` directory if ``--bundle-create`` was given, otherwise ``None``\n        \"\"\"\n        bundle_create_arg = \"--bundle-create=\"\n\n        for arg in self.extra_image_build_arguments:\n            if arg.startswith(bundle_create_arg):\n                bundle_spec = arg[len(bundle_create_arg):]\n\n                if \",\" in bundle_spec:\n                    raise RuntimeError(\n                        f\"Native Image benchmarks do not support additional options, besides the file name, with --bundle-create: {arg}\")\n\n                assert bundle_spec.endswith(\n                    BUNDLE_EXTENSION), f\"--bundle-create path must end with {BUNDLE_EXTENSION}, was {bundle_spec}\"\n                bundle_path = Path(bundle_spec[:-len(BUNDLE_EXTENSION)] + \".output\")\n\n                return bundle_path.absolute()\n            elif arg == \"--bundle-create\":\n                return self.output_dir / f\"{self.final_image_name}.output\"\n\n        return None\n\n\nclass BenchOutStream:\n    \"\"\"\n    Writes incoming data to both the given text file and callable output stream.\n\n    Is callable itself and can also be passed to the ``print`` function.","sourceCodeStart":525,"sourceCodeEnd":561,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/mx.sdk/mx_sdk_benchmark.py#L525-L561","documentation":"Raised while scanning extra image build arguments for --bundle-create: the value after --bundle-create= may only be a bundle file name, not a comma-separated option list. A comma in the bundle spec means someone tried to pass extra bundle options (e.g. '...nib,--compress') which the benchmark harness cannot support, so it fails fast with RuntimeError.","triggerScenarios":"Running a native-image benchmark with extra_image_build_arguments containing e.g. '--bundle-create=/tmp/b.bundles/mybench.nib,overwrite' — any ',' after the '=' triggers it during get_image_output_dir / bundle scanning.","commonSituations":"Copy-pasting a --bundle-create invocation from native-image docs (where comma-separated bundle options are legal) into mx benchmark extra args; CI configs that bundle images for later replay.","solutions":["Remove everything after the comma: pass only the bundle path, e.g. --bundle-create=/path/mybench.nib.","Put other native-image options as separate entries in extra_image_build_arguments, not inside --bundle-create.","Keep the .nib extension — a follow-up assert requires it."],"exampleFix":"# before\nextra_image_build_arguments=['--bundle-create=/tmp/b.nib,--create-sbom']\n\n# after\nextra_image_build_arguments=['--bundle-create=/tmp/b.nib', '--create-sbom']","handlingStrategy":"validation","validationCode":"bundle_args = [a for a in extra_image_build_arguments if a.startswith('--bundle-create=')]\nfor a in bundle_args:\n    spec = a.split('=', 1)[1]\n    assert ',' not in spec, f'options not allowed in --bundle-create: {a}'\n    assert spec.endswith('.nib'), f'bundle must end with .nib: {spec}'","typeGuard":null,"tryCatchPattern":"try/except RuntimeError around the benchmark launch; on this message, strip the comma-suffix from --bundle-create and retry once.","preventionTips":["Pass bundle path only in --bundle-create; other flags go as separate args.","Always end bundle specs with the .nib extension.","Keep a lint check on extra_image_build_arguments in CI config review."],"tags":["mx","benchmark","native-image","bundle","configuration"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}