-
-
Notifications
You must be signed in to change notification settings - Fork 873
Closed
Milestone
Description
There is a deadlock when using fetchAll and two objects has pointers refering to each other, indirectly or directly.
When processing the result from fetchAll, all objects are handled individually in separate BFTasks. This happens in PFObjectController - processFetchResultAsync:forObject: in the method _collectFetchedObjects.
_collectFetchedObjects does a @synchronized (lock) on its object, traverses its connected objects, and when calling allKeys on another object, allKeys locks that object @synchronized (lock). Thus if A locks itself and then locks B, and then B locks itself and then locks A, we get a deadlock. This is confirmed when I look at the stack traces, in a lot of threads, they are waiting on a mutex from allKeys.
Metadata
Metadata
Assignees
Labels
No labels
