Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1747516: Native libraries are not relocated #1926

Open
laurentgo opened this issue Oct 17, 2024 · 0 comments
Open

SNOW-1747516: Native libraries are not relocated #1926

laurentgo opened this issue Oct 17, 2024 · 0 comments
Labels

Comments

@laurentgo
Copy link

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of JDBC driver are you using?

3.19.0

  1. What operating system and processor architecture are you using?

OS X 14.6.1 (arm64)

  1. What version of Java are you using?

Java 11

  1. What did you do?

When using snowflake driver in an application, we experienced crashes we were able to attribute to use of conscrypt native library.
After inspection we realized that snowflake driver packages a relocated version of conscrypt (and grpc) but none of the native libraries bundled with those two artifacts are relocated themselves, and because of it there's a chance that snowflake driver may load a different version of the native library than the one bundled with snowflake

Netty (and by extension grpc-netty-shaded) has a builtin mechanism to detect relocation, and as long as the native libraries use the same relocation pattern (with dots (.) replaced with underscores (_)), netty classes do not need to be rewritten.

Conscrypt on the other hand does not seem to have a builtin mechanism, and along with the native libraries being renamed, the NativeCryptoJni class should be rewritten to change the prefix to search for.

  1. What did you expect to see?

Application crashed (was expecting no crash)

  1. Can you set logging to DEBUG and collect the logs?

No

@laurentgo laurentgo added the bug label Oct 17, 2024
@github-actions github-actions bot changed the title Native libraries are not relocated SNOW-1747516: Native libraries are not relocated Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant