-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Getting Segfault issue when login using SAML #389
Comments
We are having the same issue, +1 |
Same issue with gunicorn on Netbox |
Can confirm, and also that downgrading solved our problem |
Me too - wish I would have seen this solution sooner. I created an issue on xmlsec/python-xmlsec#277 to address the dependency chain. |
+1 |
The correct solution is not to downgrade |
Yup, @nosnilmot is correct - we switched from downgrading lxml to doing a no binary install, which was a better way to solve this problem! |
Installing Below is our configuration
I have created a demo project to replicate this issue: https://github.com/vinodpandey/saml-allauth-demo. I have uploaded video at https://youtu.be/NV2FokoH1zI which shows the above repository setup steps and replicates the segfault issue. In above same project, I ran below commands and tested it again. But, even after that, the issue occurs approx. 40-50% times.
Error log
|
As discussed extensively here, @vinodpandey's problem is also caused by mismatch between |
confim, i will down version lxml from 5. -> 4.9.2, and it worked |
At the risk of sounding like a broken record: The correct solution is not to downgrade On macos you will need to make sure |
We are not able tu use lxml >= 5.0.0. We have a segfault when using it. The solution could be to install it without binaries but it is not possible to do it using the setup.cfg file. We have to investigate if it will be possible if we switch to pyproject. Linked issues : SAML-Toolkits/python3-saml#388 SAML-Toolkits/python3-saml#389
We are not able tu use lxml >= 5.0.0. We have a segfault when using it. The solution could be to install it without binaries but it is not possible to do it using the setup.cfg file. We have to investigate if it will be possible if we switch to pyproject. Linked issues : SAML-Toolkits/python3-saml#388 SAML-Toolkits/python3-saml#389
Because xmlsec also depends on lxml, this feels like a problem that xmlsec should resolve. It seems that there is some activity on the xmlsec repo toward this: xmlsec/python-xmlsec#283, though it's not clear whether xmlsec is maintained well enough to address this or whether it will need to be forked. |
@ryanhiebert I have good news, the maintainers of the project started to work again on python-xmlsec, and the release of a new version is pretty close. |
While we wait for the bug to be fixed upstream, this is what worked for me in
|
Dear All, Even if i set : lxml==5.1.0 as mentionned in the previous post, my server partially crashed after calling the IDP, the IDP login windows is displayed but all the session are lost (for all user), so the users are no more identified. (but the server is still running). As i am behind "Apache passenger" it is difficult to get the exact trace. Somebody has the same behavior? |
Looks like xmlsec 1.3.14 addressed this issue! |
I'm still having this issue even with xmlsec 1.3.14, and lxml 5.2.1 installed. Am I missing something?
|
Not sure if it helps, but here is the combination of dependencies I'm now using with Python 3.12.3:
I no longer get any crashes and everything seems to work as expected (tested with Mock SAML). I ran |
fwiw, yes, it makes a difference. If it's already installed lxml with |
Here's my docker configuration. I believe I'm using all the versions that everyone is recommending. I've managed to kind of get it working with Python 3.12, running locally on my M1 mac (not in docker), but even then if I refresh the .../acs/ page then it'll segfault in OS X. This is the command where it's segfaulting: |
If none of the above fixes work, make sure that you don't have the parameter |
This commit fixes the following issue: SAML-Toolkits/python3-saml#389
We are using onelogin for saml login via okta, recently we figured out after updating lxml == 5.0.0 we are seeing segmentation fault and python application crashes.
After downgrading version of lxml to 4.9.3 this issue resolves.
Here are the traces for your reference.
System Info:
dmesg logs:
PYTHONFAULTHANDLER=1:
GDB:
The text was updated successfully, but these errors were encountered: