Software QA FYI - SQAFYI

Just how serious the bugs in JDK7 really are?

By:

After the warning from Apache committers , the recently released Java 7 could cause crashes of the Java Virtual Machine as well as calculation errors, Oracle has set the priority of the corresponding bug requests from "low" to "High". Eine Maßnahme, die von Community-Vertretern begrüßt wurde, die allerdings die Frage nicht aus der Welt räumt, ob die JDK7-Fehler nicht eigentlich so schwerwiegend sind, dass sie eine Verschiebung des Release-Termins gerechtfertigt hätten. A measure that was welcomed by community representatives, but the question is not removed from the world, whether the error is not actually JDK7 are so severe that they are shifting the release date would be justified.

Sowohl Pro- als auch Contra-Positionen waren in der Community bereits zu hören. Both pro and contra positions were heard in the community already. So vergleicht etwa Java-Experte Cay Horstmann von der San Jose State University den Bug in seinem Blog mit dem Problem des fehlerhaften Pentium-Chips aus dem Jahre 1994. For example, Java expert Cay Horstmann by the San Jose State University, compares the bow in his blog with the problem of faulty Pentium chips from the year 1994. Besonders schwerwiegend ist der JDK7-Fehler für Horstmann nicht deshalb, weil es durch die neuen Schleifen-Optimierungen des Compilers zu Abstürzen kommen kann. Particularly serious is the JDK7 error for Horstmann, not because it can come through the new loop optimizations the compiler to crash. Crashes sind schließlich offensichtlich als Bug zu erkennen. Crashes are finally evident to recognize as a bug. Weitaus gefährlicher seien die Berechnungsfehler, die – anscheinend unter noch nicht ganz geklärten Umständen – gelegentlich auftreten können. Far more dangerous are the calculation errors - may occasionally occur - apparently not quite under unclear circumstances.

I try not to be a scaredy squirrel about these things, but I must say that “rarely happening” bugs in a widely used platform bother me. Cay Horstmann I try not to be a scaredy squirrel about these things, but I must say that "rarely happening," bugs in a widely used platform bother me. Cay Horstmann Beim Chip-Desaster von 1994 habe Intel von dem Fehler gewusst, aber entschieden, den Chip trotzdem auszuliefern. When chip-disaster of 1994, Intel was aware of the mistake, but decided to ship the chip anyway. Hat Oracle nun dieselbe Entscheidung getroffen? Oracle has now made the same decision?

A rare crash is manageable, but silently getting the wrong result is not. A rare crash is manageable, but silently getting the wrong result is not. I would have expected this to be a high priority bug. I would have expected this to be a high priority bug. Don't they have criteria for this that say “Hotspot produces wrong result ? take it seriously”? Do not they have criteria that say for this "hot spot produces wrong result ? take it seriously"? As it is, it just looks bad. As it is, it just looks bad. Oracle had promised to ship JDK 7 by the end of July. Oracle had promised to ship by the end of JDK 7 July. Was that considered more important than to fix a showstopper bug? Cay Horstmann Was that considered more important than to fix a showstopper bug? Cay Horstmann

Apache Lucene PMC-Mitglied Uwe Schindler hatte mit seiner Warnung an die Apache-Mailinglisten die entdeckten Fehler am vergangenen Freitag in der Öffentlichkeit bekannt gemacht. Apache Lucene PMC Member Uwe Schindler had his warning to the Apache mailing lists discovered the error last Friday, made known to the public. Nun hat er in einem neuen Blogeintrag die Hintergründe genauer dargestellt. Now he has a new blog entry shown in more detail about the background.

Demnach seien die Fehler erstmals am 23. Accordingly, the mistakes were the first time on 23 Juli beim Versuch aufgefallen, den seit Juni verfügbaren JDK 7 Release Candidate (Build 147) gegen die Apache Lucene/Solr-Projekte zu testen. July at the trial noticed the JDK available to test since June 7 Release Candidate (Build 147) against the Apache Lucene / Solr projects. In der Default-Einstellung der Hotspot-VM kam es dabei zu Abstürzen im Zusammenhang mit dem PorterStemmer-Algorithmus, der von Lucene für das Erstellen von Suchindexen genutzt wird (das sogennante Suffix Stripping: verschiedene morphologische Varianten eines Wortes werden auf ihren gemeinsamen Wortstamm zurückgeführt). In the default setting of the Hotspot VM, it helps to crashes in connection with the Porter stemmer algorithm, which is used by Lucene to create search indexes (the so called suffix stripping: different morphological variants of a word can be traced to their common root word) .

Der Bug wurde unter der Nummer 7070134 gemeldet, am darauffolgenden Montag dann von Oracle mit der Priorität "Niedrig" akzeptiert. The bow was under the number 7070134 registered, accepted the following Monday, then Oracle with the priority "low". Am Veröffentlichungstermin des JDK 7, am 28. At the publication date of the JDK 7, 28 Juli, war der Bug nicht behoben. July was not fixed the bug. Schindler wundert sich in seinem Blog, dass seit der Verfügbarmachung des Release Candidates offensichtlich überhaupt keine gemeldeten Bugs mehr bearbeitet wurden. Schindler wonders in his blog that obviously since making available the release candidate of no more reported bugs have been worked.

