jtreg hotspot runtime/cds/appcds/* test failures due to jaw-classpath.diff

Bug #2016194 reported by Vladimir Petko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-17 (Ubuntu)
Fix Released
Undecided
Unassigned
openjdk-lts (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

jaw-classpath.diff modifies the boot classpath in order to inject accessibility provider jar file breaking the test assertions for class data sharing.
Attached is the list of failures.

Due to the fact that accessibility bridge is disabled by default, remove the patch.

If the accessibility bridge will be required by the application it should include it manually rather than have a patched JDK bootclasspath.

Related branches

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

This bug was fixed in the package openjdk-lts - 11.0.18+10-0ubuntu5

---------------
openjdk-lts (11.0.18+10-0ubuntu5) lunar; urgency=medium

  * d/control: add jtreg6 dependencies, regenerate control.
  * d/t/{jdk,hotspot,jaxp,lantools}: run tier1 and tier2 jtreg tests only,
    add test options from OpenJDK makefile.
  * d/t/*: fix test environment: add missing -nativepath (LP: #2001563).
  * d/t/jdk: provide dbus session for the window manager (LP: #2001576).
  * d/p/*: add patches for jtreg tests:
    - disable-thumb-assertion.patch: fix JDK-8305481.
    - update-assertion-for-armhf.patch: fix JDK-8305480.
    - log-generated-classes-test.patch: workaround JDK-8166162.
    - update-permission-test.patch: add security permissions for testng 7.
    - ldap-timeout-test-use-ip.patch, test-use-ip-address.patch: Ubuntu-specific
      patches to workaround missing DNS resolver on the build machines.
    - exclude_broken_tests.patch: quarantine failing tests.
  * d/rules: package external debug symbols (LP: #2015835).
  * drop d/p/{jaw-classpath.diff, jaw-optional.diff}: the atk wrapper is disabled
    and these patches cause class data sharing tests to fail (LP: #2016194).
  * d/p/exclude-broken-tests.patch: add OpenJDK 11 failures.
  * d/t/jtreg-autopkgtest.in: pass JTREG home to locate junit.jar, regenerate
    d/t/jtreg-autopkgtest.sh (LP: #2016206).
  * d/t/control.in: disable jtreg autopkgtests in line with openjdk 17,
    regenerate control (LP: #2016438).

 -- Vladimir Petko <email address hidden> Fri, 14 Apr 2023 11:29:59 +1200

Changed in openjdk-lts (Ubuntu):
status: New → Fix Released
Revision history for this message
Vladimir Petko (vpa1977) wrote (last edit ):
Download full text (10.8 KiB)

Refer to the build log:
Tests listed in cds-fail.txt:

Excluded tests (not in tier2 or tier2
runtime/cds/appcds/CDSandJFR.java
runtime/cds/appcds/CommandLineFlagCombo.java
runtime/cds/appcds/ExtraSymbols.java
runtime/cds/appcds/FieldAnnotationsTest.java
runtime/cds/appcds/FreeUnusedMetadata.java
runtime/cds/appcds/HelloTest.java
runtime/cds/appcds/LambdaContainsOldInf.java
runtime/cds/appcds/LambdaWithOldClass.java
runtime/cds/appcds/LambdaWithUseImplMethodHandle.java
runtime/cds/appcds/MismatchedPathTriggerMemoryRelease.java
runtime/cds/appcds/MissingSuperTest.java
runtime/cds/appcds/MultiReleaseJars.java
runtime/cds/appcds/OldClassTest.java
runtime/cds/appcds/OldInfExtendsInfDefMeth.java
runtime/cds/appcds/OldSuperClass.java
runtime/cds/appcds/OldSuperInf.java
runtime/cds/appcds/OldSuperInfIndirect.java
runtime/cds/appcds/PackageSealing.java
runtime/cds/appcds/ParallelLoad2.java
runtime/cds/appcds/ProhibitedPackage.java
runtime/cds/appcds/ProtectionDomain.java
runtime/cds/appcds/RelativePath.java
runtime/cds/appcds/SharedBaseAddress.java
runtime/cds/appcds/SharedPackages.java
runtime/cds/appcds/SharedRegionAlignmentTest.java
runtime/cds/appcds/SignedJar.java
runtime/cds/appcds/SpecifySysLoaderProp.java
runtime/cds/appcds/StaticArch...

Revision history for this message
Vladimir Petko (vpa1977) wrote :
Download full text (4.2 KiB)

Excluded tests pass when ran manually:

Directory "/tmp/hotspot/JTwork" not found: creating
Directory "./hotspot/0/JTreport" not found: creating
Passed: runtime/cds/appcds/customLoader/ParallelTestSingleFP.java
Passed: runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java
Passed: runtime/cds/appcds/customLoader/ParallelTestMultiFP.java
Passed: runtime/cds/appcds/cacheObject/HeapFragmentationTest.java
Passed: runtime/cds/appcds/cacheObject/OpenArchiveRegion.java
Passed: runtime/cds/appcds/dynamicArchive/ClassResolutionFailure.java
Passed: runtime/cds/appcds/dynamicArchive/AppendClasspath.java
Passed: runtime/cds/appcds/dynamicArchive/DynamicFlag.java
Passed: runtime/cds/appcds/dynamicArchive/LambdaCustomLoader.java
Passed: runtime/cds/appcds/dynamicArchive/DynamicLambdaWithUseImplMethodHandle.java
Passed: runtime/cds/appcds/dynamicArchive/LinkClassTest.java
Passed: runtime/cds/appcds/CDSandJFR.java
Passed: runtime/cds/appcds/dynamicArchive/HelloDynamic.java
Passed: runtime/cds/appcds/dynamicArchive/LambdaProxyCallerIsHidden.java
Passed: runtime/cds/appcds/dynamicArchive/RelativePath.java
Passed: runtime/cds/appcds/dynamicArchive/VerifyWithDynamicArchive.java
Passed: runtime/cds/appcds/dynamicArchive/TestDynamicRegenerateHolderClasses.java
Passed: runtime/cds/appcds/dynamicArchive/RegularHiddenClass.java
Passed: runtime/cds/appcds/dynamicArchive/MainModuleOnly.java
Passed: runtime/cds/appcds/FieldAnnotationsTest.java
Passed: runtime/cds/appcds/FreeUnusedMetadata.java
Passed: runtime/cds/appcds/HelloTest.java
Passed: runtime/cds/appcds/cacheObject/DifferentHeapSizes.java
Passed: runtime/cds/appcds/ExtraSymbols.java
Passed: runtime/cds/appcds/CommandLineFlagCombo.java
Passed: runtime/cds/appcds/jigsaw/modulepath/AddOpens.java
Passed: runtime/cds/appcds/jigsaw/modulepath/AddModules.java
Passed: runtime/cds/appcds/javaldr/LockDuringDump.java
Passed: runtime/cds/appcds/jigsaw/modulepath/AddReads.java
Passed: runtime/cds/appcds/jvmti/parallelLoad/ParallelLoadAndTransformTest.java
Passed: runtime/cds/appcds/jigsaw/modulepath/ExportModule.java
Passed: runtime/cds/appcds/jigsaw/modulepath/ModulePathAndCP.java
Passed: runtime/cds/appcds/jigsaw/modulepath/MainModuleOnly.java
Passed: runtime/cds/appcds/jigsaw/modulepath/OptimizeModuleHandlingTest.java
Passed: runtime/cds/appcds/LambdaContainsOldInf.java
Passed: runtime/cds/appcds/LambdaWithOldClass.java
Passed: runtime/cds/appcds/LambdaWithUseImplMethodHandle.java
Passed: runtime/cds/appcds/jigsaw/JigsawOptionsCombo.java
Passed: runtime/cds/appcds/MissingSuperTest.java
Passed: runtime/cds/appcds/MismatchedPathTriggerMemoryRelease.java
Passed: runtime/cds/appcds/jigsaw/modulepath/ModulePathAndCP_JFR.java
Passed: runtime/cds/appcds/OldInfExtendsInfDefMeth.java
Passed: runtime/cds/appcds/OldSuperClass.java
Passed: runtime/cds/appcds/OldSuperInf.java
Passed: runtime/cds/appcds/jvmti/transformRelatedClasses/TransformInterfaceImplementorAppCDS.java
Passed: runtime/cds/appcds/OldClassTest.java
Passed: runtime/cds/appcds/OldSuperInfIndirect.java
Passed: runtime/cds/appcds/jvmti/transformRelatedClasses/TransformSuperSubAppCDS.java
Passed: runtime/cds/appcds/ParallelLoad2.java
Passed: runtime/cds/appcds/Prot...

Read more...

tags: added: verification-done-lunar
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openjdk-17 - 17.0.6+10-1ubuntu3

---------------
openjdk-17 (17.0.6+10-1ubuntu3) lunar; urgency=medium

  * d/control: add jtreg6 dependencies, regenerate control.
  * d/t/{jdk,hotspot,jaxp,lantools}: run tier1 and tier2 jtreg tests only,
    add test options from OpenJDK makefile.
  * d/t/*: fix test environment: add missing -nativepath (LP: #2001563).
  * d/t/jdk: provide dbus session for the window manager (LP: #2001576).
  * d/p/build_gtest.patch: build OpenJDK with the system googletest
    (LP: #2012316).
  * d/p/*: add patches for jtreg tests:
    - disable-thumb-assertion.patch: fix JDK-8305481.
    - update-assertion-for-armhf.patch: fix JDK-8305480.
    - misalign-pointer-for-armhf.patch: packaging-specific patch to fix test
      failure introduced by d/p/m68k-support.diff.
    - log-generated-classes-test.patch: workaround JDK-8166162.
    - update-permission-test.patch: add security permissions for testng 7.
    - ldap-timeout-test-use-ip.patch, test-use-ip-address.patch: Ubuntu-specific
      patches to workaround missing DNS resolver on the build machines.
    - exclude_broken_tests.patch: quarantine failing tests.
  * d/rules: package external debug symbols (LP: #2015835).
  * drop d/p/{jaw-classpath.diff, jaw-optional.diff}: the atk wrapper is disabled
    and these patches cause class data sharing tests to fail (LP: #2016194).
  * d/p/exclude-broken-tests.patch: add OpenJDK 17 failures.
  * d/t/jtreg-autopkgtest.in: pass JTREG home to locate junit.jar, regenerate
    d/t/jtreg-autopkgtest.sh (LP: #2016206).

 -- Vladimir Petko <email address hidden> Mon, 27 Mar 2023 11:41:46 +1300

Changed in openjdk-17 (Ubuntu):
status: New → Fix Released
Revision history for this message
Samuel thibault (samuel-thibault) wrote :

So this just completely broke java accessibility on Ubuntu & Debian. Without any coordination with any accessibility team.

Yes, the bridge is not enabled by default, because some issues were reported in some applications. But that doesn't mean that nobody is using it.

> If the accessibility bridge will be required by the application it should include it manually

The accessibility bridge is required by *ALL* java applications for people that need to use a screen reader to be able to use their computer. It does *not* make sense for an application to have to add this in their class path.

I had reported the bridge loading issue in Orcale Incident Report 9127367 in June 2018, and Oracle didn't manage to reproduce it. Well, now that it's completely broken in Ubuntu *and* Debian, perhaps they can realize that there is something to be fixed? As a reminder, accessibility is a *requirement* in various legislations.

Revision history for this message
Samuel thibault (samuel-thibault) wrote :

FI, this is https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8204862 , I *did* provide reproduction scenarii, but Oracle wasn't able to reproduce it, and the closed-development bug tracker of Oracle doesn't allow me to comment so people get to know the actual state of the issue.

Revision history for this message
Vladimir Petko (vpa1977) wrote (last edit ):

In order to enable accessibility bridge before the patch removal, the property file had to be edited (or .accessibility_properties created in the user's home).
This was the assumption that the launcher of the desktop application or user's CLASSPATH environment variable could be also modified to include accessibility classes.

Java 9 and up requires to extend AccessibilityProvider class[1] though it still contains a fallback to just load the classes:
----------
            names.stream()
                 .filter(n -> !providers.containsKey(n))
                 .forEach(Toolkit::fallbackToLoadClassForAT);
----------
Since I've seen that the provider is built for Java 8 and not the higher versions it has also contributed to the assumption. The oracle bug is closed upstream for this reason[2].

Going forward we could update the accessibility provider to the new API and bake it into the runtime image via jlink step when we build the openjdk-jre-headless package. We should probably keep the properties file disabled and advice to enable accessibility via .accessibility.properties in the user's home. This is the approach that is being used by the Oracle build of JDK. We could also provide an utility similiar to `jabswitch` to enable accessibility.

[1] https://docs.oracle.com/javase/10/docs/api/javax/accessibility/AccessibilityProvider.html
[2] https://bugs.openjdk.org/browse/JDK-8204862

Revision history for this message
Vladimir Petko (vpa1977) wrote (last edit ):

It would be nice to avoid a circular dependency and build atk wrapper as a part of openjdk build or make jre-accessible package which would be produced from openjdk and atk wrapper packages.

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

Other bug subscribers

Bug attachments

Remote bug watches

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