[JNI][Gandiva] LLVM generated code can't access some system functions on certain platforms
- Vorherrschende Sprache
- Java
- Sterne
- 94
- Forks
- 152
- Ø Merge
- 3 T. 16 Std.
- Gemergte PRs (30 T.)
- 11
Beschreibung
### 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
Beitragsleitfaden
Rechercherichtung
Beginne mit dem JNI/Gandiva-Pfad zum Laden von Bibliotheken und dem im Issue beschriebenen standardmäßigen RTLD_LOCAL-Verhalten von Java; vergleiche ihn mit dem JNA-Ansatz und dem zugehörigen Apache-Arrow-Issue. Reproduziere den sinh-Fehler im Zusammenhang mit sinhl auf einer betroffenen Linux-Plattform und überprüfe anschließend, dass von LLVM generierter Code die importierten Systemsymbole von Gandiva auflösen kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100