Loading extensions conflicts with JVM in debug mode
- Vorherrschende Sprache
- C++
- Sterne
- 127
- Forks
- 80
- Ø Merge
- 13 Std. 49 Min.
- Gemergte PRs (30 T.)
- 48
Beschreibung
When extensions (like httpfs) are loaded via duckdb-jdbc driver when the JVM is running in debug mode, it somehow breaks instrumentation agent attachment.
This manifests as a crash when libraries like bytebuddy-agent attempt attaching to the running JVM. Consequently, other libraries and frameworks like mockito and spring that depend on bytebuddy-agent also crash.
Sample code to demonstrate the issue: https://github.com/juja0/duckdb-httpfs-java-debug-issue
Note: The code in the link above needs to be executed in debug mode to trigger the issue.
Observations
- Initially noticed in duckdb_jdbc 1.3.2.0 but also happens in 1.4.4.0
- Unsure if it happens on versions prior to duckdb_jdbc 1.3.2.0
- Happens when calling ByteBuddyAgent.install
- ByteBuddyAgent version doesn't seem to matter. Happens on a fairly old version and also in the latest version.
- Happens only if duckdb loads httpfs extension before installing ByteBuddyAgent. If the order is flipped, it works fine.
- Happens on httpfs and aws extensions but not on ducklake extension
- Happens only when run in debug mode.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Führe das verlinkte Beispiel duckdb-httpfs-java-debug-issue im JVM-Debugmodus aus, lade zuerst httpfs oder aws und rufe anschließend ByteBuddyAgent.install auf. Vergleiche dies damit, den Agenten vor dem Laden der Extension zu installieren, sowie mit ducklake, und verfolge anschließend den Pfad zum Laden der duckdb-jdbc-Extension. Als erledigt gilt die Aufgabe, wenn ByteBuddyAgent.install nach dem Laden der betroffenen Extensions im Debugmodus nicht mehr abstürzt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- databases, devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100