apache / apache/arrow-java

[Gandiva][Java] Safeguard jvm before loading the gandiva library

Open
#364 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
94
Forks
152
Avg merge
3d 16h
Merged PRs (30d)
11

Description

Today we load the gandiva library always when trying to use the jni bridge, but we have run into issues causing the jvm to crash in untested paths.

Proposal is to do load the library in a separate process first and if it works only then load in the current process.

This would be done only once at startup/first load.

**Reporter**: [Praveen Kumar](https://issues.apache.org/jira/browse/ARROW-4003) / @praveenbingo

**Note**: *This issue was originally created as [ARROW-4003](https://issues.apache.org/jira/browse/ARROW-4003). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Java JNI bridge's first library-load path and how startup or first-load initialization currently works. Implement the proposed separate-process load check, then load in the current process only after it succeeds and ensure the check runs once; verify the JVM remains safe on failing or unsupported paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.