Skip to content

Loading extensions conflicts with JVM in debug mode #593

Description

@juja0

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions