-
-
Notifications
You must be signed in to change notification settings - Fork 341
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: Potential deadlock when starting the SDK #3970
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3970 +/- ##
=============================================
+ Coverage 90.844% 90.850% +0.005%
=============================================
Files 593 594 +1
Lines 45974 46078 +104
Branches 16383 16436 +53
=============================================
+ Hits 41765 41862 +97
+ Misses 4139 4036 -103
- Partials 70 180 +110
... and 40 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
7bb0873 | 1226.18 ms | 1247.30 ms | 21.12 ms |
dc0db9e | 1246.06 ms | 1260.46 ms | 14.40 ms |
26af50b | 1223.78 ms | 1245.93 ms | 22.16 ms |
62c15d4 | 1235.30 ms | 1260.82 ms | 25.52 ms |
b35ccd0 | 1233.92 ms | 1256.69 ms | 22.78 ms |
3f366ee | 1242.28 ms | 1260.80 ms | 18.52 ms |
b2f82fa | 1236.94 ms | 1262.86 ms | 25.92 ms |
904d7fa | 1225.73 ms | 1249.22 ms | 23.49 ms |
42ef6ba | 1201.67 ms | 1214.35 ms | 12.67 ms |
6c31077 | 1226.24 ms | 1237.24 ms | 11.00 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
7bb0873 | 22.85 KiB | 407.09 KiB | 384.24 KiB |
dc0db9e | 20.76 KiB | 419.62 KiB | 398.86 KiB |
26af50b | 21.58 KiB | 542.38 KiB | 520.80 KiB |
62c15d4 | 22.85 KiB | 411.14 KiB | 388.29 KiB |
b35ccd0 | 21.58 KiB | 573.13 KiB | 551.55 KiB |
3f366ee | 20.76 KiB | 427.84 KiB | 407.08 KiB |
b2f82fa | 20.76 KiB | 419.62 KiB | 398.86 KiB |
904d7fa | 20.76 KiB | 432.87 KiB | 412.11 KiB |
42ef6ba | 21.58 KiB | 417.86 KiB | 396.28 KiB |
6c31077 | 22.84 KiB | 401.66 KiB | 378.81 KiB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably solve the problem. But Im wondering whether reading the options need to be synchronised. We never change it or one of its properties, and the two functions related to options changed in this PR are internal.
That's an excellent question. We access the options in various places in the SDK, and if users access things like |
Fix a deadlock when two threads access SentrySDK.options and SentrySDK.currentHub, which used the same object in synchronized. This problem is fixed now by using two independent locks for SentrySDK.options and SentrySDK.currentHub. Fixes getsentryGH-3956, Fixes getsentryGH-3899
📜 Description
Fix a deadlock when two threads access SentrySDK.options and SentrySDK.currentHub, which used the same object in synchronized. This problem is fixed now by using two independent locks for SentrySDK.options and SentrySDK.currentHub.
💡 Motivation and Context
Fixes GH-3956, Fixes GH-3899
💚 How did you test it?
Unit tests and as explained in #3956.
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps