-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Immediate segfault on Linux (Manjaro) #337
Comments
Are you able to reproduce this reliably? Would you mind trying with master? We recently merged some code that reworked the thread synchronization with the http thread, maybe you were hitting some unsafety there. |
I can try with master now, this happened every time I tried it, both with gdb and without. |
I’m on Arch at home, with a bit more recent curl ( Your log shows the basically the same as your screenshot, that you are crashing inside of curl itself.
Your log cuts off (well, continues from inside the signal handler) at the moment of fetching CA certificates? Can you just verify that you can use curl from the CLI by running |
This is the output of
|
Looking through the code again, I can see two issues that we have and could improve, I will create a PR tomorrow and lets see if that improves things. One thing I notice is that |
We don't use curl in our code base. We do construct several web requests manually, but I don't think they should interact with curl. |
I tried to correct the curl initialization order, and also added some more logging here: #341 |
Running that PR:
Thanks for helping to try and get this working. Let me know if there is any other useful information I can provide. |
hm, TBH, I’m completely at a loss right now. Its still kind of strange that it crashes inside of crypto code, and according to the logs, its at the time it loads the CA certs. Also the stacktrace points to that. Not sure what to make of that. |
I am going to try two things, running this version of our code in a ubuntu VM and running a C program which is literally just a main function linking to the SDK with the most basic sentry example:
Ultimately the application I am working on needs to run on OSX, Windows and Ubuntu, but it would be really nice if it ran on Manjaro as well. |
I have the exact same issue. |
That is good to hear. The PR got quite a bit bigger than expected, hope to land all of this pretty soon. |
I had what seems to be the same issue on Windows with 0.3.4, and pulling from master (this PR has been merged) seems to have also resolved the issue. Thanks a lot for being so reactive! |
Interesting. We don’t use curl on Windows. But we overhauled the shutdown logic which cleaned up quite a few things. |
I resolved this issue on my end. In the end it ended up being a linking issue. I realized the codebase I am working in statically links its own libcrypto. When I changed our build to use the system libcrypto things worked as expected. All of this running on the current master. Thank you so much for your help. |
Thanks for keeping us up to date, will close this then. |
@Shamazo Thank you for posting your issue here! Just starting hitting this exact crash after upgrading our machines to Ubuntu 22.04 (which has openssl 3). It took me a bit to find it, since the stack was different -- we got a segfault with a stack that looks like this:
After trying a bunch of different things without success (and finding that using libcurl w/ gnutls fixed it), I stumbled across your issue, and realized that we're statically linking OpenSSL 1.1 into our application as well as loading sentry-native built with dynamic OpenSSL 3. Removing the statically linked OpenSSL 1.1 from the build resolved the issue. |
Description
The sentry SDK segfaults immediately when using the getting started code. I have a screenshot of the backtrace:
It appears to segfault somewhere in curl, which is being called from curl_easy_perform in sentry_transport_curl.c
Environment
Steps To Reproduce
Place this snippet in main.
Log output
The text was updated successfully, but these errors were encountered: