[JNI][Gandiva] LLVM generated code can't access some system functions on certain platforms
- Langage dominant
- Java
- Étoiles
- 94
- Forks
- 152
- Merge moyen
- 3 j 16 h
- PR mergées (30 j)
- 11
Description
### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par le chemin de chargement des bibliothèques JNI/Gandiva et le comportement RTLD_LOCAL par défaut de Java décrit dans l’issue ; comparez-le avec l’approche JNA et l’issue Apache Arrow associée. Reproduisez l’échec de sinh impliquant sinhl sur une plateforme Linux affectée, puis vérifiez que le code généré par LLVM peut résoudre les symboles système importés de Gandiva.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- backend
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100