Netflix/Hystrix · critical · RuntimeException
Could not initialize intrinsics
Error message
Could not initialize intrinsics
What it means
Striped64 (Hystrix's port of the JDK's striped counters used by HystrixRollingNumber) needs sun.misc.Unsafe for atomic CAS on striped cells. It first tries theUnsafe directly; under a SecurityManager it retries inside AccessController.doPrivileged, and if that privileged action also fails (PrivilegedActionException), this RuntimeException is thrown - the JVM cannot provide the intrinsics Hystrix requires.
Source
Thrown at hystrix-core/src/main/java/com/netflix/hystrix/util/Striped64.java:354
*
* @return a sun.misc.Unsafe
*/
private static sun.misc.Unsafe getUnsafe() {
try {
return sun.misc.Unsafe.getUnsafe();
} catch (SecurityException se) {
try {
return java.security.AccessController.doPrivileged
(new java.security
.PrivilegedExceptionAction<sun.misc.Unsafe>() {
public sun.misc.Unsafe run() throws Exception {
java.lang.reflect.Field f = sun.misc
.Unsafe.class.getDeclaredField("theUnsafe");
f.setAccessible(true);
return (sun.misc.Unsafe) f.get(null);
}});
} catch (java.security.PrivilegedActionException e) {
throw new RuntimeException("Could not initialize intrinsics",
e.getCause());
}
}
}
}View on GitHub (pinned to 5ce3bc58c3)
Solutions
- Grant reflective access: ensure the security policy does not block sun.misc.Unsafe.theUnsafe (suppressAccessChecks / reflective access permission) for the Hystrix classes.
- Run on a Java version where sun.misc.Unsafe is still exposed (Java 8 is the primary target of this Hystrix line).
- As a last resort, avoid the SecurityManager path that triggers doPrivileged by permitting direct field access, or move off Hystrix's internal counters (upgrade to Hystrix 1.5.4+ / resilience4j where this was addressed).
Defensive patterns
Strategy: validation
Prevention
- Run Hystrix 1.x on Java 7/8 where sun.misc.Unsafe is reliably available.
- Grant reflective access to sun.misc.Unsafe.theUnsafe in SecurityManager policies that apply to Hystrix.
- In hardened/embedded JVMs, validate Unsafe availability at startup before creating command metrics.
When it happens
Trigger: A SecurityManager policy denies reflective access to sun.misc.Unsafe's theUnsafe field (setAccessible(true) fails even when privileged); running Hystrix on JVMs where sun.misc.Unsafe is hidden or removed; very restrictive container/security policies.
Common situations: App servers or Java policy files that forbid accessing sun.misc.* internals; future JDKs (post-unsafe removal) breaking the reflective lookup; embedded/security-hardened runtimes.
Related errors
- method cannot be annotated with HystrixCommand and HystrixCo
- Collapser method must have one argument: {}
- batch method is absent: {}
- required batch method for collapser is absent, wrong generic
- Return type of batch method must be java.util.List parametri
AI-assisted analysis of Netflix/Hystrix@5ce3bc58c3 (2026-08-14).
Data as JSON: /api/errors/831fc8cc6b57ba85.
Report an issue: GitHub.