title: JVM crashes on Lucene DataInput.readVInt
body: <p>My JVM (1.6.0_29) keeps crashing on intensive use when indexing documents with Lucene.
  I get:</p>
  
  <pre><code>#
  # A fatal error has been detected by the Java Runtime Environment:
  #
  #  SIGSEGV (0xb) at pc=0x00002b6b196d767c, pid=26417, tid=1183217984
  #
  # JRE version: 6.0_29-b11
  # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.4-b02 mixed mode linux-amd64 compressed oops)
  # Problematic frame:
  # J  org.apache.lucene.store.DataInput.readVInt()I
  #
  # If you would like to submit a bug report, please visit:
  #   http://java.sun.com/webapps/bugreport/crash.jsp
  #
  </code></pre>
  
  <p>Environment:</p>
  
  <p>JDK: 1.6u29  (same issue with 1.6_02)
  Lucene Version 3.4.0</p>
  
  <p>vm_info: Java HotSpot(TM) 64-Bit Server VM (20.4-b02) for linux-amd64 JRE (1.6.0_29-b11), built on Oct  3 2011 01:19:20 by "java_re" with gcc 3.2.2 (SuSE Linux)</p>
  
  <p>OS:CentOS release 5.0 (Final)</p>
  
  <p>jvm_args: -Dcatalina.home=/var/local/tomcat-8081 -Dcatalina.base=/var/local/tomcat-8081 -Djava.io.tmpdir=/var/tmp -Dfile.encoding=UTF-8 -Xmx1024M -XX:MaxPermSize=96m</p>
  
  <p>It seems to be a jdk issue that was fixed in jdk 1.7, but other issues where introduced.
  <a href="https://issues.apache.org/jira/browse/LUCENE-3335" rel="nofollow">https://issues.apache.org/jira/browse/LUCENE-3335</a>
  "Java 7 contains a fix to the readVInt issue since 1.6.0_21 (approx, LUCENE-2975)"</p>
  
  <p>So, how can I fix this issue using JDK 1.6? 
  Should I upgrade to jdk 1.7?</p>