-
Notifications
You must be signed in to change notification settings - Fork 5
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
Tink Python 1.9 Can't Get Mutex Lock on Import #25
Comments
Hi @tdipadova3rd, could you please provide a minimum code example to reproduce this? Is it sufficient to have |
Hi @morambro, thanks for the quick response! I am able to repro with just two lines of code (test.py): import snowflake.connector
import tink via The error occurs on Note: This also happens with some other packages, the snowflake.connector is just the most recent example. I've attached a |
Thanks! I tried to reproduce the issue without success. My attempt on a Ubuntu 2004 VM (e2-standard-4): # Python 3.11.7.
poetry new tink-py-issue-25
cd tink-py-issue-25
poetry add tink==1.9.0
poetry add snowflake-connector-python # installs snowflake-connector-python==3.6.0
cat <<EOF > test.py
import snowflake.connector
import tink
EOF
poetry run python test.py The above runs fine. UPDATE: Works fine also on a t2a-standard-4 (ARM) Ubuntu 2310 VM |
Hmmm perhaps there's another library in our environment that causes the tink import to fail? It's curious that I can trigger the issue from those two lines of code with the linked Python environment from two separate machines (Mac M1 and Mac M2). |
Hey! I also have the same issue, and after a bit of dependency-mining, I've narrowed the source (in our case) down to the case where both # Python 3.11.6.
poetry new tink-py-issue-25
cd tink-py-issue-25
poetry add tink==1.9.0
poetry add pyarrow # installs pyarrow==15.0.0
cat <<EOF > test.py
import pyarrow
import tink
EOF
poetry run python test.py Ran on a M2 Mac |
I see this issue is also brought up in the Arrow-library. Link: |
Help us help you
We'd like to know more about
your Tink deployment.
Describe the bug:
When importing Tink (with GCPSM Extension) for use in a FastAPI service using Uvicorn, we consistently see the error
libc++abi: terminating due to uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
, and the entire python process will crash. Pinning Tink to 1.8 solves this for us.We also have a Dramatiq service that throws the same error on Tink import. This happens on both Mac (M1/M2) and Linux (Ubuntu) machines in the Cloud.
What was the expected behavior?
We should be able to import Tink for use in Dramatiq and FastAPI services.
How can we reproduce the bug?
This can be triggered by importing certain other packages, including but not limited to,
snowflake-connector-python
.Do you have any debugging information?
I have attached a crash log.
crash-report.txt
What version of Tink are you using?
Tink 1.9.0. Tink 1.8.0 is not affected by this issue.
Can you tell us more about your development environment?
Python 3.11, Virtual Environment managed by Poetry. Mac OS 13 (M2), Mac OS 14 (M1), Ubuntu.
Is there anything else you'd like to add?
Provide any additional context about the problem.
The text was updated successfully, but these errors were encountered: