[SRU] ceph: replace -source/-target 1.8 with --release 7

Bug #1766998 reported by Tiago Stürmer Daitx
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ceph (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
The fix for bug #1756854 updated the -source and -target from 1.5 to 1.8 to allow the build to succeed with openjdk-9 as well as to keep compatibility with openjdk-11.

That change missed the fact that the right way to set the target jdk level in openjdk-9 is to actually use the --release flag, introduced by JEP-247 [1]. By using the --release flag the right bootclasspath is also set, which prevents API compatibility problems when running the compiled jar/classes with older jdks (including the targeted one) [2,3].

Also, while JEP-182 [4] indicated that OpenJDK-11 would only allow a minimum source/target of 1.8, that later changed due to introduction of a 6-month release cycle, which moved the minimum source/target to 1.6 for openjdk-10 [5] and to 1.7 for openjdk-11 [6].

Thus the proposal is to move from "-source 1.8 -target 1.8" to "--release 7" in order to accommodate both changes.

Currently ceph does not seem to make use any of the known APIs that can cause such failure when run with openjdk-8, but there is a risk of openjdk-11 introducing additional changes that could change that.

[Test Case]
 * There is no known use case for it yet: of the known API incompatibilities none seems to be used by cephs-java, but that only goes as far as openjdk-9 and openjdk-10.

In order to check the binary compatibility of the generated jar and jni:

$ apt-get install libcephfs-java ceph-test \
    openjdk-11-jre-headless # or openjdk-8-jre-headless

# replace with java-8-openjdk-amd64 for openjdk-8
$ /usr/lib/jvm/java-11-openjdk-amd64/bin/java \
    -DCEPH_CONF_FILE=/etc/ceph/ceph.conf \
    -Djava.library.path=/usr/lib/jni/ \
    -cp /usr/share/java/junit4.jar:/usr/share/java/libcephfs.jar:/usr/share/java/libcephfs-test.jar \
    org.junit.runner.JUnitCore \
    com.ceph.fs.CephAllTests

It should report back:
FAILURES!!!
Tests run: 27, Failures: 4

The 4 failures are:

1) test_double_mount(com.ceph.fs.CephDoubleMountTest)
java.lang.Exception: Unexpected exception, expected<com.ceph.fs.CephAlreadyMountedException> but was<java.io.FileNotFoundException>
2) test_CephMountCreate(com.ceph.fs.CephMountCreateTest)
java.io.FileNotFoundException:
3) com.ceph.fs.CephMountTest
java.io.FileNotFoundException:
4) com.ceph.fs.CephMountTest
java.lang.NullPointerException: @path is null

which is caused by the fact that ceph itself is not running nor mounted.

The test case results should be the exact same with and without the patch applied, for both openjdk-8 and openjdk-11. This should indicate that the running tests are not being affected by the flag change.

[Regression Potential]
 * There is no known regression; these changes should actually improve ceph compatibility with openjdk-8 code by using --release to set the right bootclasspath.

[Other Info]
 * openjdk-8 is being kept in the universe pocket for bionic and will be supported until xenial EOL (as it is in xenial's release pocket), thus it is important to guarantee that our packages can also be run and build with openjdk-8.

[References]
[1] http://openjdk.java.net/jeps/247
[2] https://github.com/plasma-umass/doppio/issues/497#issuecomment-353394008
[3] https://bugs.debian.org/895616
[4] http://openjdk.java.net/jeps/182
[5] https://bugs.openjdk.java.net/browse/JDK-8028563
[6] https://bugs.openjdk.java.net/browse/JDK-8173605

description: updated
summary: - ceph: replace -source/-target 1.8 with --release 7
+ [[SRU] ceph: replace -source/-target 1.8 with --release 7
description: updated
summary: - [[SRU] ceph: replace -source/-target 1.8 with --release 7
+ [SRU] ceph: replace -source/-target 1.8 with --release 7
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Tiago, or anyone else affected,

Accepted ceph into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ceph/12.2.4-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ceph (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceph - 12.2.4-0ubuntu1.1

---------------
ceph (12.2.4-0ubuntu1.1) bionic; urgency=medium

  * d/p/update-java-source-target-flags.patch: Use --release instead
    of -source/-target and set release to 7 as that is the minimum
    required for OpenJDK 11 (LP: #1766998).
  * d/p/replace-javah-usage.patch: call -h during compilation time to
    generate native header files and remove the javah call as the binary
    is no longer part of openjdk-10 - javah has been deprecated since
    openjdk-9 (LP: #1766995).

 -- Tiago Stürmer Daitx <email address hidden> Wed, 25 Apr 2018 01:45:34 +0000

Changed in ceph (Ubuntu):
status: New → Fix Released
tags: added: verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Verified that the test case works in a bionic chroot for ceph 12.2.4-0ubuntu1.1 (currently in bionic-proposed).

Tested both openjdk-11 and openjdk-8 and got the expected:

FAILURES!!!
Tests run: 27, Failures: 4

message. Also verified that failures are the same as in the test case.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceph - 12.2.4-0ubuntu1.1

---------------
ceph (12.2.4-0ubuntu1.1) bionic; urgency=medium

  * d/p/update-java-source-target-flags.patch: Use --release instead
    of -source/-target and set release to 7 as that is the minimum
    required for OpenJDK 11 (LP: #1766998).
  * d/p/replace-javah-usage.patch: call -h during compilation time to
    generate native header files and remove the javah call as the binary
    is no longer part of openjdk-10 - javah has been deprecated since
    openjdk-9 (LP: #1766995).

 -- Tiago Stürmer Daitx <email address hidden> Wed, 25 Apr 2018 01:45:34 +0000

Changed in ceph (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for ceph has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.