-
Notifications
You must be signed in to change notification settings - Fork 182
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
startJVM crashes Apple M1 #1143
Comments
I had the same problem |
Anyone found a solution? Experiencing same issues |
Unfortunately I have no insight into this problem. I would search the archives. It must be some mismatch between the assumptions of the JVM and Python. |
It seems that on Apple Silicon Macs any exception on the Java side leads to a SIGBUS crash. Here a short example:
Output (with openjdk@8 - the same happens with e.g. openjdk@21, the only difference is that the VM warning isn't shown in that case):
This makes debugging a chore. One workaround is to create Java-side wrapper code for everything. E.g.:
This is of course tedious, optimally one could write Python code without having to create wrappers. |
Unfortunately I do not have access to that machine. There is no reason for a sigbus to be happening unless the code was not compiled with exception support. We take Java exceptions and make them C++ exceptions. There is a master try block on every piece of code to ensure it can’t segfault when it gets to Python C layer.
|
Github seems to offer Apple Silicon macos runners to open source projects for free now: https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/ |
I had this same issue with the Python 3.9 that was bundled with Xcode. I installed the official Python 3.12 release and the issue went away. |
Can still reproduce the issue with Python 3.12.2 and the current jpype build from main.
An irrecoverable stack overflow has occurred.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000019607b1e8, pid=52964, tid=0x0000000000000103
#
# JRE version: (8.0_362-b09) (build )
# Java VM: OpenJDK 64-Bit Server VM (25.362-b09 mixed mode bsd-aarch64 compressed oops)
# Problematic frame:
# C [dyld+0x471e8] dyld4::Atlas::ProcessSnapshot::Serializer::deserialize(std::__1::span)+0x40
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
#
#
# If you would like to submit a bug report, please visit:
# http://www.azul.com/support/
#
|
jpype.startJVM()
crashes withA fatal error has been detected by the Java Runtime Environment
I also tried to build and test jpype but the first test seemed to abort without printing error message (The second code block contains the output).
I would appreciate any tips for debugging!
startJVM() crash:
JPype build log and test failure:
The text was updated successfully, but these errors were encountered: