In association with heise online

29 July 2011, 11:58

Java 7 paralyses Lucene and Solr

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Apache and cold Java art The hotspot compiler in the recently released Java 7 has a defective optimiser that can cause flawed loops, according to a warning published by the Apache Software Foundation. As a result, the Java Virtual Machine can crash, and calculations can produce incorrect results.

A number of Apache projects are affected, including every published version of Lucene and Solr. The Apache developers say that the indexing of documents on Solr causes Java to crash. Loops in Lucene can also be incorrectly compiled, thereby corrupting the indexes. In particular, the trunk version of Lucene with the pulsing codec is affected.

The bugs were discovered only five days before Java 7 was published; Oracle says it will correct them in the second service release of Java 7 at the latest; the first update to Java 7 was reserved solely for security fixes, but the issue may prompt Oracle to change that plan. Until then though, users of Lucene and Solr should refrain from using the new version of Java or at least use the JVM option -XX:-UseLoopPredicate to disable the optimisation and prevent the index from being damaged.

The Apache developers say that users of Java 6 could also be affected. However, the flaws only occur in Java 6 when the JVM is used with the options -XX:+OptimizeStringConcat or -XX:+AggressiveOpts which activate normally disabled Hotspot optimisations.

Oracle has registered the flaws under 7070134, 7044738 and 7068051. The first one causes JVM to crash when Martin Porter's stemmer algorithm is used, which traces English words back to their stems. This flaw currently is of "low priority" while the others are "medium".


Print Version | Send by email | Permalink:

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit