Skip to content

Conversation

@philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Jun 20, 2022

The original PR was reverted with #1905 because testStacktraceHasFrames_forEveryThread is sometimes flaky and we need to figure out what causes this before merging this again.

Resolves: #1052

brustolin and others added 30 commits May 13, 2022 11:20
Copy link
Member Author

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

Good job, I maybe found a few issues to address.

Comment on lines 39 to 40
if (result == amount)
break;
Copy link
Member Author

Choose a reason for hiding this comment

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

m: Shouldn't we somehow handle this edge case? I'm not sure how likely it is that stacktraces will be cut off, but I already see complaints that the stacktrace is incomplete.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can't alloc more memory here. What do you suggest?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, I'm not sure. @Swatinem, can you maybe help us here? We allocate a struct with a maximum of 100 stack entries before suspending the threads. Here we are walking the stack cursor after suspending the threads. Do you have any recommendations on what to do when the stack has more than 100 entries? Now we ignore this, and the stacktrace would miss a few entries. We can't allocate memory either.

Copy link
Member Author

Choose a reason for hiding this comment

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

@armcknight, do you maybe have any ideas on how to solve the issue above ⬆️ ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@brustolin, what about merging this PR and creating an issue for this edge case? This is the only issue left, I believe.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. Sounds good to me.

Comment on lines 39 to 40
if (result == amount)
break;
Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, I'm not sure. @Swatinem, can you maybe help us here? We allocate a struct with a maximum of 100 stack entries before suspending the threads. Here we are walking the stack cursor after suspending the threads. Do you have any recommendations on what to do when the stack has more than 100 entries? Now we ignore this, and the stacktrace would miss a few entries. We can't allocate memory either.

Copy link
Member Author

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

Almost LGTM, thanks @brustolin 🥇

Copy link
Member

@armcknight armcknight left a comment

Choose a reason for hiding this comment

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

LGTM. Nice work!

Comment on lines +37 to +38
// Function used for tests
- (void)clear;
Copy link
Member

Choose a reason for hiding this comment

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

Recommend moving to a private header.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is not public anyways. Only headers in /Sources/Sentry/Public are.

Copy link
Member Author

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

LGTM 🚀, great job @brustolin 👏 . Let's create an issue for the edge case that a stacktrace has more than 100 entries.

@brustolin brustolin merged commit 02de834 into master Jun 29, 2022
@brustolin brustolin deleted the feat/anr-report branch June 29, 2022 07:55
armcknight pushed a commit that referenced this pull request Jun 30, 2022
Added app hangs tracking

Co-authored-by: Dhiogo Brustolin <[email protected]>
armcknight pushed a commit that referenced this pull request Jun 30, 2022
Added app hangs tracking

Co-authored-by: Dhiogo Brustolin <[email protected]>
philipphofmann added a commit that referenced this pull request Jul 6, 2022
With #1906, we have our own solution of detecting app hangs. We can remove
the unused SentryCrash deadlock detection.
philipphofmann added a commit that referenced this pull request Jul 7, 2022
With #1906, we have our own solution for detecting app hangs. We can remove
the unused SentryCrash deadlock detection.
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.

Report App Hangs

6 participants