Skip to content

Conversation

@Karm
Copy link
Contributor

@Karm Karm commented Jul 13, 2024

If there is a problem with finding and calling e.g. java/awt/GraphicsEnvironment in AWTIsHeadless, the env' Exception remains set and it is not cleared. Later, that manifests as:

Fatal error reported via JNI: Could not allocate library name

Which is misleading. The code path is perhaps rare in a normal JDK usage, but it has been complicating our users' bug reports in the GraalVM/native-image ecosystem for quite some time.

Instead of failing later indicating that the user has incorrectly configured JNI, it bails out very soon with a message that seems as if a jstring could not have been allocated. It sends users on wild goose chases where it appears JNU_NewStringPlatform calls failed, e.g.

This commit fixes the error reporting in the AWTIsHeadless.

Furthermore, when AOT compiled, there is little sense for having a JAVA_HOME, yet some parts of AWT code look for it to search fonts. In such case, an empty directory structure is enough to accommodate it, e.g.

/tmp/JAVA_HOME/
/tmp/JAVA_HOME/conf
/tmp/JAVA_HOME/conf/fonts
/tmp/JAVA_HOME/lib

The exception is somewhat cryptic for users again, merely stating:

Exception in thread "main" java.io.IOException: Problem reading font data.
    at java.desktop@22.0.1/java.awt.Font.createFont0(Font.java:1205)
    at java.desktop@22.0.1/java.awt.Font.createFont(Font.java:1076)
    at imageio.Main.loadFonts(Main.java:139

Adding the cause there makes it clearer, i.e. that JAVA_HOME might be missing:

Exception in thread "main" java.io.IOException: Problem reading font data.
    at java.desktop@23-internal/java.awt.Font.createFont0(Font.java:1206)
    at java.desktop@23-internal/java.awt.Font.createFont(Font.java:1076)
    at imageio.Main.loadFonts(Main.java:139)
    at imageio.Main.paintRectangles(Main.java:97)
    at imageio.Main.main(Main.java:195)
    at java.base@23-internal/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.lang.Error: java.home property not set
    at java.desktop@23-internal/sun.awt.FontConfiguration.findFontConfigFile(FontConfiguration.java:180)
    at java.desktop@23-internal/sun.awt.FontConfiguration.<init>(FontConfiguration.java:97)

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8336382: Fix error reporting in loading AWT (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20169/head:pull/20169
$ git checkout pull/20169

Update a local copy of the PR:
$ git checkout pull/20169
$ git pull https://git.openjdk.org/jdk.git pull/20169/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 20169

View PR using the GUI difftool:
$ git pr show -t 20169

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20169.diff

Using Webrev

Link to Webrev Comment

If there is problem with finding and calling e.g. java/awt/GraphicsEnvironment
in AWTIsHeadless, the env' Exception remains set and it not cleared.
Later, that manifests as:

    Fatal error reported via JNI: Could not allocate library name

Which is misleading. The code path is perhaps rare in normal JDK usage,
but it has been complicating our users' bug reports in the GraalVM/native-image
ecosystem for quite some time.

Instead of failing later with some clear message that indicates that the
user has incorrectly configured JNI, it bails out very soon with a message
that seems as if a jstring could not have been allocated. It sends users
on wild goose chases, e.g.

oracle/graal#9138
oracle/graal#8475
oracle/graal#9300
quarkusio/quarkus#31596
graalvm/mandrel#292
Karm/mandrel-integration-tests#262

This commit fixes the error reporting in the AWTIsHeadless.

Furthermore, when AOT compiled, there is little sense for having a JAVA_HOME,
yet some parts of AWT code look for it to search fonts. In such case, an
empty directory structure is enough to accommodate it, e.g.

/tmp/JAVA_HOME/
/tmp/JAVA_HOME/conf
/tmp/JAVA_HOME/conf/fonts
/tmp/JAVA_HOME/lib

The exception is somewhat cryptic for users again, merely stating:

    Exception in thread "main" java.io.IOException: Problem reading font data.
        at java.desktop@22.0.1/java.awt.Font.createFont0(Font.java:1205)
        at java.desktop@22.0.1/java.awt.Font.createFont(Font.java:1076)
        at imageio.Main.loadFonts(Main.java:139

Adding the cause there makes it clearer, i.e. that JAVA_HOME might be missing:

    Exception in thread "main" java.io.IOException: Problem reading font data.
        at java.desktop@23-internal/java.awt.Font.createFont0(Font.java:1206)
        at java.desktop@23-internal/java.awt.Font.createFont(Font.java:1076)
        at imageio.Main.loadFonts(Main.java:139)
        at imageio.Main.paintRectangles(Main.java:97)
        at imageio.Main.main(Main.java:195)
        at java.base@23-internal/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
    Caused by: java.lang.Error: java.home property not set
        at java.desktop@23-internal/sun.awt.FontConfiguration.findFontConfigFile(FontConfiguration.java:180)
        at java.desktop@23-internal/sun.awt.FontConfiguration.<init>(FontConfiguration.java:97)
@bridgekeeper
Copy link

bridgekeeper bot commented Jul 13, 2024

👋 Welcome back Karm! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jul 13, 2024

@Karm This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8336382: Fix error reporting in loading AWT

Reviewed-by: prr, aivanov, serb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1784 new commits pushed to the master branch:

  • 22069ff: 8348975: Broken links in the JDK 24 JavaDoc API documentation, build 33
  • f81772a: 8348647: CDS dumping commits 3GB when large pages are used
  • fb0f2d2: 8300708: Some nsk jvmti tests fail with virtual thread wrapper due to jvmti missing some virtual thread support
  • bb528d5: 8348567: [ASAN] Memory access partially overflows by NativeCallStack
  • e0c2cb4: 8348663: [AIX] clang pollutes the burned-in library search paths of the generated executables
  • 14136f8: 8347564: ZGC: Crash in DependencyContext::clean_unloading_dependents
  • 04c24f1: 8347779: sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java fails with Unable to deduce type of thread from address
  • d985b31: 8342096: Popup menus that request focus are not shown on Linux with Wayland
  • cbe9ec5: 8348905: Add support to specify the JDK for compiling Jtreg tests
  • 6b581d2: 8347997: assert(false) failed: EA: missing memory path
  • ... and 1774 more: https://git.openjdk.org/jdk/compare/73ebb848fdb66861e912ea747c039ddd1f7a5f48...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@avu, @prrace, @aivanov-jdk, @mrserb) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk
Copy link

openjdk bot commented Jul 13, 2024

@Karm The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Jul 13, 2024
@Karm Karm changed the title Fixes error reporting in loading AWT and fonts 8336382: Fixes error reporting in loading AWT and fonts Jul 15, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 15, 2024
@mlbridge
Copy link

mlbridge bot commented Jul 15, 2024

Copy link
Contributor

@avu avu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, please update copyright years in the changed files.

Copy link
Contributor

@prrace prrace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is nothing in this PR that I would accept. It should be withdrawn.

@Karm
Copy link
Contributor Author

Karm commented Jul 24, 2024

Hello @prrace

TBH, I got somewhat bewildered by your comments on how this PR makes no sense. Then I realized I might have been erroneously treating the AWTIsHeadless function's contents as correct, merely building on the previous error.

If you take a look at the flow of awt_LoadLibrary.c, my problem with it is that errors originating in AWTIsHeadless are reported way later in AWT_OnLoad and that is wrong.

awt_LoadLibrary.c:
JDK-pr-20169-drawing

Previous fix

So I made this PR, thinking that for some headless JDK distributions it is O.K. to be entirely missing java/awt/GraphicsEnvironment class or isHeadless method.

@@ -62,15 +62,24 @@ JNIEXPORT jboolean JNICALL AWTIsHeadless() {
         graphicsEnvClass = (*env)->FindClass(env,
                                              "java/awt/GraphicsEnvironment");
         if (graphicsEnvClass == NULL) {
+            // Not finding the class is not necessarily an error.
+            if ((*env)->ExceptionCheck(env)) {
+                (*env)->ExceptionClear(env);
+            }
             return JNI_TRUE;
         }
         headlessFn = (*env)->GetStaticMethodID(env,
                                                graphicsEnvClass, "isHeadless", "()Z");
         if (headlessFn == NULL) {
+            // If we can't find the method, we assume headless mode.
+            if ((*env)->ExceptionCheck(env)) {
+                (*env)->ExceptionClear(env);
+            }
             return JNI_TRUE;
         }
         isHeadless = (*env)->CallStaticBooleanMethod(env, graphicsEnvClass,
                                                      headlessFn);
+        // If an exception occurred, we assume headless mode.
         if ((*env)->ExceptionCheck(env)) {
             (*env)->ExceptionClear(env);
             return JNI_TRUE;

New fix

The new fix I propose treats the missing class or missing method as fatal errors. The crash makes sense, the error message is correct:

$ ./target/imageio   -Djava.awt.headless=true
Fatal error reported via JNI: java/awt/GraphicsEnvironment class not found

Printing instructions (ip=0x000000000048f8d9):
...

It's a little more invasive though:

diff --git a/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c b/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c
index 0fc44bfca71..7ef6dab8682 100644
--- a/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c
+++ b/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c
@@ -43,6 +43,12 @@
 #define VERBOSE_AWT_DEBUG
 #endif
 
+#define CHECK_EXCEPTION_FATAL(env, message) \
+    if ((*env)->ExceptionCheck(env)) { \
+        (*env)->ExceptionClear(env); \
+        (*env)->FatalError(env, message); \
+    }
+
 static void *awtHandle = NULL;
 
 typedef jint JNICALL JNI_OnLoad_type(JavaVM *vm, void *reserved);
@@ -61,25 +67,13 @@ JNIEXPORT jboolean JNICALL AWTIsHeadless() {
         env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
         graphicsEnvClass = (*env)->FindClass(env,
                                              "java/awt/GraphicsEnvironment");
-        if (graphicsEnvClass == NULL) {
-            // Not finding the class is not necessarily an error.
-            if ((*env)->ExceptionCheck(env)) {
-                (*env)->ExceptionClear(env);
-            }
-            return JNI_TRUE;
-        }
+        CHECK_EXCEPTION_FATAL(env, "java/awt/GraphicsEnvironment class not found");
         headlessFn = (*env)->GetStaticMethodID(env,
                                                graphicsEnvClass, "isHeadless", "()Z");
-        if (headlessFn == NULL) {
-            // If we can't find the method, we assume headless mode.
-            if ((*env)->ExceptionCheck(env)) {
-                (*env)->ExceptionClear(env);
-            }
-            return JNI_TRUE;
-        }
+        CHECK_EXCEPTION_FATAL(env, "isHeadless method not found");
         isHeadless = (*env)->CallStaticBooleanMethod(env, graphicsEnvClass,
                                                      headlessFn);
-        // If an exception occurred, we assume headless mode.
+        // If an exception occurred, we assume headless mode and carry on.
         if ((*env)->ExceptionCheck(env)) {
             (*env)->ExceptionClear(env);
             return JNI_TRUE;
@@ -88,12 +82,6 @@ JNIEXPORT jboolean JNICALL AWTIsHeadless() {
     return isHeadless;
 }
 
-#define CHECK_EXCEPTION_FATAL(env, message) \
-    if ((*env)->ExceptionCheck(env)) { \
-        (*env)->ExceptionClear(env); \
-        (*env)->FatalError(env, message); \
-    }
-
 /*
  * Pathnames to the various awt toolkits
  */

Thanks for your time. I hope the PR makes more sense now or at least that I managed to get my point across.

If you think there is a better way to handle it, tell me and I'll do it. I don't dwell on a particular implementation, I merely want the misleading error gone.

Thx
K.

@Karm Karm requested a review from prrace July 24, 2024 12:46
@theRealAph
Copy link
Contributor

There is nothing in this PR that I would accept. It should be withdrawn.

I think we're all finding it a bit hard to understand what to do.

Is the problem that

  • This is not a bug?
  • This is not a bug that should be fixed?
  • The fix is wrong?
  • There is a much better way to fix it?
  • This is an enhancement, but it is not a worthwhile one?

Please, help us here.

@theRealAph
Copy link
Contributor

P.S. There surely is an actual problem here: the error message that is currently output misrepresents the actual cause of the failure.

@Karm
Copy link
Contributor Author

Karm commented Sep 13, 2024

ping @prrace

@jerboaa
Copy link
Contributor

jerboaa commented Sep 23, 2024

@Karm There are a few things that have not yet been addressed:

  • @avu mentioned here that copyright years of the file need updating
  • There is a title mismatch between this PR and the JBS entry. Which one should it be if any? (and I'll help you fix that one).

I'd also merge in latest master since x86 tests have since been disabled. That should fix the GHA issue.

Thanks!

@Karm
Copy link
Contributor Author

Karm commented Sep 28, 2024

Hello @jerboaa,

  • @avu mentioned here that copyright years of the file need updating

The year there is 2024 for both edited files.

  • There is a title mismatch between this PR and the JBS entry. Which one should it be if any? (and I'll help you fix that one).

Use the title from this PR, please.

I'd also merge in latest master since x86 tests have since been disabled. That should fix the GHA issue.

Done.

@Karm
Copy link
Contributor Author

Karm commented Sep 28, 2024

Font.java and information leakage

@prrace @jerboaa

Would this solution address the concern? Instead of passing on the whole throwable, we just inspect it and if it is this particular one, we pass on the information to the user?

+++ b/src/java.desktop/share/classes/java/awt/Font.java
@@ -971,6 +971,9 @@ public static Font[] createFonts(InputStream fontStream)
             }
             return createFont0(fontFormat, fontStream, true, tracker);
         } catch (InterruptedException e) {
+            if (e.getCause().getMessage().contains("java.home property not set")) {
+                throw new IOException("Problem reading font data. java.home property not set.");
+            }
             throw new IOException("Problem reading font data.");

@Karm
Copy link
Contributor Author

Karm commented Sep 29, 2024

Font.java and information leakage

@prrace @jerboaa

Would this solution address the concern? Instead of passing on the whole throwable, we just inspect it and if it is this particular one, we pass on the information to the user?

+++ b/src/java.desktop/share/classes/java/awt/Font.java
@@ -971,6 +971,9 @@ public static Font[] createFonts(InputStream fontStream)
             }
             return createFont0(fontFormat, fontStream, true, tracker);
         } catch (InterruptedException e) {
+            if (e.getCause().getMessage().contains("java.home property not set")) {
+                throw new IOException("Problem reading font data. java.home property not set.");
+            }
             throw new IOException("Problem reading font data.");

I retract this. It's not that inconvenient and I don't want to complicate this PR.

@jerboaa
Copy link
Contributor

jerboaa commented Sep 30, 2024

  • There is a title mismatch between this PR and the JBS entry. Which one should it be if any? (and I'll help you fix that one).

Use the title from this PR, please.

Done.

@Karm
Copy link
Contributor Author

Karm commented Oct 3, 2024

@prrace I added a test that triggers the described issue.

Unpatched awt_LoadLibrary.c

$ TIME=`date +%s`;mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport; jtreg -a -ignore:quiet -w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTr
eport -jdk:/home/karm/workspaceRH/jdk/build/linux-x86_64-server-release/images/graal-builder-jdk/ /home/karm/workspaceRH/jdk/test/jdk/java/awt/Headless/;
Test results: passed: 14; failed: 1
...
Output and diagnostic info for process 578718 was saved into 'pid-578718-output.log'
----------System.err:(38/2940)----------
 stdout: [Transforming java.awt.GraphicsEnvironment.
isHeadless removed from java.awt.GraphicsEnvironment.
FATAL ERROR in native method: Could not allocate library name
        at jdk.internal.loader.NativeLibraries.load(java.base@24-internal/Native Method)
        at jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(java.base@24-internal/NativeLibraries.java:331)
...
test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 'FATAL ERROR in native method: isHeadless method not found' missing from stdout/stderr

Patched awt_LoadLibrary.c

$ TIME=`date +%s`;mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport; jtreg -a -ignore:quiet -w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTreport -jdk:/home/karm/workspaceRH/jdk/build/linux-x86_64-server-release/images/graal-builder-jdk/ /home/karm/workspaceRH/jdk/test/jdk/java/awt/Headless/;
Test results: passed: 15

Copy link
Contributor

@prrace prrace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is much better than what was there in the beginning.
FindClass failing - for a key API class - is probably a fatal error one way or another.
Although in all (?) other cases, we try to return to Java and let the VM throw a Java-level error.
Note that OnLoad is not the only code path that calls AWTIsHeadless, and there will be
Java code to return to in the other case.
However I think that the OnLoad will always be reached first, so maybe it is OK to do the current fix.
Either way, things aren't going to work.

Generally the calls to check and clear exceptions when looking up code are there
to keep 'tools' happy. If these classes aren't found something is badly wrong.
meaning it should NEVER EVER happen.
Failing to find java/lang/String for example hardly seems like something it is worth trying to recover from ..
In your case it seems like it does some times happen for GraphicsEnvironment which still worries me.
I don't want to make this fix a precedent for assuming that it is normal for classes to be missing.
So consider it a truly exceptional case.

@openjdk
Copy link

openjdk bot commented Jan 28, 2025

⚠️ @Karm the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout awt-load-messages-fonts
$ git commit --author='Preferred Full Name <you@example.com>' --allow-empty -m 'Update full name'
$ git push

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 28, 2025
@mrserb
Copy link
Member

mrserb commented Jan 28, 2025

So consider it a truly exceptional case.

FindClass("java/awt/GraphicsEnvironment") can fail with OutOfMemoryError, so even in this fix it is not an exceptional case. We still assume that standard classes should always be present in the bundle.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Jan 29, 2025

#define CHECK_EXCEPTION_FATAL(env, message) \
if ((*env)->ExceptionCheck(env)) { \
(*env)->ExceptionDescribe(env); \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that ExceptionDescribe could leak something important?

Should we preserve ExceptionClear instead?

Comment on lines -64 to +70
if (graphicsEnvClass == NULL) {
return JNI_TRUE;
}
CHECK_EXCEPTION_FATAL(env, "FindClass java/awt/GraphicsEnvironment failed");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't make myself clear.

Since there's no Java code to catch the exception, there's no other option but to call (*env)->FatalError via CHECK_EXCEPTION_FATAL.

@aivanov-jdk
Copy link
Member

@Karm I've updated the subject of the JBS issue; please update the PR subject.

@Karm Karm changed the title 8336382: Fixes error reporting in loading AWT and fonts 8336382: Fix error reporting in loading AWT Jan 29, 2025
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 29, 2025
@Karm
Copy link
Contributor Author

Karm commented Jan 29, 2025

So this is much better than what was there in the beginning. FindClass failing - for a key API class - is probably a fatal error one way or another. Although in all (?) other cases, we try to return to Java and let the VM throw a Java-level error. Note that OnLoad is not the only code path that calls AWTIsHeadless, and there will be Java code to return to in the other case. However I think that the OnLoad will always be reached first, so maybe it is OK to do the current fix. Either way, things aren't going to work.

Generally the calls to check and clear exceptions when looking up code are there to keep 'tools' happy. If these classes aren't found something is badly wrong. meaning it should NEVER EVER happen. Failing to find java/lang/String for example hardly seems like something it is worth trying to recover from .. In your case it seems like it does some times happen for GraphicsEnvironment which still worries me. I don't want to make this fix a precedent for assuming that it is normal for classes to be missing. So consider it a truly exceptional case.

Thank you for the review. This is indeed an awkward, yet real-world exceptional case.

@Karm
Copy link
Contributor Author

Karm commented Jan 29, 2025

@Karm I've updated the subject of the JBS issue; please update the PR subject.

Thank you @aivanov-jdk . Done.

@Karm
Copy link
Contributor Author

Karm commented Jan 30, 2025

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jan 30, 2025
@openjdk
Copy link

openjdk bot commented Jan 30, 2025

@Karm
Your change (at version 91d554f) is now ready to be sponsored by a Committer.

@jerboaa
Copy link
Contributor

jerboaa commented Jan 30, 2025

/sponsor

@openjdk
Copy link

openjdk bot commented Jan 30, 2025

Going to push as commit 1858dc1.
Since your change was applied there have been 1784 commits pushed to the master branch:

  • 22069ff: 8348975: Broken links in the JDK 24 JavaDoc API documentation, build 33
  • f81772a: 8348647: CDS dumping commits 3GB when large pages are used
  • fb0f2d2: 8300708: Some nsk jvmti tests fail with virtual thread wrapper due to jvmti missing some virtual thread support
  • bb528d5: 8348567: [ASAN] Memory access partially overflows by NativeCallStack
  • e0c2cb4: 8348663: [AIX] clang pollutes the burned-in library search paths of the generated executables
  • 14136f8: 8347564: ZGC: Crash in DependencyContext::clean_unloading_dependents
  • 04c24f1: 8347779: sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java fails with Unable to deduce type of thread from address
  • d985b31: 8342096: Popup menus that request focus are not shown on Linux with Wayland
  • cbe9ec5: 8348905: Add support to specify the JDK for compiling Jtreg tests
  • 6b581d2: 8347997: assert(false) failed: EA: missing memory path
  • ... and 1774 more: https://git.openjdk.org/jdk/compare/73ebb848fdb66861e912ea747c039ddd1f7a5f48...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 30, 2025
@openjdk openjdk bot closed this Jan 30, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Jan 30, 2025
@openjdk
Copy link

openjdk bot commented Jan 30, 2025

@jerboaa @Karm Pushed as commit 1858dc1.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@dholmes-ora
Copy link
Member

The new test will not compile. The ASM library has been removed from OpenJDK, except for use by some hotspot tests. Everything else should be converted to use the Classfile API. See JDK-8349099.

@Karm
Copy link
Contributor Author

Karm commented Jan 30, 2025

@dholmes-ora Let me take a look presently...

@magicus
Copy link
Member

magicus commented Jan 31, 2025

See https://bugs.openjdk.org/browse/JDK-8349099

@Karm I was wondering why this did not show up on GHA (it's probably not executed there). But I noticed when researching this that your last merge from mainline was in September. Even if there are no "physical" merge conflicts that git can detect, there are likely to be "logical" conflicts like this, where a library was removed that your test depended on.

So for a long running PR like this, when it is ready to be checked in, you need to merge in main and verify that the fix (and the tests) still works, and nothing else breaks. If there are no "physical" conflicts you do not need to push the merge to the PR on github, since that might invalidate approvals, but you need to test it locally.

As for how long "long running" is, I don't know. A week without merge is likely okay, 3 months is not.

@aivanov-jdk
Copy link
Member

See https://bugs.openjdk.org/browse/JDK-8349099

@Karm I was wondering why this did not show up on GHA (it's probably not executed there). But I noticed when researching this that your last merge from mainline was in September. Even if there are no "physical" merge conflicts that git can detect, there are likely to be "logical" conflicts like this, where a library was removed that your test depended on.

I thought I'd run the client tests with changes from this PR, and I usually merge master into my local branch before submitting a job. Yet I can't find the job, I might not have run the tests.

@Karm
Copy link
Contributor Author

Karm commented Mar 8, 2025

@magicus @aivanov-jdk

Thanks for the comments. I improved my flow; e.g. #23852 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client client-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

9 participants