Skip to content

Conversation

@untitaker
Copy link
Member

No description provided.

Copy link
Contributor

@fpacifici fpacifici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have context about this? Is there a specific scenario where the consumer got stuck?

@untitaker
Copy link
Member Author

@fpacifici I opened this PR because I was chatting with Riya about #439, but I think I misunderstood the situation there. The consumer gets stuck in paused state, not stuck in a way that it exceeds max-poll-intervall. We've had a few situations where the main thread got stuck, but none recently

@untitaker untitaker closed this Apr 8, 2025
untitaker added a commit that referenced this pull request Dec 2, 2025
Implement a background thread that dumps all stacktraces when the main
thread gets stuck.

variations of this are:

* getsentry/sentry#100857 -- unlike that PR,
  this one can run enabled in all consumers, since it only reports
  stacktraces when we're actually stuck.
* #442 -- this is a previous
  version that only reported on the main thread, and in an overly
  complicated manner. We cannot use faulthandler because that one can
  only report to "real" files, and I want to report the stuck consumers
  to logging/Sentry.
@untitaker untitaker mentioned this pull request Dec 2, 2025
untitaker added a commit that referenced this pull request Dec 2, 2025
* ref: Stuck detector

Implement a background thread that dumps all stacktraces when the main
thread gets stuck.

variations of this are:

* getsentry/sentry#100857 -- unlike that PR,
  this one can run enabled in all consumers, since it only reports
  stacktraces when we're actually stuck.
* #442 -- this is a previous
  version that only reported on the main thread, and in an overly
  complicated manner. We cannot use faulthandler because that one can
  only report to "real" files, and I want to report the stuck consumers
  to logging/Sentry.

* shut down thread to prevent leaks in tests

* shutdown properly again in tests

* make it timestamp based, make test faster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants