-
Notifications
You must be signed in to change notification settings - Fork 728
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
MacOS java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java - RuntimeException: Expected to get exit value of [0] #14397
Comments
This is showing up in jdk17 builds now. Possibly since the test was un-excluded. https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_sanity.openjdk_x86-64_mac_Nightly/148/ |
@JasonFengJ9 Is this only failing on macosx? |
It appears so, not seen in other platforms. |
exit code 139 on the process launched with ProcessBuilder indicates a crash. @babsingh Please investigate |
There were changes in OpenJDK made 7 days ago, |
Pasting more output form the grinder
|
Most recent grinder: https://hyc-runtimes-jenkins.swg-devops.com/job/Grinder/20769/
While executing
Without |
@babsingh can you reproduce this with JDK11? I would be good to understand when this issue started |
This test was introduced in JDK12 extensions repo. Running the full test with JDK11 causes an As per the below lldb output
|
The problem is related to the
Test: java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java The test sets After updating the test ... setting On Linux, the test passes with all three above-mentioned copies of We need to figure why the test only passes with Guesses:
|
There is a workaround to pass the test by using |
Makes sense. I've removed the blocker label. |
Workaround for eclipse-openj9/openj9#14397. Signed-off-by: Babneet Singh <[email protected]>
Workaround for eclipse-openj9/openj9#14397. Signed-off-by: Babneet Singh <[email protected]>
Workaround for eclipse-openj9/openj9#14397. Signed-off-by: Babneet Singh <[email protected]>
ProblemIn OpenJ9, openj9/runtime/redirector/redirector.c Lines 1160 to 1166 in 934d656
On Linux, the dynamic loader tries to open the library with absolute path-name before searching for it as per Ref 1. On OSX, the dynamic loader tries to find the library in the following order: For Potential Fixes
@pshipton @keithc-ca @tajila Which solution is preferred? Other Hacks/ExperimentsRef 5 discusses about hacks that won't work. For example, modifying the environment variable Refs
|
Another option is to revive #7380 so the main shared libraries don't conflict with the redirector. |
Seems to me some other platforms modify or set the environment variable so the correct library is found, in jvm.c. Any reason we can't do that? |
Doesn't the redirector locate the main shared library so an explicit path can be use rather than rely on any search path? |
Here, we are referring to the
Yes, an absolute path is used to locate |
The way I read that article, using It seems to me the only way to tolerate |
Clarification: In #14397 (comment), the second potential fix suggests to use
|
It's not clear to me it covers the same case we need. We should give it a try to be sure. |
If this turns out to be the only solution, we do have the option to only do it for Mac. In which case we don't need to address issues on AIX and z/OS. |
Making it platform-dependent complicates the build scripts in the extension repos a little; if we're considering that, I suggest we apply the change for all platforms except AIX and z/OS (at least until we can fix the issues on those platforms). |
re #14397 (comment): Code to The above change does not work. I have verified that the dynamic loader does not honour runtime changes to There was an outlier scenario which gave the illusion that the above change works. If the test is run through the JTReg test harness, the native test executable is invoked via So, our only solution to support/tolerate |
Hi, I am hitting a similar problem where JNI_CreateJavaVM() crashes on macOS Mojave 10.14.5, lldb shows this error:
Another issue I get when trying to do dlopen() on libsplashscreen.dylib, it is similar to a problem reported elsewhere: Is there a workaround to fix this problem? |
To confirm if it is the same issue. Does your crashing thread's backtrace match the backtrace shown in #14397 (comment)?
If the backtrace matches, then the |
Is this the proposed fix #7380 ? |
Failure link
From an internal build
job/Test_openjdk18_j9_sanity.openjdk_x86-64_mac_testList_1/1/
(osxrt8
):Rerun in Grinder - Change TARGET to run only the failed test targets.
Optional info
Failure output (captured from console output)
50x grinder -
job/Grinder/20614/
- all failedThe text was updated successfully, but these errors were encountered: