JVM crash in lucene

Solution Unverified - Updated -

Environment

  • JBoss Enterprise Application Platform (EAP)
  • Lucene

Issue

  • JBoss crashes with the hs_err file indicating a crash in an array copy from Lucene's MMap index:
Register to memory mapping:

RAX=0x00002aad887c31ab is an unknown value
RBX=0x0000000000000000 is an unknown value
RCX=0x0000000000000400 is an unknown value
RDX=0xffffffffffffff84 is an unknown value
RSP=0x0000000050c48660 is pointing into the stack for thread: 0x00002aaac084d000
RBP=0x0000000050c48660 is pointing into the stack for thread: 0x00002aaac084d000
RSI=0x00000006e26ea1b0 is an oop
[B 
 - klass: {type array byte}
 - length: 1024
RDI=0x00002aad887c31a3 is an unknown value
R8 =0x00002aad887c2dab is an unknown value
R9 =0x00000000000e8dab is an unknown value
R10=StubRoutines::unsafe_arraycopy [0x00002aaaab824b00, 0x00002aaaab824b3b[ (59 bytes)R11=0x00000006e26e9498 is an oop
org.apache.lucene.store.MMapDirectory$MMapIndexInput 
 - klass: 'org/apache/lucene/store/MMapDirectory$MMapIndexInput'
R12=0x0000000000000000 is an unknown value
R13=0x00000006e26e9528 is an oop
java.nio.DirectByteBufferR 
 - klass: 'java/nio/DirectByteBufferR'
R14=0x00002aad887c31ab is an unknown value
R15=0x00002aaac084d000 is a thread


Stack: [0x0000000050b4b000,0x0000000050c4c000],  sp=0x0000000050c48660,  free space=1013k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
v  ~StubRoutines::jbyte_disjoint_arraycopy

Resolution

  • Consider using NIOFS instead of MMap
  • Upgrade to the latest Lucene and JDK updates to consume relevant fixes

Root Cause

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments