Wednesday Feb 17, 2010

OpenJDK 6: b18 regression test results

Running with the usual jtreg flags, -a -ignore:quiet in all repositories and adding -s for langtools, the basic regression test results on Linux for OpenJDK 6 build 18 are:

  • HotSpot, 24 tests passed.

  • Langtools, 1,355 tests passed.

  • JDK, 3,148 tests pass, 19 fail, and 2 have errors.

All the HotSpot tests continue to pass:

0: b17-hotspot/summary.txt  pass: 24
1: b18-hotspot/summary.txt  pass: 24

No differences

In langtools all the tests continue to pass and one test was added:

0: b17-langtools/summary.txt  pass: 1,354
1: b18-langtools/summary.txt  pass: 1,355

0      1      Test
---    pass   tools/javac/T6855236.java

1 differences

And in jdk, a few dozen new tests were added in b18 and the existing tests have generally consistent results, with a number of long-standing test failures corrected by Pavel Tisnovsky. The test run below was executed outside of Sun's and Oracle's wide-area network using the following contents for the testing network configuration file:

host=icedtea.classpath.org
refusing_host=ns1.gnu.org
far_host=developer.classpath.org

The file location to use for the networking configuration can be set by passing a -e JTREG_TESTENV=Path to file option to jtreg.

0: b17-jdk/summary.txt  pass: 3,118; fail: 26
1: b18-jdk/summary.txt  pass: 3,148; fail: 19; error: 2

0      1      Test
---    pass   com/sun/java/swing/plaf/nimbus/Test6741426.java
---    pass   com/sun/java/swing/plaf/nimbus/Test6849805.java
---    pass   com/sun/jdi/BreakpointWithFullGC.sh
---    pass   com/sun/jdi/ResumeOneThreadTest.java
---    pass   com/sun/jdi/SimulResumerTest.java
---    pass   demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java
fail   pass   java/awt/Frame/DynamicLayout/DynamicLayout.java
fail   pass   java/awt/Frame/MaximizedToIconified/MaximizedToIconified.java
fail   pass   java/awt/Frame/ShownOffScreenOnWin98/ShownOffScreenOnWin98Test.java
fail   pass   java/awt/Frame/UnfocusableMaximizedFrameResizablity/UnfocusableMaximizedFrameResizablity.java
---    pass   java/awt/GraphicsDevice/CloneConfigsTest.java
fail   pass   java/awt/GridLayout/LayoutExtraGaps/LayoutExtraGaps.java
fail   pass   java/awt/Insets/CombinedTestApp1.java
fail   pass   java/awt/KeyboardFocusmanager/TypeAhead/ButtonActionKeyTest/ButtonActionKeyTest.html
fail   pass   java/awt/KeyboardFocusmanager/TypeAhead/MenuItemActivatedTest/MenuItemActivatedTest.html
fail   pass   java/awt/KeyboardFocusmanager/TypeAhead/SubMenuShowTest/SubMenuShowTest.html
fail   pass   java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.html
pass   fail   java/awt/Multiscreen/LocationRelativeToTest/LocationRelativeToTest.java
fail   pass   java/awt/TextArea/UsingWithMouse/SelectionAutoscrollTest.html
fail   pass   java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java
pass   ---    java/awt/Window/AlwaysOnTop/AlwaysOnTopEvenOfWindow.java
pass   fail   java/awt/Window/GrabSequence/GrabSequence.java
fail   pass   java/awt/grab/EmbeddedFrameTest1/EmbeddedFrameTest1.java
pass   fail   java/awt/print/PrinterJob/ExceptionTest.java
---    pass   java/lang/ClassLoader/UninitializedParent.java
pass   fail   java/net/ipv6tests/TcpTest.java
pass   fail   java/nio/channels/SocketChannel/AdaptSocket.java
pass   fail   java/nio/channels/SocketChannel/LocalAddress.java
pass   fail   java/nio/channels/SocketChannel/Shutdown.java
pass   fail   java/rmi/transport/pinLastArguments/PinLastArguments.java
---    pass   java/util/TimeZone/OldIDMappingTest.sh
---    pass   java/util/TimeZone/TimeZoneDatePermissionCheck.sh
---    pass   javax/swing/JButton/6604281/bug6604281.java
fail   pass   javax/swing/JTextArea/Test6593649.java
---    pass   javax/swing/Security/6657138/ComponentTest.java
---    pass   javax/swing/Security/6657138/bug6657138.java
---    pass   javax/swing/ToolTipManager/Test6657026.java
---    pass   javax/swing/UIManager/Test6657026.java
---    pass   javax/swing/plaf/basic/BasicSplitPaneUI/Test6657026.java
---    pass   javax/swing/plaf/metal/MetalBorders/Test6657026.java
---    pass   javax/swing/plaf/metal/MetalBumps/Test6657026.java
---    pass   javax/swing/plaf/metal/MetalInternalFrameUI/Test6657026.java
---    pass   javax/swing/plaf/metal/MetalSliderUI/Test6657026.java
pass   error  sun/java2d/OpenGL/GradientPaints.java
pass   fail   sun/rmi/transport/proxy/EagerHttpFallback.java
---    pass   sun/security/provider/certpath/DisabledAlgorithms/CPBuilder.java
---    pass   sun/security/provider/certpath/DisabledAlgorithms/CPValidatorEndEntity.java
---    pass   sun/security/provider/certpath/DisabledAlgorithms/CPValidatorIntermediate.java
---    pass   sun/security/provider/certpath/DisabledAlgorithms/CPValidatorTrustAnchor.java
pass   error  sun/security/ssl/javax/net/ssl/NewAPIs/SessionTimeOutTests.java
---    pass   sun/security/tools/jarsigner/emptymanifest.sh
---    pass   sun/security/util/DerValue/BadValue.java
fail   pass   sun/tools/jhat/HatHeapDump1Test.java
fail   pass   sun/tools/native2ascii/NativeErrors.java

54 differences

OpenJDK 6: b18 Source Bundle Published

On February 16, 2010 the source bundle for OpenJDK 6 b18 was published.

Major changes in this build include the latest round of security fixes and, courtesy of Andrew John Hughes, a backport of the Nimbus look and feel from JDK 7. In addition, a new delivery model is being used for the jaxp and jax-ws components.

A detailed list of all the changes is also available.

Wednesday Feb 03, 2010

java.util.Objects and friends

A small project I worked on during JDK 7 milestones 05 and 06 was the introduction of a java.util.Objects class to serve as a home for static utility methods operating on general objects (6797535, 6889858, 6891113). Those utilities include null-safe or null-tolerant methods for comparing two objects, computing the hash code of an object, and returning a string for an object, operations generally relating to the methods defined on java.lang.Object.

The code to implement each of these methods is very short, so short it is tempting to not write tests when adding such methods to a code base. But the methods they aren't so simple that mistakes cannot be made; replacing such helper methods with a common, tested version from the JDK would be a fine refactoring.

The current set of public methods in java.util.Objects is:

  • static boolean equals(Object a, Object b)

  • static boolean deepEquals(Object a, Object b)

  • static <T> int compare(T a, T b, Comparator<? super T> c)

  • static int hashCode(Object o)

  • static int hash(Object... values)

  • static String toString(Object o)

  • static String toString(Object o, String nullDefault)

  • static <T> T nonNull(T obj)

  • static <T> T nonNull(T obj, String message)

The first two methods define two equivalence relations over object references. Unlike the equals methods on Object, the equals(Object a, Object b) method handles null values. That is, true is returned if both arguments are null or if the first argument is non-null and a.equals(b) returns true. A method with this functionality is an especially common utility method to write, there are several versions of it in the JDK, so I expect the two-argument equals will be one of the most heavily used methods in the Objects class.

The second equivalence relation is defined by the deepEquals method. The equals and deepEquals relations can differ for object arrays; see for the javadoc for details. Equality implies deep equality, but the converse is not true. For example, in the program below arrays c and d are deep-equals but not equals.

public class Test {
   public static void main(String... args) {
       Object common = "A string in common.";
       Object[] a = {common};
       Object[] b = {common};
       Object[] c = {a};
       Object[] d = {b};
       // c and d are deepEquals, but not equals
   }
}

A third equivalence relation is the object identity relation defined by the == operator on references, but since that is already built into the language, no library support is needed. Identity equality implies equals equality and deepEquals equality.

Next, Objects includes a null-tolerant Comparator-style method which first compares for object identity using == before calling the provided Comparator. While Comparable classes aren't as widely available as the methods inherited from java.lang.Object, Comparable is a very useful and frequently implemented interface.

Objects has two hash-related methods. The first is a null-handling hash method which assigns null a zero hash code and the second is a utility method for implementing a reasonable hash function for a class just by passing in the right list of values.

The toString methods provide null handling support, in case of a null argument either returning "null" or the provided default string.

Finally, there are two methods to more conveniently handle null checks, intended to be useful when validating method and constructor parameters.

Taken together, the methods in Objects should lessen the pain and tedium of null handling until more systematic approaches are used.

The Objects API was shaped by discussion in various threads on core-libs-dev in September and October 2009. Several other bugs were also fixed as a result of those discussions, one adding a set of compare methods for primitive types (6582946) and another to consistently define the hash codes of the wrapper classes (4245470).

Monday Oct 19, 2009

OpenJDK 6: b17 regression test results

Running with the usual jtreg flags, -a -ignore:quiet always and -s for the langtools area, the basic regression test results on Linux for OpenJDK 6 build 17 are:

  • HotSpot, 24 tests passed.

  • Langtools, 1354 tests passed.

  • JDK, 3,118 tests pass and 26 tests fail.

With the sync of HotSpot 14 into OpenJDK 6, more tests were added:

0: b16-hotspot/summary.txt  pass: 3
1: b17-hotspot/summary.txt  pass: 24

0      1      Test
---    pass   compiler/6646019/Test.java
---    pass   compiler/6646020/Tester.java
---    pass   compiler/6661247/Test.java
---    pass   compiler/6663848/Tester.java
---    pass   compiler/6689060/Test.java
---    pass   compiler/6695810/Test.java
---    pass   compiler/6700047/Test6700047.java
---    pass   compiler/6711100/Test.java
---    pass   compiler/6712835/Test6712835.java
---    pass   compiler/6714694/Tester.java
---    pass   compiler/6716441/Tester.java
---    pass   compiler/6726999/Test.java
---    pass   compiler/6741738/Tester.java
---    pass   compiler/6756768/Test6756768.java
---    pass   compiler/6756768/Test6756768_2.java
---    pass   compiler/6757316/Test6757316.java
---    pass   compiler/6758234/Test6758234.java
---    pass   compiler/6775880/Test.java
---    pass   compiler/6795362/Test6795362.java
---    pass   compiler/6805724/Test6805724.java
---    pass   runtime/6819213/TestBootNativeLibraryPath.java

21 differences

In langtools all the tests continue to pass; a few tests were rearranged and some more tests were added:

0: b16-langtools/summary.txt  pass: 1,352
1: b17-langtools/summary.txt  pass: 1,354

0      1      Test
---    pass   tools/javac/T6558476.java
---    pass   tools/javac/T6882235.java
---    pass   tools/javac/annotations/pos/TrailingComma.java
pass   ---    tools/javac/api/6440333/T6440333.java
pass   ---    tools/javac/api/Sibling.java
pass   ---    tools/javac/innerClassFile/Driver.java
---    pass   tools/javac/innerClassFile/Driver.sh
pass   ---    tools/javac/links/T.java
---    pass   tools/javac/links/links.sh
---    pass   tools/javac/processing/model/util/elements/TestGetConstantExpression.java

10 differences

And in jdk, a few dozen new tests were added in b17 and the existing tests have generally consistent results:

0: b16-jdk/summary.txt  pass: 3,085; fail: 29; error: 4
1: b17-jdk/summary.txt  pass: 3,118; fail: 26

0      1      Test
error  pass   com/sun/jdi/DoubleAgentTest.java
---    pass   com/sun/jndi/dns/CheckAccess.java
---    pass   com/sun/org/apache/xml/internal/security/TruncateHMAC.java
---    pass   com/sun/security/sasl/util/CheckAccess.java
fail   pass   java/awt/Focus/FrameMinimizeTest/FrameMinimizeTest.java
fail   pass   java/awt/Graphics/DrawImageBG/SystemBgColorTest.java
error  ---    java/awt/PrintJob/EdgeTest/EdgeTest.java
error  pass   java/awt/PrintJob/MultipleEnd/MultipleEnd.java
fail   pass   java/awt/print/PrinterJob/ExceptionTest.java
---    pass   java/beans/Introspector/Test6660539.java
---    pass   java/beans/XMLEncoder/6777487/TestBox.java
---    pass   java/beans/XMLEncoder/6777487/TestCheckedCollection.java
---    pass   java/beans/XMLEncoder/6777487/TestCheckedList.java
---    pass   java/beans/XMLEncoder/6777487/TestCheckedMap.java
---    pass   java/beans/XMLEncoder/6777487/TestCheckedRandomAccessList.java
---    pass   java/beans/XMLEncoder/6777487/TestCheckedSet.java
---    pass   java/beans/XMLEncoder/6777487/TestCheckedSortedMap.java
---    pass   java/beans/XMLEncoder/6777487/TestCheckedSortedSet.java
---    pass   java/beans/XMLEncoder/6777487/TestEnumMap.java
---    pass   java/beans/XMLEncoder/6777487/TestEnumSet.java
---    pass   java/lang/Double/ToString.java
---    pass   java/nio/channels/Selector/RegAfterPreClose.java
fail   pass   java/rmi/transport/pinLastArguments/PinLastArguments.java
---    pass   java/security/AccessControlContext/FailureDebugOption.java
---    pass   java/util/SimpleTimeZone/EndOfDay.java
---    pass   java/util/TimeZone/ListTimeZones.java
---    pass   javax/sound/midi/Gervill/SoftChannel/NoteOverFlowTest2.java
---    pass   javax/sound/midi/Gervill/SoftReceiver/GetMidiDevice.java
---    pass   javax/sound/midi/Gervill/SoftSynthesizer/TestPreciseTimestampRendering.java
---    fail   javax/swing/JTextArea/Test6593649.java
---    pass   javax/swing/plaf/synth/Test6660049.java
---    pass   javax/swing/text/LayoutQueue/Test6588003.java
---    pass   sun/pisces/JoinMiterTest.java
error  pass   sun/security/ssl/javax/net/ssl/NewAPIs/SessionTimeOutTests.java
---    pass   tools/pack200/MemoryAllocatorTest.java

35 differences

OpenJDK 6: b17 Source Bundle Published

On October 16, the source bundle for OpenJDK 6 b17 was published.

Major changes in this build include the latest round of security fixes and, courtesy of Andrew John Hughes, the syncing of HotSpot 14 into the OpenJDK 6 HotSpot repository.

A detailed list of all the changes is also available.

Saturday May 02, 2009

OpenJDK 6: Regression test results for b16, take 2

The corrected source bundle for b16 has slightly different regression test results than the original one. The langtools and hotspot results are the same, but the jdk area has a different difference from b14/b15:


0: b14-jdk/summary.txt   pass: 3,077; fail: 26; error: 3
1: b16a-jdk/summary.txt  pass: 3,085; fail: 29; error: 4

0      1      Test
pass   error  com/sun/jdi/DoubleAgentTest.java
---    pass   java/awt/FontClass/CreateFont/BigFont.java
---    pass   java/awt/FontClass/CreateFont/DeleteFont.sh
---    pass   java/awt/FontClass/CreateFont/fileaccess/FontFile.java
error  pass   java/awt/FullScreen/UninitializedDisplayModeChangeTest/
              UninitializedDisplayModeChangeTest.java
pass   fail   java/awt/print/PrinterJob/ExceptionTest.java
---    pass   java/beans/PropertyEditor/TestEnumSubclass.java
---    pass   java/beans/PropertyEditor/TestEnumSubclassJava.java
---    pass   java/beans/PropertyEditor/TestEnumSubclassNull.java
---    pass   java/beans/PropertyEditor/TestEnumSubclassValue.java
---    pass   java/io/readBytes/MemoryLeak.java
pass   fail   java/rmi/transport/pinLastArguments/PinLastArguments.java
---    pass   java/util/concurrent/Semaphore/RacingReleases.java
---    pass   javax/print/attribute/MediaMappingsTest.java
---    pass   javax/sound/midi/Gervill/SoftChannel/NoteOverFlowTest.java
---    pass   javax/sound/midi/Gervill/SoftFilter/TestProcessAudio.java
---    pass   javax/sound/midi/Gervill/SoftLowFrequencyOscillator/TestProcessControlLogic.java
fail   pass   javax/swing/JColorChooser/Test6541987.java
pass   error  sun/security/ssl/javax/net/ssl/NewAPIs/SessionTimeOutTests.java
pass   fail   sun/tools/jhat/HatHeapDump1Test.java
pass   fail   sun/tools/native2ascii/NativeErrors.java
pass   ---    tools/pack200/MemoryAllocatorTest.java

22 differences

Comparing the initial and corrected builds of b16:


0: b16-jdk/summary.txt   pass: 3,079; fail: 27; error: 4
1: b16a-jdk/summary.txt  pass: 3,085; fail: 29; error: 4

0      1      Test
pass   fail   java/awt/Focus/FrameMinimizeTest/FrameMinimizeTest.java
---    pass   java/beans/PropertyEditor/TestEnumSubclass.java
---    pass   java/beans/PropertyEditor/TestEnumSubclassJava.java
---    pass   java/beans/PropertyEditor/TestEnumSubclassNull.java
---    pass   java/beans/PropertyEditor/TestEnumSubclassValue.java
pass   fail   java/rmi/transport/pinLastArguments/PinLastArguments.java
---    pass   java/util/concurrent/Semaphore/RacingReleases.java
---    pass   javax/sound/midi/Gervill/SoftChannel/NoteOverFlowTest.java
---    pass   javax/sound/midi/Gervill/SoftFilter/TestProcessAudio.java
---    pass   javax/sound/midi/Gervill/SoftLowFrequencyOscillator/TestProcessControlLogic.java

10 differences

Wednesday Apr 15, 2009

OpenJDK 6: Regression test results for b16

Update: Regression test results for the corrected b16 source bundle are now available.

Running with the usual jtreg flags, -a -ignore:quiet always and -s for the langtools area, the basic regression test results on Linux for OpenJDK 6 build 16 are:

  • HotSpot, 3 tests passed.

  • Langtools, 1,352 tests passed.

  • JDK, 3,077 tests pass, 26 tests fail, 3 tests have errors.

In this build, many of the bugs fixed were for security issues or ports of fixes already in JDK 7. The HotSpot test results were stable:

0: b14-hotspot/summary.txt  pass: 3
1: b16-hotspot/summary.txt  pass: 3

No differences

In langtools all the tests continue to pass and a new test was added:

0: b14-langtools/summary.txt  pass: 1,351
1: b16-langtools/summary.txt  pass: 1,352

0      1      Test
---    pass   tools/javac/processing/6512707/T6512707.java

1 differences

And in jdk, a few new tests were added in b16 and the existing tests have generally consistent results:

0: b14-jdk/summary.txt  pass: 3,077; fail: 26; error: 3
1: b16-jdk/summary.txt  pass: 3,079; fail: 27; error: 4

0      1      Test
pass   error  com/sun/jdi/DoubleAgentTest.java
fail   pass   java/awt/Focus/FrameMinimizeTest/FrameMinimizeTest.java
---    pass   java/awt/FontClass/CreateFont/BigFont.java
---    pass   java/awt/FontClass/CreateFont/DeleteFont.sh
---    pass   java/awt/FontClass/CreateFont/fileaccess/FontFile.java
error  pass   java/awt/FullScreen/UninitializedDisplayModeChangeTest
              UninitializedDisplayModeChangeTest.java
pass   fail   java/awt/print/PrinterJob/ExceptionTest.java
---    pass   java/io/readBytes/MemoryLeak.java
---    pass   javax/print/attribute/MediaMappingsTest.java
fail   pass   javax/swing/JColorChooser/Test6541987.java
pass   error  sun/security/ssl/javax/net/ssl/NewAPIs/SessionTimeOutTests.java
pass   fail   sun/tools/jhat/HatHeapDump1Test.java
pass   fail   sun/tools/native2ascii/NativeErrors.java
pass   ---    tools/pack200/MemoryAllocatorTest.java

14 differences

OpenJDK 6: b16 Source Bundle Published

Update: Due to a misunderstanding, some of the expected fixes were missing from the original b16 source bundle. The corrected bundle has subsequently been posted.

On April 15, the source bundle for OpenJDK 6 b16 was published.

The previous source bundle was for b14. There was no distinct b15 per se; b15 was used to mark the transition from teamware to Mercurial. The b16 build is the first to be done purely in Mercurial.

