Comments (8)
I think the root of the problem here is in SystemLookup.java
because jdkLibraryPath("syslookup")
is answering ${java.home}/bin/libsyslookup.so
when, on AIX, os.name=Windows
. I suggest this would be solved by replacing the two uses of Utils.IS_WINDOWS
with OperatingSystem.isWindows()
.
I'll create a pull request to validate that.
from openj9.
@ChengJin01 did ibmruntimes/openj9-openjdk-jdk21#159 break AIX?
from openj9.
jdk22 as well https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.openjdk_ppc64_aix_Nightly/73
ibmruntimes/openj9-openjdk-jdk22#61
from openj9.
The failing test at https://github.com/ibmruntimes/openj9-openjdk-jdk21/blob/openj9/test/jdk/java/foreign/TestFallbackLookup.java is intended to verify whether an exception is triggered by loading a non-existent ucrtbase.dll
on Winfdows:
public class TestFallbackLookup {
@Test
void testBadSystemLookupRequest() {
// we request a Linker, forcing OS name to be "Windows". This should trigger an exception when
// attempting to load a non-existent ucrtbase.dll. Make sure that no error is generated at this stage.
assertTrue(Linker.nativeLinker().defaultLookup().find("nonExistentSymbol").isEmpty()); <------
}
}
in which NullPointerException
came from getInlinedFunctListAddr()
added in ibmruntimes/openj9-openjdk-jdk21#159 which should never fail at
private static MemorySegment getInlinedFunctListAddr() {
...
SymbolLookup funcsLibLookup = libLookup(libs -> libs.load(jdkLibraryPath("syslookup")));
given https://github.com/ibmruntimes/openj9-openjdk-jdk21/blob/openj9/closed/src/java.base/aix/native/libsyslookup/syslookup.c
exists out there (unless libsyslookup.so
was not generated in compilation). I will need to investigate to see what really happened in there.
from openj9.
I think the problem came from the option -Dos.name=Windows
specified at https://github.com/ibmruntimes/openj9-openjdk-jdk21/blob/openj9/test/jdk/java/foreign/TestFallbackLookup.java:
/*
* @test
* @enablePreview
* @requires jdk.foreign.linker != "UNSUPPORTED"
* @run testng/othervm -Dos.name=Windows --enable-native-access=ALL-UNNAMED TestFallbackLookup
*/
which is intended to verify the unexpected behavior if the os.name
changes to Windows
in which case it skips OperatingSystem.isAix()
without checking System.getProperty("os.name")
in getInlinedFunctListAddr()
, which ended up with a null value when loading libsyslookup.so
via libLookup()
, which means we have to restore Utils.IS_AIX
and Utils.IS_ZOS
back in the code to prevent such abnormal situation.
FYI: @keithc-ca
from openj9.
I'd rather see a solution that doesn't involve making changes to Utils
.
from openj9.
I'd rather see a solution that doesn't involve making changes to
Utils
.
There is no easy way around this situation given the problem essentially comes from the inconsistency between the platform property specified in OperatingSystem
and system property os.name
unless we are able to consolidate both of them in dealing with this platform specific case (which is out of scope with this issue).
from openj9.
Close the issue as resolved.
from openj9.
Related Issues (20)
- JEP 472: Prepare to Restrict the Use of JNI HOT 2
- jdk_security3_0_FAILED sun/security/ssl/SSLEngineImpl/SSLEngineBadBufferArrayAccess.java Exception: Client: Data length error HOT 1
- serviceability_jvmti_j9_1_FAILED serviceability/jvmti/thread/GetStackTrace/getstacktr07/getstacktr07.java Fatal error: SetBreakpoint failed HOT 10
- Fix disabled tests in ValueTypeTests
- OpenJDK VarHandleTest expected object to not be null HOT 2
- jdk22 doesn't work to boot jdknext on xmac - Failed to load library libawt.dylib HOT 1
- Jenkins test job failure: MultipleCompilationErrorsException: startup failed HOT 2
- How can I avoid a hang on error during CRIU checkpoint?
- [zOS S390] 80 JVM_Functionality.RAS Trace Non-Smoke.Mode110.1 ArrayIndexOutOfBoundsException: Array index out of range: 0 at com.ibm.trace.tests.apptrace.TestJavaCoreAndSnap.main(TestJavaCoreAndSnap.java:36) & Trace point lines did not match:j9mm.668 vs base HOT 15
- Access to rh8-390-2 for debugging HOT 3
- Fix tests in disabled variations of ValueTypeTestsJIT HOT 1
- jdk_lang_VarHandleTest_j9_1_FAILED java/lang/invoke/VarHandles/VarHandleTestByteArrayAsChar.java AssertionError: No throwable thrown. Expected class java.nio.ReadOnlyBufferException expected object to not be null HOT 1
- [FFI] Avoid creating duplciate ffi_types for the same structs in preparing the cif data for downcall HOT 1
- Improve UnsafeFastPath to use a constant value if offset node is a loadConst node
- OpenJDK java/foreign/largestub/TestLargeStub IncompatibleClassChangeError HOT 1
- [linux_390] SE80_GIT decompileAtMethodResolve_0 Illegal instruction vmState=0x00000000 at Compiled_method=com/ibm/jvmti/tests/decompileAtMethodResolve/ResolveTest1Super.test()V HOT 1
- MathLoadTest_autosimd_special_5m_27 hang or slow waiting to be notified on: "JIT-QueueSlotMonitor-3"
- jdk_lang_1_FAILED java/lang/ProcessBuilder/PipelineLeaksFD.java AssertionError: More or fewer pipes than expected HOT 6
- [Windows IA32] 80 FVT_Serviceability.diagnostics.xdump_gpf_javacore.Mode121.1 gpf test failed Access Violations(s) detected in std_AnalyseDTFJJavacore.out HOT 2
- OpenJDK java/util/concurrent/ExecutorService/InvokeTest AssertionFailedError: invokeAll did not throw
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openj9.