Closed molind closed 2 weeks ago
I've checked 8.21, when it worked without issues.
It creates SentryHub without enriching scope:
- (instancetype)initWithClient:(nullable SentryClient *)client
andScope:(nullable SentryScope *)scope
{
if (self = [super init]) {
_client = client;
_scope = scope;
_sessionLock = [[NSObject alloc] init];
_integrationsLock = [[NSObject alloc] init];
_installedIntegrations = [[NSMutableArray alloc] init];
_installedIntegrationNames = [[NSMutableSet alloc] init];
_crashWrapper = [SentryCrashWrapper sharedInstance];
_errorsBeforeSession = 0;
}
return self;
}
And there is no systemInfo call and no deadlock.
Thanks for all the context in this PR and in https://github.com/getsentry/sentry-cocoa/issues/3956, which helped us reproduce the issue. As this PR is only a workaround and doesn't fix the underlying issue, I opened https://github.com/getsentry/sentry-cocoa/pull/3970 to fix the underlying issue. We can close this.
:scroll: Description
See details in #3956
:bulb: Motivation and Context
Sentry deadlocked during offline startup.
:green_heart: How did you test it?
I've added sleep into the crash wrapper. And when background thread tried to send envelope it locked SentrySdk @synchronized(self).
:pencil: Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.:crystal_ball: Next steps