sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Python SDK segfaults on some Linux environments

Open tangowithfoxtrot opened this issue 4 months ago • 2 comments

The following is a continuation of the conversation from https://github.com/bitwarden/sdk-sm/pull/1221.

Steps To Reproduce

Build the Python SDK

npm i
npm run schemas

python -m venv /tmp/venv-bitwarden
source /tmp/venv-bitwarden/bin/activate
pip install maturin[patchelf]

cd languages/python/
maturin develop

Attempt to use it in Python

python -c "import bitwarden_sdk"

Expected Result

The import succeeds and the SDK client can be used.

Actual Result

Segmentation fault (core dumped)

Screenshots or Videos

No response

Additional Context

No response

Operating System

Linux

Operating System Version

Fedora Silverblue/Workstation 42, and possibly some other Linux environments that don't match the GitHub Runner OS and version

Build Version

main

Issue Tracking Info

  • [x] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

tangowithfoxtrot avatar Jul 23 '25 13:07 tangowithfoxtrot

@goshansp, I have some build artifacts that may fix the segfaults you were experiencing. Could you give them a try when you can? You should be able to download the zip for x86_64 Linux, extract it, and pip install <path-to-whl-file> to test it.

I was able to install them and list secrets using the SDK on a Fedora 42 machine and a fedora:42 docker image.

The main thing I changed is I built them with zig and lower manylinux compatibility settings (2_17 instead of 2_28).

tangowithfoxtrot avatar Sep 22 '25 21:09 tangowithfoxtrot

Thank you very much for looking into it @tangowithfoxtrot . I have successfully installed your artifact wheel without segfaulting python -c "import bitwarden_sdk" on Ubuntu 24 and Fedora 42. Please let me know if there is anything else I can do to support this.

goshansp avatar Sep 23 '25 04:09 goshansp