-
Notifications
You must be signed in to change notification settings - Fork 509
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
SDK stuck in processing RecursionError:maximum recursion depth exceeded events #2764
Labels
Triaged
Has been looked at recently during old issue triage
Comments
Hey @rodolfoBee ! Thanks for bringing this up. We will have a look! |
szokeasaurusrex
added
the
Triaged
Has been looked at recently during old issue triage
label
Sep 11, 2024
@szokeasaurusrex any update on this one? |
@dlahyani looking into it |
szokeasaurusrex
added a commit
that referenced
this issue
Nov 18, 2024
Only process and send the first 300 stack frames for an error event. This prevents the SDK from causing the program to hang when the SDK captures an error with a very large number of stack frames. Relay anyways [trims events to 250 stack frames](https://github.com/getsentry/relay/blob/aae36669414a1f7c6ef68d5226cb2e96a28f7667/relay-event-normalization/src/trimming.rs#L286), so it is pointless for us to process much beyond that number. Fixes #2764
@dlahyani We have a PR in review |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.40.5
Steps to Reproduce
One Sentry user reported an issue where the SDK gets in am apparently endless loop while processing a RecursionError.
I was able to reproduce it with a simple FastAPI project and setting recursion depth limit to 1M:
The code above creates an infinite recursion, which will eventually trigger a
RecursionError:maximum recursion depth exceeded events
error that is captured by the SDK.In a sync environment the SDK will hold the app while processing the event. I suspect it is during stack trace processing, as in this case the stack trace will have 1M frames.
Original report can be found in this internal ticket.
Expected Result
The SDK is able to quickly process the event and attempt to send it, or stop processing in case it takes long freeing the app.
Actual Result
The SDK gets in an seemingly infinite loop.
The text was updated successfully, but these errors were encountered: