Skip to content

Fix potential deadlock in distributed contour tree

Kenneth Moreland requested to merge kmorel/vtk-m:release-deadlock into master

The HierarchicalAugmenter used in the distributed contour tree filter attempts to save memory by releasing buffers used to send and receive data after the DIY enqueues and dequeues are posted. This works as long as the DIY serialization process copies the data in the arrays. However, changes are coming where the data is sent directly from the buffers. These changes cause a deadlock because the enqueue places a read lock until the data is sent while the release tried to get a write lock.

The solution is simply to "forget" the array rather than explicitly delete it. In this case, the array will automatically be deleted once everyone is done with it.

Fixes a deadlock that popped up in !2987 (merged). Regardless of what eventually happens to those changes, this MR improves the safety of the code without negatively impacting the performance.

Edited by Kenneth Moreland

Merge request reports

Loading