More on Java 7 Bug: Q&A with Uwe, Comments from Geir
If you've been watching the Java SE 7 release news, you know about the bug reported by the Apache Lucene community last week. The long-awaited release of a new version of standard Java apparently contains hotspot compiler optimizations that miscompile some loops, which can cause the JVMs in some Apache projects to crash and even result in incorrectly calculated results leading to bugs in some applications.
"It is strongly recommended not to use any hotspot optimization switches in any Java version without extensive testing!" Apache Lucene's warning (here, scroll down to "news" section) concluded.
Lucene and Solr committer and Project Management Committee (PMC) member Uwe Schindler reached out to Oracle to report this issue about five days before the release. He connected with Vladimir Kozlov, principal member of the technical staff at Oracle who works on the Hotspot VM and the JIT Server compiler (and who worked at Sun from 1999). Kozlov responded via the public Oracle Hotspot mailing list that,"All loop optimization fixes will go definitely into jdk7 update 2. We will try to push them into update 1 (which is targeted only for security fixes) but we can't promise…."
Lucene currently ranks among the top 15 open source projects on the Open Source Census, and with installations at over 4,000 companies, it's one of the top 5 Apache projects. The company that provides commercial backing for both the Lucene and Solr projects, Lucid Imagination, is based in San Mateo, Calif.
But Uwe, the guy I wanted to chat with about this issue, lives in Bremen, Germany. We tried to connect via Skype, but I suffer from Time Zone Dyslexia, a tragically untreatable condition that prevented me from calculating the time difference between Silicon Valley, where I live, and Uwe's home, so he graciously answered some questions via e-mail. Here's the Q&A:
JKW: The analysts I've spoken with say that they haven't heard "widespread" complaints about this bug. How serious is this issue for anyone outside the Lucene community?
Uwe: The bugs mentioned in the announcement mail have different severity. The one that crashes the JVM (the Porter-Stemmer bug) is in my opinion only minor, because it crashes your JVM and you know: There is a bug. Oracle now ranks this bug "HIGH," as it was reported by the Lucene committers, is easy reproducible, and shows that they are doing something.
More serious are index corruptions caused by the wrong loop optimizations (those bugs are currently ranked "MEDIUM" at the Oracle bug tracker and [have existed for] several months, but were not fixed for the JDK release). Without very intensive testing (you have to index a lot of documents to produce huge full-text indexes), you will not find them. So without our warning, it might happen that all your test cases work fine and then in production, when your shop has ten thousand articles, you suddenly corrupt your search index and your web site is offline.
The Lucene developers were feeling that they had to inform the users on the Web page and mailing lists about the problems to prevent people [from] complaining about Lucene and Solr and open bug reports that cannot be handled.
JKW: I guess there's no pressing need to upgrade to Java SE 7 in the short term. Can't Lucene shops just run existing workloads on stable Java 6 configurations?
Uwe: That's what we recommend. It was a rule from the 1990s that you should never use a software release with a 0 on the minor version. This is also true here. Most installations of Lucene are based on Apache Solr, which provides an enterprise search platform. Those installations are generally server side, so administrators will for sure test it before they upgrade to Java 7.
The problems are more [about] Lucene installations as part of desktop search engines or other Java-based search applications running on users' computers. Windows computers that might soon be upgraded automatically by Oracle's online Java update could then be affected. A simple example (mentioned on Stack Overflow http://tinyurl.com/44pqov3) is, the Eclipse IDE. If you let it run with the just-released Java 7 and open the online help, it will simply crash, because Lucene is part of every Eclipse installation.
JKW: Are you concerned that Oracle might not take this seriously, given their strained relationship with the Apache community?
Uwe: Oracle took action by changing the priority of the related bugs. I don't think they will try to belittle the problem, because the developers and journalists put a lot of stress on them.
I also asked Uwe to comment on a statement I heard from one analyst: "It's hard to avoid the conclusion that this complaint is related to ongoing tensions between Oracle and the Apache Software Foundation." But this wasn't his cup of tea, so I turned to Geir Magnusson, Jr., director of the Apache Software Foundation.
"This absolutely has nothing to do with the tensions between Oracle and the ASF," Magnussen said. "Lucene and Solr are very popular and important pieces of software, used throughout the world for mission-critical applications. The project served the Solr and Lucene user community by informing them of these problems, problems that can result in data corruption and data loss."
He also noted that there was "no condemnation of Oracle" in the alert from the Lucene project, just an assessment of the problem, some references to bug reports in the Oracle Java bug tracking system, and workarounds for users where possible. But he did add, "One might argue they [the Lucene people] are too forgiving, since Oracle knew before release, but given this is a bug warning rather than an editorial, it's the right tone."
Posted by John K. Waters on August 2, 2011 at 10:53 AM