-
Notifications
You must be signed in to change notification settings - Fork 18
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
jpy destroy_jvm freezes #103
Comments
Hi @makovez can you give some more details about your environment? jpy version, cpython version, java version, OS, etc. destroy_jvm() is working for me with jpy==0.13.0, cpython 3.11.3, Linux x86_64, OpenJDK 11.0.19 (as well as 17.0.7).
|
I'm using the jpy package which is inside snappy of snap last version 9.0 which is jpy-0.9.0 And i'm using jdk 1.8 All from windows or Linux is same. |
Are you able to take a stack trace during the freeze? https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/invocation.html#DestroyJavaVM
I suspect you may have non-daemon threads that aren't shutting down? |
How can i take a stack trace if frozen? I'm not using any threads. I'm just running it from python console This is the init.py script snappy that runs when i do from snappy import jpy https://github.com/senbox-org/snap-engine/blob/aacdf9524ee0e541746001c5919ab2b71f408e80/snap-python/src/main/resources/snappy/__init__.py |
I'm not sure on Windows, but on Linux you can use |
I runned it on the python process.
|
I'm able to reproduce this behavior by starting a non-daemon thread pool:
If you are able to stop the pool first, the destroy_jvm() should complete successfully. You might want to check in with https://github.com/senbox-org/snap-engine to see if this is something they allow you to do? There's also a question of "is jpy invoking destroy_jvm() in a manner that lets java know it's shutting down". That deserves some further investigation on our end. |
Hi,
I'm using jpy version inside snappy package, and when i call jpy.destroy_jvm() it hangs and freezes without returning nothing.
Can you confirm if you guys have same problem?
The text was updated successfully, but these errors were encountered: