{"record":{"id":"3bccde8b6fec88f3","repo":"alibaba/arthas","slug":"unsupported-platform","errorCode":null,"errorMessage":"Unsupported platform: {}-{}","messagePattern":"Unsupported platform: (.+?)-(.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/one/profiler/AsyncProfiler.java","lineNumber":112,"sourceCode":"    private static String getPlatformTag() {\n        String os = System.getProperty(\"os.name\").toLowerCase();\n        String arch = System.getProperty(\"os.arch\").toLowerCase();\n        if (os.contains(\"linux\")) {\n            if (arch.equals(\"amd64\") || arch.equals(\"x86_64\") || arch.contains(\"x64\")) {\n                return \"linux-x64\";\n            } else if (arch.equals(\"aarch64\") || arch.contains(\"arm64\")) {\n                return \"linux-arm64\";\n            } else if (arch.equals(\"aarch32\") || arch.contains(\"arm\")) {\n                return \"linux-arm32\";\n            } else if (arch.contains(\"86\")) {\n                return \"linux-x86\";\n            } else if (arch.contains(\"ppc64\")) {\n                return \"linux-ppc64le\";\n            }\n        } else if (os.contains(\"mac\")) {\n            return \"macos\";\n        }\n        throw new UnsupportedOperationException(\"Unsupported platform: \" + os + \"-\" + arch);\n    }\n\n    /**\n     * Start profiling\n     *\n     * @param event    Profiling event, see {@link Events}\n     * @param interval Sampling interval, e.g. nanoseconds for Events.CPU\n     * @throws IllegalStateException If profiler is already running\n     */\n    @Override\n    public void start(String event, long interval) throws IllegalStateException {\n        if (event == null) {\n            throw new NullPointerException();\n        }\n        start0(event, interval, true);\n    }\n\n    /**","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/alibaba/arthas/blob/21cf2e9ba52b305290be7223b980ff504bb9cb5b/core/src/main/java/one/profiler/AsyncProfiler.java#L94-L130","documentation":"AsyncProfiler.getPlatformTag() throws UnsupportedOperationException when the detected OS/architecture combination does not map to any bundled async-profiler native library. It checks os.name and os.arch system properties: Linux on x64/arm64/arm32/x86/ppc64le, and macOS are supported; everything else fails. The exception is thrown at profiler instance creation, before any profiling can start.","triggerScenarios":"Constructing or initializing AsyncProfiler on an OS/arch combination outside the supported matrix (e.g. Windows, FreeBSD, Linux on RISC-V, Solaris/SPARC).","commonSituations":"Running Arthas profiler commands on Windows (no native async-profiler); on an exotic Linux arch not in the list; os.name/os.arch returning unexpected values (e.g. in a custom JVM or a non-standard OS build); running inside a minimal container that reports a stripped os.name.","solutions":["Run on a supported platform: Linux (x64, arm64, arm32, x86, ppc64le) or macOS.","If on Windows, use WSL2 with a Linux JVM to run the profiler.","Verify os.name and os.arch via -XshowSettings:properties or System.getProperty to confirm the JVM reports expected values.","On a new architecture, check for a newer Arthas/async-profiler build that adds support, or contribute a platform tag."],"exampleFix":"// not a code fix — runtime/platform change\n// before: running on Windows JVM\njava -jar arthas-boot.jar # profiler init throws UnsupportedOperationException\n\n// after: run under WSL2/Linux\nwsl java -jar arthas-boot.jar","handlingStrategy":"validation","validationCode":"String os = System.getProperty(\"os.name\").toLowerCase();\nString arch = System.getProperty(\"os.arch\").toLowerCase();\nif (!(os.contains(\"linux\") || os.contains(\"mac\"))) {\n    // unsupported platform — use alternative diagnostics or run under WSL/Linux\n    throw new UnsupportedOperationException(\"Profiler requires Linux or macOS, got: \" + os);\n}","typeGuard":"public static boolean isProfilerSupportedPlatform() {\n    String os = System.getProperty(\"os.name\").toLowerCase();\n    String arch = System.getProperty(\"os.arch\").toLowerCase();\n    if (os.contains(\"mac\")) return true;\n    if (os.contains(\"linux\")) {\n        return arch.matches(\"amd64|x86_64|.*x64|aarch64|.*arm64|aarch32|.*arm|.*86|.*ppc64\");\n    }\n    return false;\n}","tryCatchPattern":"try {\n    AsyncProfiler profiler = AsyncProfiler.getInstance(libPath);\n} catch (UnsupportedOperationException e) {\n    // platform not supported — fall back to non-native profiling or skip\n    log.warn(\"Async profiler not supported on this platform, skipping\");\n}","preventionTips":["Run profiler commands only on supported OS/arch combinations.","On Windows, use WSL2 with a Linux JVM."],"tags":["arthas","async-profiler","platform","native","unsupported"],"backgroundTag":null,"analyzedSha":"21cf2e9ba52b305290be7223b980ff504bb9cb5b","analyzedAt":"2026-08-14T00:57:07.243Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}