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

fix: MachException Improvements #2662

Merged
merged 8 commits into from
Jan 30, 2023

Conversation

philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Jan 27, 2023

📜 Description

Follow up on #2642. Fixes applied from KSCrash:

💡 Motivation and Context

Could fix GH-1589.

💚 How did you test it?

Code was reviewed by KSCrash maintainers and the fork of Bugsnag applied the same changes bugsnag/bugsnag-cocoa#806

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed
  • Review from the native team if needed
  • No breaking changes

🔮 Next steps

Follow up on #2642.
Fixes applied from KSCrash:
* kstenerud/KSCrash#349
* kstenerud/KSCrash#350

Add exception codes for ARM from mach/arm/exception.h.
Add missing kernel return codes from kern_return.h
@github-actions
Copy link

github-actions bot commented Jan 27, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1241.41 ms 1252.42 ms 11.01 ms
Size 20.76 KiB 420.33 KiB 399.57 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
b2f82fa 1236.94 ms 1262.86 ms 25.92 ms
4977fbc 1217.26 ms 1239.82 ms 22.56 ms
0dedab7 1221.26 ms 1235.34 ms 14.08 ms
c6504da 1232.06 ms 1243.28 ms 11.22 ms
156e771 1228.06 ms 1242.64 ms 14.58 ms
621ba9b 1190.66 ms 1230.84 ms 40.18 ms
7c5d161 1224.38 ms 1249.66 ms 25.28 ms
b2f82fa 1237.78 ms 1256.02 ms 18.24 ms
dc0db9e 1222.10 ms 1240.90 ms 18.80 ms
15b8c61 1223.16 ms 1244.83 ms 21.67 ms

App size

Revision Plain With Sentry Diff
b2f82fa 20.76 KiB 419.62 KiB 398.86 KiB
4977fbc 20.76 KiB 419.85 KiB 399.10 KiB
0dedab7 20.76 KiB 420.00 KiB 399.24 KiB
c6504da 20.76 KiB 414.44 KiB 393.69 KiB
156e771 20.76 KiB 419.70 KiB 398.94 KiB
621ba9b 20.76 KiB 414.45 KiB 393.69 KiB
7c5d161 20.76 KiB 414.44 KiB 393.68 KiB
b2f82fa 20.76 KiB 419.62 KiB 398.86 KiB
dc0db9e 20.76 KiB 419.62 KiB 398.86 KiB
15b8c61 20.76 KiB 419.67 KiB 398.91 KiB

Previous results on branch: fix/kscrash-mach-exception-improvements

Startup times

Revision Plain With Sentry Diff
fc55afc 1224.33 ms 1238.50 ms 14.17 ms
e270fb5 1198.21 ms 1225.64 ms 27.43 ms
731cacf 1243.12 ms 1255.56 ms 12.44 ms

App size

Revision Plain With Sentry Diff
fc55afc 20.76 KiB 420.36 KiB 399.61 KiB
e270fb5 20.76 KiB 420.34 KiB 399.58 KiB
731cacf 20.76 KiB 420.34 KiB 399.58 KiB

We forgot to add onUIntegerElement to SentryCrashReportFixer.
So the SDK crashed while reading the crash report on the app start.
This is fixed now by adding onUIntegerElement. Furthermore, I validated
that all SentryCrashJSONDecodeCallbacks now have a mapping to
onUIntegerElement.
@philipphofmann philipphofmann changed the base branch from main to fix/crash-report-fixer January 27, 2023 10:36
Base automatically changed from fix/crash-report-fixer to main January 30, 2023 07:52
@codecov
Copy link

codecov bot commented Jan 30, 2023

Codecov Report

Merging #2662 (ffa93a7) into main (8526e93) will increase coverage by 0.01%.
The diff coverage is 50.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2662      +/-   ##
==========================================
+ Coverage   80.56%   80.57%   +0.01%     
==========================================
  Files         246      247       +1     
  Lines       22864    22945      +81     
  Branches    10113    10138      +25     
==========================================
+ Hits        18420    18488      +68     
- Misses       3984     3993       +9     
- Partials      460      464       +4     
Impacted Files Coverage Δ
...ording/Monitors/SentryCrashMonitor_MachException.c 34.93% <44.44%> (ø)
Sources/SentryCrash/Recording/SentryCrashReport.c 33.77% <100.00%> (ø)
Sources/Sentry/include/SentryProfilingLogging.hpp 54.54% <0.00%> (-9.10%) ⬇️
Sources/Sentry/SentryThreadMetadataCache.cpp 91.30% <0.00%> (-4.35%) ⬇️
Sources/Sentry/include/SentryLog.h 80.00% <0.00%> (-4.22%) ⬇️
Sources/Sentry/SentryTime.mm 68.00% <0.00%> (-4.00%) ⬇️
Sources/Sentry/SentryProfilingLogging.mm 51.85% <0.00%> (-3.71%) ⬇️
Sources/Sentry/SentryThreadHandle.cpp 69.39% <0.00%> (-3.28%) ⬇️
Sources/Sentry/SentryStacktraceBuilder.m 87.30% <0.00%> (-2.36%) ⬇️
Sources/Sentry/SentryBacktrace.cpp 88.39% <0.00%> (-1.79%) ⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8526e93...ffa93a7. Read the comment docs.

@philipphofmann philipphofmann marked this pull request as ready for review January 30, 2023 09:14
@philipphofmann philipphofmann self-assigned this Jan 30, 2023
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.

SentryCrashMonitor_MachException crashes on macOS
2 participants