There were 45 bug fixes in this build ranging from security fixes to sound updates; OpenJDK 6 b16 has all relevant security fixes from the recent JDK synchronized security release. A few fixes of note, during a build importing the binary plugs now defaults to false (6781572) and several fixes were applied that should render a few IcedTea patches unnecessary:

  • 6736248 EnumEditor bug. Class check incorrect

  • 6733718 test /java/awt/FullScreen/UninitializedDisplayModeChangeTest/ fails

  • 6593946 (bf) X-Buffer.compact() does not discard mark as specified

  • 6778493 Fix (langtools) ant build to honor fcs MILESTONE setting

    The other non security bugs fixed in this build are:

    • 6761791 Crash in the FontManager code due to use of JNIEnv saved by another thread

    • 6512707 "incompatible types" after (unrelated) annotation processing

    • 6632696 Writing to closed output files (writeBytes) leaks native memory (unix)

    • 6788196 (porting) Bounds checks in io_util.c rely on undefined behaviour

    • 6791458 FileInputStream/RandomAccessFile.read leaks memory if invoked on closed stream with len > 8k

    • 6792066 src/share/native/java/io/io_util.c clean-ups

    • 6819886 System.getProperty("os.name") reports Vista on Windows 7

    • 6821031 Upgrade OpenJDK's LittleCMS version to 1.18

    • 6800572 Removing elements from views of NavigableMap implementations does not always work correctly.

    • 6801020 Concurrent Semaphore release may cause some require thread not signaled

    • 6806019 38 JCK api/javax_sound/midi/ tests fails starting from jdk7 b46

    • 6803402 Race condition in AbstractQueuedSynchronizer

    • 6793757 Fix formatting of copyright notices in Gervill

    • 6794201 remove unused sources

    • 6808724 UninitializedDisplayModeChangeTest/DisplayModeChanger.java has wrong legal notice

    • 6821030 Merge OpenJDK Gervill with upstream sources, Q1CY2009

    • 6823445 Gervill SoftChannel/ResetAllControllers jtreg test fails after portamento fix from last merge

    • 6823446 Gervill SoftLowFrequencyOscillator fails when freq is set to 0 cent or 8.1758 Hz.

    • 6824976 Fix NAWK assignment in shell script jdk/make/java/java/genlocales.gmk

    • 6828183 testcase from SSR09_01 into jdk6-open hangs

  • Monday Feb 09, 2009

    OpenJDK 6: Mercurial Repositories Available

    As announced by Kelly, after a successful trial the final read/write Mercurial repositories for OpenJDK 6 are now available. Thanks to Kelly for putting in the extra effort to create change sets approximating history information of the pre-Mercurial phase of OpenJDK 6! The build tags correspond to the state of the source code shipped with the indicated build.

    Martin has already made a series of external-to-Sun pushes and I'm looking forward to more people contributing to the code base going forward.

    Friday Jan 16, 2009

    OpenJDK and the new plugin

    One of the most exciting new features in 6u10 was the new Java Plug-in.

    I'm happy to announce that within the next few months as part of OpenJDK, we are Sun are committed to open sourcing our Java Web Start implementation and the new plug-in implementation for NPAPI capable browsers; those browsers including Firefox 3, amongst others.

    Monday Dec 08, 2008

    OpenJDK 6: Trial Mercurial Repositories Available

    Thanks to Kelly, trial Mercurial repositories for OpenJDK 6 are now available for evaluation. These trial repositories will be available read-only for about a week to find any problems before creating the final live repositories; for details, see Kelly's email to the jdk6-dev alias.

    Wednesday Dec 03, 2008

    Build architectures and managing dependencies

    Since the OpenJDK source was released, there have been various discussions about aspects of the build architecture, including how dependencies on third parties libraries should be managed. For example, on a Linux system should the JDK use its own libzip or the libzip that comes with the distribution? I think the appropriate answers to these and related question hinge on whether the final deliverable from the OpenJDK project is viewed as the source code itself or a binary built from the source.

    Traditionally before OpenJDK, the end result of the Sun's JDK project that most people used were the JDK and JRE binaries. These binaries were meant to be universal in the sense of being usable on a given processor family across a version range of operating systems. For example, there was a single windows x86 binary for use on, say, Windows NT, Windows XP, etc., a single Solaris SPARC binary for use across Solaris 8 through Solaris 10, and effectively a single Linux x86 binary for use across different Linux distributions.

    This "single binary" model drives decisions about what platform to produce the binary on, generally an older release, and what assumptions can be made about available system resources, generally rather weak ones. With a single binary deliverable, since fewer environment resources can be relied on, making the JDK build self-contained is necessary for it to be reliable in a wide variety of environments. With this delivery architecture, there is some justification to, for example, including a copy a library like libzip in the JDK build rather than relying on a system library, even though there are increased maintenance costs.

    However, when an OpenJDK/IcedTea binary is being built on a particular Linux distribution for use only on that distribution, the constraints are different. If the build is being done by the OS vendor, the vendor controls the OS contents and knows whether or not system libraries like libzip are reliable and kept up to date. Since stronger assumptions can be made about the host environment, weaker conditions need to be fulfilled by the JDK source tree. For an OS vendor, relying on a single copy of native libraries for the OS and the JDK is preferable to building (and maintaining) multiple copies.

    Going forward, I'd expect the JDK build to evolve to better accommodate options to use host platform resources. Perhaps modules systems in the future can help manage such dependencies more transparently.

    OpenJDK 6 b13 and JCK testing

    The JCK tests probe the conformance of a Java platform implementation to a specification. For example, JCK 6b is the current test suite to determine conformance to the Java SE 6 spec. Official claims of conformance require not only passing the complete set of relevant tests, but also meeting the other requirements spelled out in the JCK user's guide.

    Regarding the JCK, conformance is measured with respect to a binary rather than to a source base directly, which is sensible since a Java platform implementation will typically rely on and be affected by the properties of the host environment, including the OS, the C compiler, and the processor.

    Previously Red Hat announced that using OpenJDK sources augmented with IcedTea patches, an OpenJDK binary on Fedora 9 passed the JCK and met the other conformance requirements.

    Amongst other changes, after incorporating community-developed patches (notably 6748251 in b13) and following the OpenJDK 6 build instructions, inside Sun a binary resulting from building the unmodified OpenJDK 6 b13 sources on Redhat Enterprise AS 2.1 with gcc 2.95 (the official Linux build platform for Sun's 6 update releases) passed all the JCK 6b tests when run on Fedora Core 8 x86. That binary also meets all the other JCK requirements.

    OpenJDK 6 binaries built from b13 (and later) sources on and for different host environments are now more likely to share those favorable conformance properties, but testing would be necessary to verify conformance status and to make any formal statements.

    More information

    OpenJDK 6: Some regression test results for b14

    Running with the usual jtreg flags, -a -ignore:quiet always and -s for the langtools area, the basic regression test results on Linux for OpenJDK 6 build 14 are:

    • HotSpot, 3 tests passed.

    • Langtools, 1,351 tests passed.

    • JDK, 3,077 tests pass, 26 tests fail, 3 tests have errors.

    In this build, we upgraded from a HotSpot 10 base to HotSpot 11. HotSpot 11 is also being used in the 6u10 release. The set of included tests for the HotSpot versions differ:

    0: b13-hotspot/summary.txt  pass: 5
    1: b14-hotspot/summary.txt  pass: 3
    
    0      1      Test
    pass   ---    compiler/6547163/Test.java
    pass   ---    compiler/6563987/Test.java
    pass   ---    compiler/6571539/Test.java
    pass   ---    compiler/6595044/Main.java
    ---    pass   compiler/6663621/IVTest.java
    ---    pass   compiler/6724218/Test.java
    
    6 differences
    

    In langtools all the tests continue to pass:

    
    0: ./b13-langtools/summary.txt  pass: 1,351
    1: ./b14-langtools/summary.txt  pass: 1,351
    
    No differences
    

    And in jdk, a few new tests were added in b14 and the existing tests have generally consistent results:

    0: b13-jdk/summary.txt  pass: 3,072; fail: 23; error: 3
    1: b14-jdk/summary.txt  pass: 3,077; fail: 26; error: 3
    
    0      1      Test
    ---    fail   com/sun/org/apache/xml/internal/ws/server/Test.java
    pass   fail   java/awt/TextArea/UsingWithMouse/SelectionAutoscrollTest.html
    ---    pass   java/awt/image/ConvolveOp/EdgeNoOpCrash.java
    ---    pass   javax/management/monitor/DerivedGaugeMonitorTest.java
    pass   fail   javax/swing/JColorChooser/Test6541987.java
    ---    pass   javax/swing/JFileChooser/6484091/bug6484091.java
    ---    pass   sun/management/jmxremote/LocalRMIServerSocketFactoryTest.java
    ---    pass   sun/nio/cs/TestUTF8.java
    ---    pass   sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLEngineImpl/EmptyExtensionData.java
    ---    pass   tools/pack200/MemoryAllocatorTest.java
    
    10 differences
    

    OpenJDK 6: Sources for b14 published

    On December 3, the OpenJDK 6 b14 source bundle was published. Changes of note in this build:

    This will be the last teamware based source drop; all future source drops will be based on the forthcoming public OpenJDK 6 Mercurial repositories.

    Friday Nov 07, 2008

    OpenJDK 6: Some regression test results for b13

    For regression testing of OpenJDK 6, the big news in b13 is due to work by Jon on multiple fronts; by getting out a new version of jtreg and developing a number of test fixes, all the langtools regression tests now pass when run in "samevm" mode (jtreg -s ...). As the name implies, in same vm mode a test is run in the same jvm as the previous test as opposed to starting a fresh jvm for each test, giving much speedier test results.

    The base jtreg flags for these test runs were -a -ignore:quiet with -s just used for the langtools tests. On a per workspace basis, the results on Linux for OpenJDK 6 build 13 are:

    • HotSpot, 5 tests pass.

    • Langtools, 1,351 tests pass.

    • JDK, 3,072 test pass, 23 tests fail, 3 tests have errors.

    Compared to the regression test results for b12, in b13 HotSpot is unchanged:

    0: ./b12-hotspot/summary.txt  pass: 5
    1: ./b13-hotspot/summary.txt  pass: 5
    
    No differences
    

    The langtools tests now all pass:

    
    0: ./b12-langtools/summary.txt  pass: 1,346; fail: 2
    1: ./b13-langtools/summary.txt  pass: 1,351
    
    0      1      Test
    pass   ---    tools/javac/6176978/T6176978.java
    ---    pass   tools/javac/T6725036.java
    ---    pass   tools/javac/T6759996.java
    ---    pass   tools/javac/VersionOpt.java
    ---    pass   tools/javac/generics/T6657499.java
    fail   pass   tools/javac/processing/model/testgetallmembers/Main.java
    fail   ---    tools/javac/versionOpt.sh
    ---    pass   tools/javadoc/6176978/T6176978.java
    
    8 differences
    
    

    And in jdk, several dozen new tests were added and some previously failing tests pass:

    0: ./b12-jdk/summary.txt  pass: 2,985; fail: 36; error: 4
    1: ./b13-jdk/summary.txt  pass: 3,072; fail: 23; error: 3
    
    0      1      Test
    fail   pass   com/sun/jdi/JdbReadTwiceTest.sh
    ---    pass   com/sun/org/apache/xml/internal/security/exceptions/LocaleTest.java
    ---    pass   com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java
    ---    pass   com/sun/tools/extcheck/TestExtcheckArgs.java
    fail   pass   java/awt/Focus/DeiconifiedFrameLoosesFocus/DeiconifiedFrameLoosesFocus.html
    pass   fail   java/awt/Focus/FrameMinimizeTest/FrameMinimizeTest.java
    fail   pass   java/awt/TextArea/UsingWithMouse/SelectionAutoscrollTest.html
    fail   pass   java/io/File/Basic.java
    fail   pass   java/io/File/SetAccess.java
    fail   pass   java/io/File/SetReadOnly.java
    ---    pass   java/lang/Boolean/Factory.java
    ---    pass   java/lang/Boolean/GetBoolean.java
    ---    pass   java/lang/Boolean/MakeBooleanComparable.java
    ---    pass   java/lang/Boolean/ParseBoolean.java
    ---    pass   java/lang/Byte/Decode.java
    ---    pass   java/lang/Double/BitwiseConversion.java
    ---    pass   java/lang/Double/Constants.java
    ---    pass   java/lang/Double/Extrema.java
    ---    pass   java/lang/Double/NaNInfinityParsing.java
    ---    pass   java/lang/Double/ParseDouble.java
    ---    pass   java/lang/Double/ParseHexFloatingPoint.java
    ---    pass   java/lang/Double/ToHexString.java
    ---    pass   java/lang/Float/BitwiseConversion.java
    ---    pass   java/lang/Float/Constants.java
    ---    pass   java/lang/Float/Extrema.java
    ---    pass   java/lang/Float/NaNInfinityParsing.java
    ---    pass   java/lang/Float/ParseFloat.java
    ---    pass   java/lang/Integer/BitTwiddle.java
    ---    pass   java/lang/Integer/Decode.java
    ---    pass   java/lang/Integer/GetInteger.java
    
    ---    pass   java/lang/Integer/ParsingTest.java
    ---    pass   java/lang/Long/BitTwiddle.java
    ---    pass   java/lang/Long/Decode.java
    ---    pass   java/lang/Long/GetLong.java
    ---    pass   java/lang/Long/ParsingTest.java
    ---    pass   java/lang/Math/AbsPositiveZero.java
    ---    pass   java/lang/Math/Atan2Tests.java
    ---    pass   java/lang/Math/CubeRootTests.java
    ---    pass   java/lang/Math/Expm1Tests.java
    ---    pass   java/lang/Math/HyperbolicTests.java
    ---    pass   java/lang/Math/HypotTests.java
    ---    pass   java/lang/Math/IeeeRecommendedTests.java
    ---    pass   java/lang/Math/Log10Tests.java
    ---    pass   java/lang/Math/Log1pTests.java
    ---    pass   java/lang/Math/MinMax.java
    ---    pass   java/lang/Math/PowTests.java
    ---    pass   java/lang/Math/Rint.java
    ---    pass   java/lang/Math/TanTests.java
    ---    pass   java/lang/Short/ByteSwap.java
    ---    pass   java/lang/Short/Decode.java
    ---    pass   java/lang/StrictMath/CubeRootTests.java
    ---    pass   java/lang/StrictMath/Expm1Tests.java
    ---    pass   java/lang/StrictMath/HyperbolicTests.java
    ---    pass   java/lang/StrictMath/HypotTests.java
    ---    pass   java/lang/StrictMath/Log10Tests.java
    ---    pass   java/lang/StrictMath/Log1pTests.java
    ---    pass   java/lang/ToString.java
    ---    pass   java/lang/annotations/AnnotationTypeMismatchException/FoundType.java
    ---    pass   java/lang/annotations/Missing/MissingTest.java
    ---    pass   java/lang/annotations/ParameterAnnotations.java
    ---    pass   java/lang/annotations/RecursiveAnnotation.java
    ---    pass   java/lang/annotations/UnitTest.java
    ---    pass   java/lang/annotations/loaderLeak/Main.java
    ---    pass   java/lang/annotations/package-info.java
    fail   pass   java/net/ipv6tests/TcpTest.java
    error  pass   java/nio/channels/SocketChannel/AdaptSocket.java
    ---    pass   java/rmi/activation/Activatable/checkActivateRef/CheckActivateRef.java
    ---    pass   javax/sound/midi/Gervill/EmergencySoundbank/TestCreateSoundbank.java
    ---    pass   javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Available.java
    ---    pass   javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Close.java
    ---    pass   javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkReset.java
    ---    pass   javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkSupported.java
    ---    pass   javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Read.java
    ---    pass   javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByte.java
    ---    pass   javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByteIntInt.java
    ---    pass   javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Skip.java
    ---    pass   javax/xml/crypto/dsig/GenerationTests.java
    ---    pass   javax/xml/crypto/dsig/ValidationTests.java
    ---    pass   javax/xml/crypto/dsig/keyinfo/KeyInfo/Marshal.java
    ---    pass   sun/net/idn/PunycodeTest.java
    ---    pass   sun/net/idn/TestStringPrep.java
    ---    pass   sun/security/pkcs11/ec/TestCurves.java
    fail   pass   sun/tools/jps/jps-Defaults.sh
    fail   pass   sun/tools/jps/jps-l_1.sh
    fail   pass   sun/tools/jstatd/jstatdDefaults.sh
    fail   pass   sun/tools/jstatd/jstatdExternalRegistry.sh
    fail   pass   sun/tools/jstatd/jstatdPort.sh
    fail   pass   sun/tools/jstatd/jstatdServerName.sh
    fail   pass   sun/tools/native2ascii/NativeErrors.java
    
    89 differences
    
    

    OpenJDK 6: Sources for b13 published

    On November 7, the OpenJDK 6 b13 source bundle was published. Changes of note in this build:

    Kelly has made good progress on the Mercurial repository, but some more work remain to be done. I'd expect to have trial repositories available within a week or two.

    Monday Nov 03, 2008

    OpenJDK 6 Genealogy

    To address some of the questions that have come up recently in comments and elsewhere, I've prepared a diagram of OpenJDK 6's genealogy:

    JDK Release Genealogy

    The original JDK 6 code base begat two lines of heirs: JDK 7 and the sequence of 6 update releases. The decision to open source the JDK code base came late in the life cycle of the development of JDK 6 so a build of JDK 7 was the first be published as open source. By the time JDK 7 was published as OpenJDK 7, the first post-GA update to JDK 6, 6u1, had already shipped. Work continued in both the OpenJDK 7 and 6 update trains. However, an open source implementation of the Java SE 6 specification was needed as well. After considering the alternatives, OpenJDK 7 build 20 was chosen as the basis of a backward branch to create OpenJDK 6 by removing changes inappropriate for a Java SE 6 implementation. Since then, all three trains, 6 update, OpenJDK 7, and OpenJDK 6, have continued evolving, with certain fixes being ported between the releases.

    At some point in the future, the OpenJDK 7 code base will in turn presumably give rise to OpenJDK 7 update releases and OpenJDK 8.

    Sunday Nov 02, 2008

    OpenJDK 6 and 6u10 features

    There have been a number of inquiries about when the various new features of 6u10 would be available in OpenJDK.

    OpenJDK 6 build 12 contained ports of bug fixes from a number of 6u10 component areas (corba, jaxp, jaxws, langtools). Most changes from the core jdk component area of 6u10 were not ported. The porting effort that took place of a relatively small number of bugs to a subset of the full OpenJDK code base was still a sizeable effort. The full set of changes made to the core jdk in 6u10 is many times larger with a proportionally larger porting cost. We at Sun do not plan to do a wholesale port of those 6u10 features from the core jdk to OpenJDK 6. However, over the coming months we will be porting those 6u10 features to OpenJDK 7 and we would welcome community assistance in backporting appropriate features from OpenJDK 7 to OpenJDK 6. (These jdk area features in 6u10 are separate from plugin and webstart functionality.)

    Thursday Oct 02, 2008

    OpenJDK 6: Logistics of Partial Merge with 6u10

    A large fraction of my work for OpenJDK 6 build 12 was porting all of the cumulative fixes in selected areas of the 6u10 code base into OpenJDK 6. Internally, like the forest of Mercurial repositories of JDK 7, the code base of OpenJDK 6 is composed of a set of teamware workspaces for different areas: cobra, hotspot, jaxp, jaxws, jdk, and langtools. Previously, the non-HotSpot code lived in a single "j2se" workspace which was split as part of the JDK 7 transition to Mercurial. I worked on merging in the fixes from the corba, jaxp, jaxws, and langtools areas. Jon helped with langtools too.

    A variety of techniques were used to first find the fixes in the 6 update train that were absent in the OpenJDK 6 code base and then apply them as appropriate. The three basic strategies were:

    • Examining the bug database to find bugs fixed in some 6 update release but not in OpenJDK 6. Patches implementing those fixes could then be applied.

    • Teamware bringover and merge. The teamware bringover command pulls down changes from the parent workspace; per-file SCCS histories track changes and are used to identify any merge conflicts that need to be resolved.

    • Raw diffs of source files. Crude, but sometimes effective with the right preprocessing.

    There were various complications using these techniques. Not all areas follow the same bug database practices so using the bug database alone was not sufficient. Standard practice for maintaining JDK code is to have each SCCS delta tagged with a set of bug numbers (or tagged as a merge or a copyright update) and to not add empty deltas when the code has not changed. However, some areas of the JDK, jaxws in particular, are effectively maintained externally and only occasionally synced. In those cases, this SCCS discipline is not necessary followed, rendering a teamware merge operation ineffective since many files will have spurious conflicts. However, even in areas where standard practices are followed, a simple teamware bringover and merge may not suffice. For example, a file may have been removed from OpenJDK 6 but not removed from the 6 update train; a simple bringover would recreate the file. Raw diffs of source files can also be informative, but some preprocessing is needed to bring both code bases to a common format.

    Compared to the 6 update train, as part of open sourcing and in preparation for transition to Mercurial, the OpenJDK 6 code base has undergone a number of pervasive transformations. On a file level:

    • (generally) a GPL license is used instead of the Sun TLDA

    • SCCS keywords have been purged

    • whitespace has been normalized, tabs replaced by spaces and source files end with a newline

    Therefore, to compute a meaningful raw diff, each of these transformations needs to be applied to the 6 update source or undone from the OpenJDK 6 source; although diff -w can bridge inconsistent whitespace conventions of course. However, even after being brought to a common format, since OpenJDK 6 is a backward branch from JDK 7, certain refactorings are present in the OpenJDK 6 train but absent from the 6 update train, obscuring both teamware-based and diff-based file comparisons. On a workspace level, the 6 update releases still use a monolithic j2se workspace in contrast to the split component workspaces in OpenJDK 6. Consequently, the contents of some subdirectories are now spread to multiple areas, further complicating bringover logistics.

    The initial approach to evaluate merging in changes to each OpenJDK 6 component workspace was to:

    1. Generate a list of source and test directories of the component workspace. (The make directories were excluded from consideration in the merge attempt since the workspace split fundamentally changed the makefile structure.)

    2. Do a trial bringover -n of those directories from a 6u10 workspace. A workspace has a "biological parent" which gives birth to it; however, a bringover can use a different parent for comparison purposes instead. In this case, for the merge operation I used the 6u10 j2se workspace to be a temporary adoptive parent of my OpenJDK 6 component workspace. However, the eventual results of the merge would be committed to the biological parent OpenJDK 6 workspace.

    3. Refine the directory list to avoid including spurious files.

    4. Evaluate the utility of the bringover results in terms of merging files and generating conflicts.

    While this procedure provided useful information, a simple bringover from 6u10 into OpenJDK 6 was never sufficient to properly capture the set of fixes without introducing other sorts of regressions, such as open source related file and license cleanup. On a per component workspace basis, those complications were:

    • corba: Generally the bringover from corba went very smoothly; there were only 12 conflicting files and 8 new files that would be created. However, none of the 8 new files ended up being added to the OpenJDK 6 corba workspace; four the new files now live in the jdk workspace after the workspace split and the other four were unneeded binary files previously removed from the workspace in preparation for open sourcing. Resolving the actual file conflicts was straightforward and the fixes for eight bugs were brought over. After the merge, the OpenJDK 6 corba workspace had only a slightly different structure than in 6u10 since the OpenJDK 6 corba was changed to no longer require a scheme interpreter during the build!

    • jaxp: In several dozen directories, there were about 30 conflicting files and two new files that would be created. Many of the differences were small, such as purging of SCCS keywords in OpenJDK 6. Where an SCCS keyword was purged, the purge was kept in the merged result; likewise licensing refinements and cleanups in OpenJDK 6 were also preserved in the merge. However, all changes that affected the semantics of the running code were brought in from 6u10. In summary, for the 30 or so conflicting files, generally the code matches the code in 6u10 and the license matches the license in OpenJDK 6. In previous syncs with the JDK, jaxp didn't always follow bug database discipline so a marker merge bug was created to supplement the known fix that was brought over. One of the files that would have been created was previously removed in JDK 7 so it was not resurrected and the other potential new file was not necessary and thus not created either.

    • jaxws: The jaxws code is externally maintained and occasionally synced; however, standard teamware delta practices are not followed, resulting in thousands of spurious merge conflicts being reported on a bringover. Therefore, by using a script that stripped off the leading comment in a file (removing license differences) and normalized whitespace, transformed versions of the OpenJDK 6 and 6u10 jaxws sources in a common format could be compared. The only nontrivial differences were for the upgrade to JAF 1.1.1. Other than difficulties getting the tests for these changes to work in jprt, incorporating the fixes was straightforward. In addition, the jaxws team verified no other fixes went into 6u10 that were not already present in OpenJDK 6 (the same security fixes had been applied independently to both releases).

    • langtools: The javac in OpenJDK 6 inherited a number of restructuring changes from JDK 7 that permeated the code, limiting the effectiveness of both teamware-based and source-file based comparisons to find true differences. Instead, queries on the bug database were used to identify bugs fixed in some 6 update release, but not in OpenJDK 6. Finding the effective set of bugs fixed in OpenJDK 6 compared to the originally shipped JDK 6 was computed as:

      • The bugs fixed in JDK 7 before the backward branch to create OpenJDK 6.

      • PLUS bugs directly fixed in OpenJDK 6 since the inception of its workspaces.

      • MINUS any "antibugs" that were annihilated in OpenJDK 6. An antibug is a change from JDK 7 that is inappropriate for a Java SE 6 implementation, such as OpenJDK 6, that is fixed by undoing the change. For example, a change in JDK 7 that added a class or method in the java.\* or javax.\* namespaces is inappropriate for a Java SE 6 implementation and must be removed for Java SE 6 conformance.

      The set of bugs cumulatively fixed in 6u10 is just a union of the bugs fixed in each update release up to and including 6u10: 6u1, 6u2, 6u3, 6u4, 6u5, 6u6, 6u7, and 6u10. In the end, the patches for about five groups of langtools bugs needed to the applied.

    When reviewing the changes to corba, jaxp, and jaxws, two sets of webrevs were generated, one comparing the merge result against 6u10 and another comparing the merge result against OpenJDK 6. Each was important to fully verify the correctness of the change both in terms of licensing and semantics.

    About

    darcy

    Search

    Archives
    « April 2014
    SunMonTueWedThuFriSat
      
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
       
           
    Today
    News

    No bookmarks in folder

    Blogroll