Closed ejensen closed 7 months ago
@dsrees when you get a chance, can you take a look at these changes?
@ejensen Thanks! These threading issues are always hard to track down in the wild so I appreciate the contribution
Thank you @dsrees! Do you think this fix can be included in a 5.3.2 bug fix version release?
done
Overview
This PR addresses a few crashes caused by threading issues in array mutation. The symptoms of these crashes are EXC_BREAKPOINT, SIGABRT ABORT, and EXC_BAD_ACCESS KERN_INVALID_ADDRESS exceptions on the
spc_sync_array
thread. The exceptions have the following details:Issues being addressed
SychronizedArray
class were being replaced rather than updated. Replacing the instances ofSychronizedArray
removes the safety theSychronizedArray
type provides. It also results in thespc_sync_array
dispatch queue owned bySychronizedArray
becoming unowned when theSychronizedArray
instance deallocates, causing SIGABRT ABORT and EXC_BAD_ACCESS KERN_INVALID_ADDRESS exceptions when the operations of the queue execute.SychronizedArray
instanceslet
s and using the synchronized functions ofSychronizedArray
to update the underlying array variablesendBuffer
array was being mutated on multiple threads, causing EXC_BREAKPOINT exceptionsSychronizedArray