-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
SIGBUS errors on Mac ARM with 17.0.9+9 #938
Comments
@alexet It looks like your code is usuing JNI or a library that does some sort of off-heap storage/processing - is that correct? |
We are using nio to fill the byte buffer but we are using no JNI ourselves. There is no reason for us to be using allocate direct in this instance but it can be faster with nio. |
Ah OK, I think I see, this is being caused by semmle which is a code scanning agent that got acquired by GitHub. I think the recommendation here is to get off the unsupported original semmle technology and move to GitHub advanced security. Recommend you contact GitHub / Semmle team (if they still exist). |
We are that team, the agent is not involved at all in this case and is not loaded. This is an test where we are running plain java code. Unfortunately due to the lack of ability to reduce it it is too much internal code to post here. I can confirm that this issue seems to be fixed by jdk 21 (but using jdk 21 is not really possible for a bit due to other issues). The issue only seems to be present on some sets of machines. The set that succeeds is macos 13 and the set that fails is macos 11, but there are other changes between those ci runners that makes it harder to pin down the changes. |
This is the section where you're calling out to the Unsafe library (and manipulating memory out side of the JVM's control as such). I'm not sure that can be refactored, but perhaps it's not quite interacting with older Mac OS X versions. Can that be refactored somehow? |
The call stack is missing multiple inlined entries which can be seen in the annotated dump of the JIT code. At the call instruction we can see it is annotated with the several inlined frames.
So the unsafe is an internal implementation detail of the jdk so we can't avoid it easily. |
Ah OK thanks. I think the challenge here is going to be creating a reproducer. Is there a simple Java program you can write that invokes com.semmle.inmemory.relations.IteratorLoader::tryReadTuple@6 (line 61)? Is it a library we can test against from Maven central or somewhere? |
We are marking this issue as stale because it has not been updated for a while. This is just a way to keep the support issues queue manageable. |
Please provide a brief summary of the bug
Since updating to 17.0.9 we have seen multiple SIGBUS issues but not reproducibly on macos. We have not seen this with 17.0.8.
Please provide steps to reproduce where possible
I haven't managed to reproduce this reliably nor with any reduced amount of code.
The code in question is basically:
However it seems that it isn't quite enough to run that in a loop.
Expected Results
Not a jvm crash.
Actual Results
Log highlights
Full log
hs_err_pid85389.log
What Java Version are you using?
openjdk version "17.0.9" 2023-10-17
What is your operating system and platform?
OS: macOS 11.7
Architecture: aarch64
How did you install Java?
tar from adoptium then
Did it work before?
Yes, It works with 17.0.8.1
Did you test with the latest update version?
We haven't seen it with Java 21 but we didn't do enough testing with Java 21 to say that it inst an issue.
Did you test with other Java versions?
No response
Relevant log output
Full log attached above.
The text was updated successfully, but these errors were encountered: