Glean iOS crash due to "unbalanced call to leave DispatchGroup"
Categories
(Data Platform and Tools :: Glean: SDK, defect, P1)
Tracking
(Not tracked)
People
(Reporter: travis_, Assigned: travis_)
References
Details
Attachments
(1 file)
The crash was brought to our attention here: https://github.com/mozilla-mobile/firefox-ios/issues/13374
I believe this may be the regressing commit: mozilla/glean@bc43f6f
I don't think we used DispatchGroup before this, and it would be the only thing I can think of that could fit in with the error message and the stacktrace.
Assignee | ||
Comment 1•2 years ago
|
||
After several attempts to reproduce this locally, I was finally able to do it. It seems there may be some race condition between force closing the app and relaunching it again.
I was only ever able to reproduce this a single time, on a fresh simulator where I hadn't run firefox before. After I was able to trigger it, I wasn't able to re-trigger it again for that simulator.
libdispatch.dylib`dispatch_group_leave.cold.1:
0x115f4f5ab <+0>: leaq 0x61be(%rip), %rcx ; "BUG IN CLIENT OF LIBDISPATCH: Unbalanced call to dispatch_group_leave()"
0x115f4f5b2 <+7>: xorl %eax, %eax
0x115f4f5b4 <+9>: movq %rcx, 0x29c75(%rip) ; gCRAnnotations + 8
0x115f4f5bb <+16>: movq %rax, 0x29c9e(%rip) ; gCRAnnotations + 56
-> 0x115f4f5c2 <+23>: ud2
I have some suspicions as to why this might be happening, so I'm going to tinker around with a PR to try and address this even though it seems difficult to reproduce at the moment.
Comment 2•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
The patch has landed that refactors the Glean HttpUploader to not use DispatchGroup, as well as attempting to simplify the overall uploading process.
I was able to test this locally in Firefox iOS and it seems to work quite well, so I'm going to call this resolved->Fixed and get a release out so that the fix can make its way downstream.
Description
•