Title: SDK stuck in processing RecursionError:maximum recursion depth exceeded events · Issue #2764 · getsentry/sentry-python · GitHub
Open Graph Title: SDK stuck in processing RecursionError:maximum recursion depth exceeded events · Issue #2764 · getsentry/sentry-python
X Title: SDK stuck in processing RecursionError:maximum recursion depth exceeded events · Issue #2764 · getsentry/sentry-python
Description: 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 simp...
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/2764
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SDK stuck in processing RecursionError:maximum recursion depth exceeded events","articleBody":"### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Version\n\n1.40.5\n\n### Steps to Reproduce\n\nOne Sentry user reported an issue where the SDK gets in am apparently endless loop while processing a RecursionError. \r\n\r\nI was able to reproduce it with a simple FastAPI project and setting recursion depth limit to 1M:\r\n\r\n```\r\nimport resource, sys\r\nsys.setrecursionlimit(10**6)\r\n\r\nfrom fastapi import FastAPI\r\nimport logging\r\nfrom sentry_sdk.integrations.fastapi import FastApiIntegration\r\nimport sentry_sdk\r\n\r\nsentry_sdk.init(\r\n dsn=\"....\",\r\n debug=True,\r\n)\r\n\r\ndef fibonacci_of(n):\r\n return fibonacci_of(n)\r\n\r\napp = FastAPI()\r\n\r\n@app.get(\"/\")\r\n fibonacci_of(50)\r\n return {\"OH dear\"}\r\n```\r\n\r\nThe code above creates an infinite recursion, which will eventually trigger a `RecursionError:maximum recursion depth exceeded events` error that is captured by the SDK. \r\n\r\nIn 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. \r\n\r\nOriginal report can be found in this [internal ticket.](https://sentry.zendesk.com/agent/tickets/114546)\n\n### Expected Result\n\nThe SDK is able to quickly process the event and attempt to send it, or stop processing in case it takes long freeing the app. \n\n### Actual Result\n\nThe SDK gets in an seemingly infinite loop. ","author":{"url":"https://github.com/rodolfoBee","@type":"Person","name":"rodolfoBee"},"datePublished":"2024-02-26T13:55:19Z","url":"https://github.com/getsentry/sentry-python/issues/2764"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7c00c860-826a-3ef8-1a18-9496d827c4ad |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D216:1148D3:A1BABA:D05024:6B00F419 |
| html-safe-nonce | 849d73cff1d800acaddd08b847f3d1a67f3f7cf9673bbe544167ace65f9bfd1e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjE2OjExNDhEMzpBMUJBQkE6RDA1MDI0OjZCMDBGNDE5IiwidmlzaXRvcl9pZCI6IjIyMTY4ODQwMjA1ODE1NjEzNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f270e1a44a8809bfa2f42b4c6fc71a096decf424bbacd06641fe7f72caa9cede |
| hovercard-subject-tag | issue:2154244936 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/2764/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cd9c783d2fa6be596cdcb247e23c5e099f8f3aaaf9b0b207186cf6cb7b5dfa91/getsentry/sentry-python/issues/2764 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cd9c783d2fa6be596cdcb247e23c5e099f8f3aaaf9b0b207186cf6cb7b5dfa91/getsentry/sentry-python/issues/2764 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rodolfoBee |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width