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: Race condition in SentryTracer #3523

Merged
merged 1 commit into from Jan 2, 2024
Merged

Conversation

philipphofmann
Copy link
Member

📜 Description

Fix a race condition of the wasFinishCalled property in SentryTracer by using two extra synchronized blocks.

💡 Motivation and Context

The thread sanitizer tests fail on the main branch.

💚 How did you test it?

Thread sanitizer tests.

📝 Checklist

You have to check all boxes before merging:

  • 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 change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Fix a race condition of the wasFinishCalled property in SentryTracer by
using two extra synchronized blocks.
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (80da9d1) 89.166% compared to head (7260615) 89.213%.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3523       +/-   ##
=============================================
+ Coverage   89.166%   89.213%   +0.047%     
=============================================
  Files          528       528               
  Lines        57532     57526        -6     
  Branches     20614     20613        -1     
=============================================
+ Hits         51299     51321       +22     
+ Misses        5315      5292       -23     
+ Partials       918       913        -5     
Files Coverage Δ
Sources/Sentry/SentryTracer.m 96.761% <100.000%> (+0.408%) ⬆️

... and 11 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

Copy link

github-actions bot commented Jan 2, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1206.76 ms 1227.40 ms 20.64 ms
Size 21.58 KiB 418.58 KiB 396.99 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5ab598f 1213.90 ms 1240.45 ms 26.55 ms
4b08ceb 1237.75 ms 1249.61 ms 11.86 ms
56ec5d0 1236.65 ms 1261.90 ms 25.25 ms
1db04d8 1250.20 ms 1258.12 ms 7.92 ms
1e065bc 1239.69 ms 1258.18 ms 18.49 ms
3437454 1225.64 ms 1234.31 ms 8.67 ms
01a28a9 1237.78 ms 1259.04 ms 21.27 ms
8919322 1231.83 ms 1255.24 ms 23.41 ms
fb53d97 1235.00 ms 1241.88 ms 6.88 ms
2ce582e 1238.98 ms 1259.66 ms 20.68 ms

App size

Revision Plain With Sentry Diff
5ab598f 22.84 KiB 403.17 KiB 380.33 KiB
4b08ceb 20.76 KiB 431.99 KiB 411.23 KiB
56ec5d0 20.76 KiB 414.44 KiB 393.69 KiB
1db04d8 20.76 KiB 435.50 KiB 414.74 KiB
1e065bc 20.76 KiB 425.78 KiB 405.01 KiB
3437454 22.85 KiB 408.87 KiB 386.02 KiB
01a28a9 22.85 KiB 405.39 KiB 382.54 KiB
8919322 22.84 KiB 403.18 KiB 380.34 KiB
fb53d97 20.76 KiB 425.80 KiB 405.04 KiB
2ce582e 22.85 KiB 410.97 KiB 388.12 KiB

@philipphofmann philipphofmann merged commit 3d3a411 into main Jan 2, 2024
70 checks passed
@philipphofmann philipphofmann deleted the fix/tracer-race-conditions branch January 2, 2024 12:56
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.

None yet

2 participants