So Oracle ignored all bugs (not only ours) in the preview release and simply released a one month old package! Said Oracle ignored all bugs (not only ours) in the preview release and simply released a one month old package! So what was the sense of the preview release? So what was the sense of the preview release? They could have released it one month before! They could have released it one month before! It was for sure not intended for public review and bug hunting! Uwe Schindler It was for sure not intended for public review and bug hunting! Uwe Schindler

Doch wie steht es nun um die Schwere der JDK7-Fehler? But as it stands now by the heaviness of JDK7 error?

Lucene-Committer Robert Muir bemerkt in einer Antwort auf die Frage How serious is the Java7 “Solr/Lucene” bug? , dass der Bug durchaus gravierender ausfalle, als bei früher aufgetretenen Fehlern bei der Schleifenoptimierung. Lucene committer Robert Muir noticed in an answer to the question How serious is the java7 "Solr / Lucene" bug? that the bug also turn out worse than in earlier errors that have occurred in the optimization loop.

I'd say this bug is much sneakier than previous loop optimizer hotspot bugs we have hit (eg sign-flip stuff, https://issues.apache.org/jira/browse/LUCENE-2975 ). I'd say this bug is much sneakier than previous loop optimizer bugs we have hit hotspot (eg sign-flip stuff, https://issues.apache.org/jira/browse/LUCENE-2975 ). In that case we got wacky negative document deltas, which make it easy to catch. In that case we got wacky document negative deltas, Which make it easy to catch. We also only had to manually unroll a single method to dodge it. So we only had to manually unroll a single method to dodge it. On the other hand, the only "test" we had initially for that was a huge 10GB index of http://www.pangaea.de/ , so it was painful to narrow it down to this bug. Robert Muir On the other hand, the only "test" for that we had initially was a huge 10GB of index http://www.pangaea.de/ , so it was painful to narrow it down to this bug. Robert Muir

In this case, I spent a good amount of time (eg every night last week) trying to manually unroll/inline various things, trying to create some workaround so we could dodge the bug and not have the possibility of corrupt indexes being created. In this case, I spent a good amount of time (eg every night last week) trying to manually unroll / inline various things, not trying to create some workaround so we could dodge the bug and have the Possibility of corrupt indexes being created. I could dodge some cases, but there were many more cases I couldn't... I could dodge some cases, but there were many more cases I could not ... and I'm sure if we can trigger this stuff in our tests there are more cases out there... Robert Muir and I'm sure if we can trigger this stuff in our tests there are more cases out there ... Robert Muir

Sind deshalb Berichte gerechtfertigt, die vor einer generellen Verwendung des JDK7 warnen und mit Titeln wie " Don't Use Java 7, For Anything " daherkommen? Are therefore justified reports that warn of a general use of JDK7 and with titles like " Do not Use Java 7 For Anything come along "?

Software-Architekt Markus Eisele relativiert in seinem Blog : Zunächst einmal betreffen die beschriebenen Probleme nicht Java 7 als ganzes, sondern die Hotspot Java Virtual Machine. Software architect Markus Eisele puts in his blog : First of all, concern the problems described are not Java 7 as a whole, but the Hotspot Java Virtual Machine. Warnungen für das gesamte JDK7 auszusprechen, ist für Eisele deshalb kaum angebracht – schon gar nicht, wenn die Community fast fünf Jahre auf ein neues JDK hat warten müssen. Issuing warnings for the entire JDK7 is therefore hardly appropriate for Eisele - especially not if the community has almost five years on a new JDK will have to wait.

Eisele geht die drei relevanten Bugmeldungen ( 7070134 , 7044738 , 7068051 ) Stück für Stück durch und kommt zu dem Schluss: Es ist zwar nicht auszuschließen, als JDK7-Anwender von den Bugs betroffen zu sein. Eisele is the three relevant bug reports ( 7,070,134 , 7044738 , 7068051 through) piece by piece, and concludes: It is not impossible as too JDK7-users be affected by the bugs. Zurzeit aber nur, wenn die eigene Software über Teile verfügt, die von den Hotspot-Optimierungen Gebrauch machen – und das auch in Java 6, wenn die Optimierungs-Einstellungen -XX:+OptimizeStringConcat oder -XX:+AggressiveOpts , die bei Java 7 zu den Default-Einstellungen gehören, aktiviert sind. Currently, however, only if the software has its own parts, which make use of the hotspot optimizations - and also in Java 6, if the optimization settings-XX: + OptimizeStringConcat or-XX: + AggressiveOpts that in Java 7 to The default settings are, are activated.

Für "durchschnittliche Anwendungsfälle" seien die Fehler indes unbedeutend. For "average use cases" the errors are, however, insignificant.

But for the average use cases this will not affect you. Markus Eisele But for the average use cases this will not affect you. Markus Eisele

Aufgrund der kurzen Zeit seit der Bugmeldung ständen noch keine Fixes zur Verfügung - damit könne man aber in einem der nächsten Service Releases rechnen. Due to the short time since the bug requests no fixes were available - so you could but expect in an upcoming service releases.

Full article...


Other Resource

... to read more articles, visit http://sqa.fyicenter.com/art/

Just how serious the bugs in JDK7 really are?