apache / apache/incubator-graphar

[Bug][Java]: LLVM4JNI error with Java 11

Open
#277 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
373
Forks
93
Avg merge
7d 21h
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

We use Java 11 in our CI now. In Usually, Java is compatible with bytecode in lower version, but there are some error in our CI.

```
[INFO] [java] [INFO] Save class Library_f7129dd1_0$Invoker__J__V into /home/runner/work/GraphAr/GraphAr/java/target/llvm4jni-output/Library_f7129dd1_0$Invoker__J__V.class
[INFO] [java] [INFO] Save class Library_f7129dd1_0$Invoker__JJJJB__V into /home/runner/work/GraphAr/GraphAr/java/target/llvm4jni-output/Library_f7129dd1_0$Invoker__JJJJB__V.class
[INFO] [java] [INFO] Saved 92 classes into /home/runner/work/GraphAr/GraphAr/java/target/llvm4jni-output
[INFO] [java] #
[INFO] [java] # A fatal error has been detected by the Java Runtime Environment:
[INFO] [java] #
[INFO] [java] # SIGSEGV (0xb) at pc=0x00007f18e9d7daf1, pid=4872, tid=4876
[INFO] [java] #
[INFO] [java] # JRE version: OpenJDK Runtime Environment Temurin-11.0.21+9 (11.0.21+9) (build 11.0.21+9)
[INFO] [java] # Java VM: OpenJDK 64-Bit Server VM Temurin-11.0.21+9 (11.0.21+9, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
[INFO] [java] # Problematic frame:
[INFO] [java] # C [libllvm4jni.so+0x157daf1] llvm::detail::IEEEFloat::partCount() const+0x3
[INFO] [java] #
[INFO] [java] # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/runner/work/GraphAr/GraphAr/java/core.4872)
[INFO] [java] #
[INFO] [java] # An error report file with more information is saved as:
[INFO] [java] # /home/runner/work/GraphAr/GraphAr/java/hs_err_pid4872.log
[INFO] [java] #
[INFO] [java] # If you would like to submit a bug report, please visit:
[INFO] [java] # https://github.com/adoptium/adoptium-support/issues
[INFO] [java] # The crash happened outside the Java Virtual Machine in native code.
[INFO] [java] # See problematic frame for where to report the bug.
[INFO] [java] #
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
```

After testing, I find that Java 8 will not leads this error. But we prefer better compatibility with higher JVM.

### Expected Behavior

Pass CI

### Minimal Reproducible Example

https://github.com/Thespica/GraphAr/actions/runs/6785073898/job/18442607687

### Environment

- Operating system:
- GraphAr version:

### Link to GraphAr Logs

_No response_

### Further Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked GitHub Actions job and the generated java/hs_err_pid4872.log, focusing on the libllvm4jni.so crash at llvm::detail::IEEEFloat::partCount(). Compare the Java 8 and Temurin 11 runs to identify the LLVM4JNI compatibility cause. Done means the Java 11 CI job completes successfully without the native crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, github-actions, java
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.