Loading extensions conflicts with JVM in debug mode
- Lingua principale
- C++
- Stelle
- 127
- Fork
- 80
- Merge medio
- 13h 49m
- PR unite (30g)
- 48
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Esegui l'esempio collegato duckdb-httpfs-java-debug-issue in modalità di debug JVM, caricando prima httpfs o aws e chiamando quindi ByteBuddyAgent.install. Confronta questo comportamento con l'installazione dell'agent prima del caricamento dell'estensione e con ducklake, quindi traccia il percorso di caricamento dell'estensione duckdb-jdbc. Il lavoro è completato quando ByteBuddyAgent.install non va più in crash dopo il caricamento delle estensioni interessate in modalità di debug.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- databases, devtools
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100