OpenUSD icon indicating copy to clipboard operation
OpenUSD copied to clipboard

Add test to reproduce multi-threading issue of computing extent and relationship

Open roggiezhang-nv opened this issue 1 year ago • 6 comments

Description of Change(s)

We found a very strange behavior that ComputeExtent along with GetForwardedTargets in a multi-threading way would influence the behavior of getting material binding with API UsdRelationship::GetForwardedTargets. See the changes of this PR about the test to reproduce this. In this test, it's trying to traverse the whole stage with multi-threads. All operations are supposed to be read-only to the stage, and the test should be successful. However, it fails unexpectedly sometimes. Adding TfRegistryManager::GetInstance().SubscribeTo<UsdGeomBoundable>(); to the first line of main() will pass the test, which we still have no idea why.

You need to run the test with --repeat until-fail:1000 to increase the possibility of failure.

Fixes Issue(s)

https://github.com/PixarAnimationStudios/OpenUSD/issues/3529

Checklist

[x] I have created this PR based on the dev branch

[x] I have followed the coding conventions

[ ] I have added unit tests that exercise this functionality (Reference: testing guidelines)

[ ] I have verified that all unit tests pass with the proposed changes

[x] I have submitted a signed Contributor License Agreement (Reference: Contributor License Agreement instructions)

roggiezhang-nv avatar Feb 10 '25 09:02 roggiezhang-nv

@nvmkuruc for vis.

roggiezhang-nv avatar Feb 10 '25 09:02 roggiezhang-nv

It was a little harder to reproduce on Linux, but I was able to reproduce with --repeat-until-fail 10000.

nvmkuruc avatar Feb 10 '25 12:02 nvmkuruc

Filed as internal issue #USD-10665

(This is an automated message. See here for more information.)

jesschimein avatar Feb 10 '25 17:02 jesschimein

/AzurePipelines run

jesschimein avatar Feb 10 '25 17:02 jesschimein

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Feb 10 '25 17:02 azure-pipelines[bot]

@matthewcpp Now that #3529 has been closed, should we close this?

nvmkuruc avatar Oct 14 '25 19:10 nvmkuruc