alibaba/arthas · error · UnsupportedOperationException
Unsupported platform: {}-{}
Error message
Unsupported platform: {}-{} What it means
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.
Source
Thrown at core/src/main/java/one/profiler/AsyncProfiler.java:112
private static String getPlatformTag() {
String os = System.getProperty("os.name").toLowerCase();
String arch = System.getProperty("os.arch").toLowerCase();
if (os.contains("linux")) {
if (arch.equals("amd64") || arch.equals("x86_64") || arch.contains("x64")) {
return "linux-x64";
} else if (arch.equals("aarch64") || arch.contains("arm64")) {
return "linux-arm64";
} else if (arch.equals("aarch32") || arch.contains("arm")) {
return "linux-arm32";
} else if (arch.contains("86")) {
return "linux-x86";
} else if (arch.contains("ppc64")) {
return "linux-ppc64le";
}
} else if (os.contains("mac")) {
return "macos";
}
throw new UnsupportedOperationException("Unsupported platform: " + os + "-" + arch);
}
/**
* Start profiling
*
* @param event Profiling event, see {@link Events}
* @param interval Sampling interval, e.g. nanoseconds for Events.CPU
* @throws IllegalStateException If profiler is already running
*/
@Override
public void start(String event, long interval) throws IllegalStateException {
if (event == null) {
throw new NullPointerException();
}
start0(event, interval, true);
}
/**View on GitHub (pinned to 21cf2e9ba5)
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.
Example fix
// not a code fix — runtime/platform change // before: running on Windows JVM java -jar arthas-boot.jar # profiler init throws UnsupportedOperationException // after: run under WSL2/Linux wsl java -jar arthas-boot.jar
Defensive patterns
Strategy: validation
Validate before calling
String os = System.getProperty("os.name").toLowerCase();
String arch = System.getProperty("os.arch").toLowerCase();
if (!(os.contains("linux") || os.contains("mac"))) {
// unsupported platform — use alternative diagnostics or run under WSL/Linux
throw new UnsupportedOperationException("Profiler requires Linux or macOS, got: " + os);
} Type guard
public static boolean isProfilerSupportedPlatform() {
String os = System.getProperty("os.name").toLowerCase();
String arch = System.getProperty("os.arch").toLowerCase();
if (os.contains("mac")) return true;
if (os.contains("linux")) {
return arch.matches("amd64|x86_64|.*x64|aarch64|.*arm64|aarch32|.*arm|.*86|.*ppc64");
}
return false;
} Try / catch
try {
AsyncProfiler profiler = AsyncProfiler.getInstance(libPath);
} catch (UnsupportedOperationException e) {
// platform not supported — fall back to non-native profiling or skip
log.warn("Async profiler not supported on this platform, skipping");
} Prevention
- Run profiler commands only on supported OS/arch combinations.
- On Windows, use WSL2 with a Linux JVM.
When it happens
Trigger: Constructing or initializing AsyncProfiler on an OS/arch combination outside the supported matrix (e.g. Windows, FreeBSD, Linux on RISC-V, Solaris/SPARC).
Common situations: 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.
Related errors
- Can not find libasyncProfiler so, please check the arthas di
- ERROR: arthas vmtool Unable to create jvmtiEnv, GetEnv faile
- ERROR: arthas vmtool JVMTI AddCapabilities failed!%u
- Arthas server port binding failed! Please check $HOME/logs/a
- can not getResources arthas-bin.zip from classloader: ${clas
AI-assisted analysis of alibaba/arthas@21cf2e9ba5 (2026-08-14).
Data as JSON: /api/errors/3bccde8b6fec88f3.
Report an issue: GitHub.