Skip to content
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

Shows unknown "Called from" stack frame in crash report #1620

Open
sindresorhus opened this issue Dec 6, 2021 · 22 comments
Open

Shows unknown "Called from" stack frame in crash report #1620

sindresorhus opened this issue Dec 6, 2021 · 22 comments

Comments

@sindresorhus
Copy link

Environment

SaaS (https://sentry.io/)

Version

Sentry Cocoa 7.5.2

Steps to Reproduce

Expected Result

I expected to see the name of each stack frame.

Actual Result

The first stack frame is "unknown" and "redacted".
Screen Shot 2021-12-06 at 18 10 10

This is a macOS app using the SwiftUI App protocol.

@getsentry-release
Copy link
Collaborator

Routing to @getsentry/team-mobile for triage. ⏲️

@philipphofmann
Copy link
Member

Hey @sindresorhus, it seems like you didn't have the dSYMS uploaded for this event. I checked your issue, and the stacktrace looks fine.

@sindresorhus
Copy link
Author

The symbolization section shows "Ok" though:

Screen Shot 2021-12-13 at 14 57 21

@sindresorhus
Copy link
Author

I checked your issue, and the stacktrace looks fine.

Note that you have to switch to thread 0 in the stack trace section. The crash happened on thread 9.

@bruno-garcia
Copy link
Member

Dato was correctly symbolicated and indeed the frames showed up. The code calling into it though, likely a system frame that didn't symbolicate. Did this event come from a Simulator? It possibly came in one a version of iOS that was brand new (even a beta release of iOS?), before we collected the system symbols so we didn't manage to symbolicate those frames? We had a bug in version ~6.0.x that could cause it too which doesn't seem to be the case if you're 7.5.2.

This came up before: 1, 2, 3

@sindresorhus
Copy link
Author

Dato is a macOS-only app.

@philipphofmann
Copy link
Member

Usually, the bottom frame is something like libdyld +0x015f3c start. I just tried a crash with our macOS-Swift sample app on a M1 MacBook with macOS 12.1 and get the same result, see https://sentry.io/organizations/sentry-sdks/issues/2921695678/events/5b23f1fccbb4494d9ddd2bb37b133b5b/. So this is not related to SwiftUI. On macOS 11.6.1 https://sentry.io/organizations/sentry-sdks/issues/2921695678/events/f90d096dcfe54c978c4cde02eaf785db/ I get the bottom frame.

@philipphofmann
Copy link
Member

The unkown frame should be in libdyld. On macOS 11.6.1 the list of loaded images contains libdyld
Screen Shot 2022-01-11 at 16 36 23

but on macOS 12.1 libdyld is missing
Screen Shot 2022-01-11 at 16 37 20

It seems like SentryCrash is not able to retrieve information on libdyld when generating the crash report. Maybe something changed on macOS 12.1. The problem exists on both x86 and arm64 CPU architecture. @jan-auer will investigate if we also have this problem on the sentry-native SDK. As this issue is related to sentry-cocoa, I'm going to transfer this issue.

@philipphofmann philipphofmann transferred this issue from getsentry/sentry Jan 11, 2022
@philipphofmann
Copy link
Member

@jan-auer the logic for loading binary images is in SentryCrashDynamicLinker. The original file KSDynamicLinker doesn't contain any new patches that we don't have yet. I already applied the latest patch of accumulative patch with #1596.

@jan-auer
Copy link
Member

Sorry, I made a mistake when looking at this the first time. libdyld is there in all cases, it's just unreferenced and the UI hides it. If you reset filters you'll find it.

This means, the bottom frame returned by the stack walker is either wrong, or it points at an image that's unloaded at the time of the crash. If you look at the address, it lies shortly after the Sentry framework, which suggests that this is a user-space library.

@github-actions
Copy link

github-actions bot commented Feb 4, 2022

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@sindresorhus
Copy link
Author

Please keep this open.

@philipphofmann philipphofmann moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK Mar 16, 2022
@philipphofmann
Copy link
Member

I also see this happening in our iOS-Swift sample app.

Screen Shot 2022-04-08 at 11 06 27

@amadeu01
Copy link

@philipphofmann do you have a plan to fix this issue ?

@philipphofmann
Copy link
Member

No, not yet. We are going to discuss this again internally, as I also find it annoying, and we should fix it.

@philipphofmann philipphofmann moved this from Backlog to Needs Discussion in Mobile & Cross Platform SDK Jan 12, 2023
@philipphofmann philipphofmann moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK Jan 17, 2023
@amadeu01
Copy link

@philipphofmann have you had any update on that one?

@philipphofmann
Copy link
Member

@amadeu01, sadly not yet, no.

@philipphofmann
Copy link
Member

We could do something similar as this code does, but we must respect the license.

@amadeu01
Copy link

amadeu01 commented Aug 1, 2023

@philipphofmann do you have any update?

@brustolin
Copy link
Contributor

Hello @amadeu01, we have no updates for this issue.

@philipphofmann
Copy link
Member

I still see this happening for our iOSSwift sample app
CleanShot 2023-10-31 at 15 51 08@2x

and for our macOS sample app: https://sentry-sdks.sentry.io/issues/4409194420/events/eca0ab201ffb4aa79ca342b207eebfaa/

CleanShot 2023-10-31 at 15 48 53@2x

cc @kahest and @brustolin, we need look into this.

@philipphofmann philipphofmann moved this from Backlog to Needs Discussion in Mobile & Cross Platform SDK Oct 31, 2023
@kahest
Copy link
Member

kahest commented Nov 8, 2023

We'll have a look again at the root cause. If there is no pragmatic/reasonable way to solve this we may look at custom rules to not show this specific frame since it doesn't provide any value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Todo
Development

No branches or pull requests