{"record":{"id":"c735619504b95119","repo":"oracle/graal","slug":"unknown-or-unsupported-arch-s","errorCode":null,"errorMessage":"Unknown or unsupported arch: %s","messagePattern":"Unknown or unsupported arch: (.+?)","errorType":"exception","errorClass":"GraalError","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/serviceprovider/GraalServices.java","lineNumber":88,"sourceCode":"            return GraalServices.class.getClassLoader().loadClass(name);\n        } catch (Throwable e) {\n            return null;\n        }\n    }\n\n    /**\n     * Gets a name for the current architecture that is compatible with\n     * {@link Architecture#getName()}.\n     */\n    @LibGraalSupport.HostedOnly\n    private static String getJVMCIArch() {\n        String rawArch = getSavedProperty(\"os.arch\");\n        return switch (rawArch) {\n            case \"x86_64\" -> \"AMD64\";\n            case \"amd64\" -> \"AMD64\";\n            case \"aarch64\" -> \"aarch64\";\n            case \"riscv64\" -> \"riscv64\";\n            default -> throw new GraalError(\"Unknown or unsupported arch: %s\", rawArch);\n        };\n    }\n\n    @LibGraalSupport.HostedOnly\n    @SuppressWarnings(\"unchecked\")\n    private static void addProviders(String arch, Class<?> service) {\n        List<Object> providers = (List<Object>) GraalServices.libgraalServices.computeIfAbsent(service, key -> new ArrayList<>());\n        for (Object provider : ServiceLoader.load(service, GraalServices.class.getClassLoader())) {\n            if (provider instanceof ArchitectureSpecific as && !as.getArchitecture().equals(arch)) {\n                // Skip provider for another architecture\n                continue;\n            }\n            if (provider.getClass().getAnnotation(LibGraalSupport.HostedOnly.class) != null) {\n                // Skip hosted-only providers\n                continue;\n            }\n            providers.add(provider);\n        }","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/serviceprovider/GraalServices.java#L70-L106","documentation":"On the libgraal host side, GraalServices.getJVMCIArch() maps the raw os.arch system property to a Graal Architecture name. Only x86_64/amd64, aarch64, and riscv64 are recognized; any other value (ppc64le, s390x, arm, or a bogus os.arch) throws GraalError('Unknown or unsupported arch').","triggerScenarios":"Initializing libgraal/GraalVM compiler services on hardware outside the supported list, or in an environment where os.arch is set to an unexpected string.","commonSituations":"Running on community-ported architectures (ppc64le, s390x) with a stock GraalVM build; CI runners reporting unusual os.arch values; cross-compilation or container environments with misreported architecture.","solutions":["Run on a supported architecture (x86_64/amd64, aarch64, riscv64) with the matching GraalVM build.","On community-arch hardware, use the community GraalVM build for that arch or disable libgraal/the Graal JIT as applicable.","Print System.getProperty('os.arch') in the failing environment to confirm what the JVM reports."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Gate Graal/libgraal initialization on a recognized architecture\nstatic boolean archSupported() {\n    return switch (System.getProperty(\"os.arch\")) {\n        case \"x86_64\", \"amd64\", \"aarch64\", \"riscv64\" -> true;\n        default -> false;\n    };\n}\nif (!archSupported()) {\n    throw new IllegalStateException(\"Unsupported os.arch=\" + System.getProperty(\"os.arch\") + \" for GraalVM\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin CI and deployment images to supported architectures (x86_64, aarch64, riscv64).","Document the arch matrix for your project; add a startup guard that fails fast with a clear message before Graal initializes."],"tags":["graal","architecture","environment","libgraal","unsupported-platform"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}