Skip to content

Conversation

wiggzz
Copy link

@wiggzz wiggzz commented Oct 3, 2025

Fix snowflakedb/snowflake-connector-python#2213

Problem

Snowflake queries can hang at exit

Solution

Upstream snowflake-connector-python added a fix for the hang which is to add a timeout to the certificate lock (which was deadlocking). This comes in snowflake-connector-python 4.0.0 and requires the explicit use of a timeout.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@wiggzz wiggzz requested a review from a team as a code owner October 3, 2025 18:54
Copy link

cla-bot bot commented Oct 3, 2025

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @wiggzz

Copy link
Contributor

github-actions bot commented Oct 3, 2025

Thank you for your pull request! We could not find a changelog entry for this change in the dbt-snowflake package. For details on how to document a change, see the Contributing Guide.

Copy link

cla-bot bot commented Oct 3, 2025

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @wiggzz

Copy link

cla-bot bot commented Oct 6, 2025

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @wiggzz

@wiggzz
Copy link
Author

wiggzz commented Oct 7, 2025

Actually, looks like snowflakedb/snowflake-connector-python@b301717 is in main which will mean the next release should fix this. Unclear what the timeline on a new release is though.

@cla-bot cla-bot bot added the cla:yes The PR author has signed the CLA label Oct 10, 2025
@wiggzz
Copy link
Author

wiggzz commented Oct 10, 2025

Actually, looks like snowflakedb/snowflake-connector-python@b301717 is in main which will mean the next release should fix this. Unclear what the timeline on a new release is though.

Ok the new snowflake connector version fix is in but it requires a specific timeout parameter to be set. I'll see how difficult it is to upgrade to 4.0.0 and go from there.

@wiggzz wiggzz force-pushed the wj/snowflake-deadlock-client-prefetch branch from 11fa36d to 49d318e Compare October 10, 2025 14:55
@wiggzz wiggzz changed the title Set client prefetch threads to 1 to prevent deadlock at exit Upgrade to snowflake-connector-python 4.0.0 and set cert lock timeout to prevent deadlock Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes The PR author has signed the CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SNOW-1983343: Deadlock during result pre-fetch

1 participant