-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JVM_LoadLibrary should handle .a files on AIX #19344
Comments
Line 3948 in 7f82a7d
invokes Line 3989 in 7f82a7d
which calls omr/port/aix/omrsl.c:omrsl_open_shared_library in which lib%s.a will be attempted if "lib%s" PLATFORM_DLL_EXTENSION (.so) loading failed.Attempt .so first - https://github.com/eclipse-openj9/openj9-omr/blob/9083c8237ac215927ac55b5db256780132983136/port/aix/omrsl.c#L236-L241
If the loading above failed, try
OpenJ9
|
Does that mean there is nothing to do other than remove the ClassLoaderHelper.mapAlternativeName() impl? |
I expect so. ibmruntimes/openj9-openjdk-jdk@04c93d5 was authored by @suchismith1993, Suchi, could you comment on if OpenJ9 JCL patch ClassLoaderHelper.mapAlternativeName() impl can be removed and use the upstream version instead?
|
Well it can't be removed, we'd change the OpenJ9 mapAlternativeName() to return null. |
Unless the OpenJ9 mapAlternativeName() is the only diff from upstream. |
I agree with @JasonFengJ9: it appears that OMR tries loading from a |
I had a personal build w/o the OpenJ9 JCL patch. |
That doesn't look good:
|
Yeah, I saw that as well, running another grinder with an earlier build w/o the change - passed. |
I've created one from the latest source, df04358223e.
It's on paix822 ( |
In addition to removing implementaion, need to set loadLibraryOnlyIfPresent to false. That way the control is passed to the native code to handle the cases for AIX dynamic libraries. |
Is
This doesn't pass the LoadAIXLibraryFromArchiveObject.java, it seems OpenJ9 change is still required to adopt upstream version. |
@JasonFengJ9 What is the status of this issue? |
@tajila Apologies, this was distracted by other items, will make it a priority. |
The issue isn't really resolved as we still ended up with failure to load To be specific, I tried to build the jextract tool on AIX by following the instructions at https://github.com/openjdk/jextract?tab=readme-ov-file#building but it failed in creating the jextract image as follows:
So I tried to narrow down to the failing code in jextract at https://github.com/openjdk/jextract/blob/e55aacfda23211406552357095b6eb780f0fa8e5/src/main/java/org/openjdk/jextract/clang/LibClang.java#L91
and commented it out to avoid loading the
Looking at the symbol table in libclang.a
That being said, the library loading issue still occurs on AIX, which we can't skip as required in compiling jextract. |
Can you try running your test case with the new tracepoints enabled so we can understand what's happening? |
This has nothing to do with any OpenJ9/other test case but the jextract compilation guided by https://github.com/openjdk/jextract?tab=readme-ov-file#building (builded by using the |
Can we run the following code snippet in a standalone testcase?
Does OpenJ9 throw In addition, try the following code snippet in a standalone testcase with a command line option
What's the test output? Does RI pass? |
I tried the following test case on JDK17 & JDK22
(1) JDK17: (required by gradle in building the jextract tool)
(2) JDK22:
Unfortunately, there is no RI (JDK17+) for reference on AIX. |
What's the output for the following code snippet?
RI AIX JDK17 - https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_ppc64_aix_hotspot_17.0.12_7.tar.gz |
Tried the code as follows:
and still ended up with the same result.
|
(1) JDK17/Hotspot: (the same failure as OpenJ9)
(2) JDK22/Hotspot:
|
can you try loading with libclang.a(libclang.so.16) ? |
I already tried with |
How was |
|
Do we know if RI uses this library? maybe not? |
This is irrelevant to how RI works but the jextract tool which requires LLVM binaries as everything with jextract is based on |
I don't think it is related to the LLVM binaries but the loading mechanism in JDK on AIX. e.g. for the test case loading
with the same exception as above:
|
It could be the incompatible library like https://www.ibm.com/support/pages/error-0509-022-cannot-load-module-librclibmratlso
|
Trace point |
Traces output:
which doesn't include any meaningful information with the library loading. |
It seems What's the test output for OpenJ9 Java 11, and IBM Java 8 64/32 bit? |
Based on the result on JDK8/11, it seems JDK8+ never successfully loads a |
Looking at https://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf
which explain why JDK8/11 failed to load Looking at the following explanation of the
In theory,
|
No, this is incorrect. |
I double-checked
That means In addition, I tried to add |
As discussed with @JasonFengJ9 offline, it turns out that the issue with library loading in the jextract generation is totally different from what needs to be addressed in this issue. So I agree to close this issue and a new issue will be created for with we encountered on AIX. |
My understanding is that on AIX, the subject of a |
The truth is that the existing code in OpenJ9/OMR dealing with |
Re ibmruntimes/openj9-openjdk-jdk#776 (review) we should update JVM_LoadLibrary on AIX to handle .a files to match the RI, and then remove the ClassLoaderHelper.mapAlternativeName() impl.
The text was updated successfully, but these errors were encountered: