You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As can be seen in Tracker.swift:521-522, a dictionary belonging to subject is retrieved. Access to subject is not wrapped in any synchronisation mechanism, and I believe this is the root cause for the crash. SIGSEGV signal 11 code 2 also points to a memory related issue.
if let subjectDict = subject?.standardDict(userAnonymisation: userAnonymisation){
payload.addDictionaryToPayload(subjectDict) // <- crash happens here
}
To Reproduce
While I have not reproduced the crash in isolation, I believe one can achieve this by accessing the subject on one thread, while also tracking several other events on another thread.
Expected behavior
Not crash
Device information (please complete the following information):
Device: AppleTV5,3
OS: tvOS
Version 16.6
The text was updated successfully, but these errors were encountered:
We ran into what I think is the same or a similar crash just as we were about to push the change out to production, but luckily our internal beta testers caught it. I made some recent changes to how we wrap and call Snowplow as well as introduced setting the current userID on the tracker's subject prior to sending each event - previously we were not manually setting any properties on the subject.
Unfortunately we're not able to reproduce the crash reliably either, but the various crash groupings either point to the same Tracker.swift lines that @hakonk has pointed out or callsites that reference Subject.swift. Aside from the same call site called out here, my theory about this being the same derives from the hints that all the crashing seems to occur off the main thread when modifying the subject which is characteristically different from how we've used the tracker in the past (where it just seems that incidentally most events were sent on the main thread).
(SnowplowTracker is statically linked as an SPM package into our own wrapper module called Analytics which is why the module column of the stack looks a little wrong).
Describe the bug
A SIGSEGV crash with signal 11 code 2 was discovered in production. Here are the three top calls in the stack trace:
As can be seen in Tracker.swift:521-522, a dictionary belonging to
subject
is retrieved. Access tosubject
is not wrapped in any synchronisation mechanism, and I believe this is the root cause for the crash. SIGSEGV signal 11 code 2 also points to a memory related issue.To Reproduce
While I have not reproduced the crash in isolation, I believe one can achieve this by accessing the subject on one thread, while also tracking several other events on another thread.
Expected behavior
Not crash
Device information (please complete the following information):
The text was updated successfully, but these errors were encountered: