Page MenuHome

Fix T92857: Deadlock in geometry nodes curve multi-threading
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Nov 16 2021, 12:19 AM.

Details

Summary

The spline code, especially Bezier splines, often make use of lazily
evaluation and caching. In order to do that, they use mutex locks.
When multi-threading, this can lead to problems. Further detail
can be found in rBfcc844f8fbd0d1.

To fix the deadlock, isolate the task before multi-threading
when holding a lock.

Diff Detail

Repository
rB Blender
Branch
fix-bezier-multithread-lock (branched from master)
Build Status
Buildable 18672
Build 18672: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Nov 16 2021, 12:19 AM
Hans Goudey (HooglyBoogly) created this revision.

This looks like the correct solution.

I suggest to add a comment explaining that task isolation is used because of the lock held by this function.

This revision is now accepted and ready to land.Nov 16 2021, 5:18 PM