You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opendal.apache.org by "Adrastopoulos (via GitHub)" <gi...@apache.org> on 2026/10/08 23:08:17 UTC

Java binding: a native panic ends the JVM. Is that intended?

GitHub user Adrastopoulos created a discussion: Java binding: a native panic ends the JVM. Is that intended?

Since #7777 (jni 0.22), blocking native methods go through `ThrowException`, whose `on_panic` calls `env.fatal_error(...)` (`bindings/java/src/error.rs:103-128`). JNI `FatalError` ends the JVM, but the doc comment above it (`:84-86`) says a panic becomes a `RuntimeException`. Async methods run on Tokio tasks with no unwind handling (`executor.rs:92-108`), so as far as we can read, the returned `CompletableFuture` never completes after a panic.

We have not reproduced a panic: we have no input that causes one, so this comes from reading the code. In a server JVM, an exception or a failed future affects one request, but an abort ends every request in flight. Is the abort intended? If not, we can propose a change: throw an exception from blocking calls, and complete the future exceptionally for async calls.

GitHub link: https://github.com/apache/opendal/discussions/8394

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org


Re: Java binding: a native panic ends the JVM. Is that intended?

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
GitHub user github-actions[bot] added a comment to the discussion: Java binding: a native panic ends the JVM. Is that intended?

**Mailing list thread:** https://lists.apache.org/thread/rf4lbppgm235f345wk22l7j2lch4ptyo

GitHub link: https://github.com/apache/opendal/discussions/8394#discussioncomment-18825112

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org