NFA: Java 17 Crash after migration or upgrade
search cancel

NFA: Java 17 Crash after migration or upgrade

book

Article ID: 435047

calendar_today

Updated On:

Products

Network Observability Network Flow Analysis

Issue/Introduction

If you run into java errors like the below after upgrading or migrating DX NetOps Network Flow Analysis or other products:

# A fatal error has been detected by the Java Runtime Environment:

#

#  Internal Error (codeBuffer.cpp:972), pid=2120, tid=7240

#  guarantee(sect->end() <= tend) failed: sanity

#

# JRE version:  (17.0.14+7) (build )

# Java VM: OpenJDK 64-Bit Server VM (17.0.14+7, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)

# Core dump will be written. Default location: D:\CA\NFA\jre\bin\hs_err_pid2120.mdmp

Environment

DX NetOps NFA with OpenJDK 17.0.14

Intel Xeon (Icelake) processor with AVX-512 instruction sets enabled

Cause

There is a known bug in OpenJDK 17 (and other versions) where the C2 JIT compiler miscalculates buffer sizes when emitting highly optimized AVX-512 vector instructions on Icelake and Sapphire Rapids architectures.

Resolution

You can bypass this bug entirely by instructing the JVM to limit its vectorization instructions to AVX2 instead of AVX-512. This is the standard, most reliable workaround for this exact crash and will have a negligible impact on standard application performance.

Add the following flag to your Java startup command or environment arguments: -XX:UseAVX=2

In the Windows Environment Variables window, look at the bottom half under System variables (do not use User variables, or your background services won't see it).

  1. Click the New... button under the System variables section.
  2. In the Variable name box, type exactly: _JAVA_OPTIONS
  3. In the Variable value box, type: -XX:UseAVX=2
  4. Click OK on the New System Variable window.
  5. Click OK on the Environment Variables window.
  6. Click OK on the System Properties window to apply the change
  7. Reboot