[JNI][Gandiva] LLVM generated code can't access some system functions on certain platforms
- 主要言語
- Java
- スター
- 94
- フォーク
- 152
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 11
説明
### Describe the bug, including details regarding any error messages, version, and platform.
When linux loads libraries there are different options for symbols visibility like: RTLD_LOCAL, RTLD_GLOBAL. Default in Java is RTLD_LOCAL which makes all symbols inside Gandiva library only visible to the Gandiva library.
The problem is when LLVM compiles code and loads it into Java process that code won't be able to find any symbols imported by Gandiva. One example is 'sinhl' from libgcc which causes sinh function to fail when it is present in SQL query executed by Dremio using Gandiva engine. By importing JNA package we can control how to load Gandiva library and set Global symbol visibility.
See also: https://github.com/apache/arrow/issues/40839
コントリビューションガイド
調査の方向性
issue で説明されている JNI/Gandiva のライブラリ読み込みパスと、Java のデフォルトの RTLD_LOCAL 動作から始め、それを JNA のアプローチおよび関連する Apache Arrow issue と比較してください。影響を受ける Linux プラットフォームで sinhl に関係する sinh の失敗を再現し、その後、LLVM が生成したコードで Gandiva のインポートされたシステムシンボルを解決できることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100