Repository navigation
Move ref vs retain when stealing pointer for structured args. - #9962
Conversation
This was a bit tricky to track down. It only affects structured argument packing/unpacking. We were leaking a reference to the sub-list, which, given that it usually contains buffers, was causing a leak of any contained device backed memory buffers. Then much later, with asserts enabled, the vulkan driver would notice that not all allocated memory was freed and assert. I am not completely sure on the cause of the non-determinism. Since the problem manifests on shutdown, I'm (just guessing) that the normal shutdown process may be bypassed sometimes? This does only affect a subset of TF-specific invocation schemes, and until that was obvious, it was difficult to see the pattern. Fixes #9936
|
Thanks! Can you try patching in the changes from #9954 to confirm this fixes that issue? It's just a one-line change to the CI to enable these tests. |
Done, but given that I timed this to let me leave precisely at 5pm on Friday... if it doesn't actually work, I will cry. |
GMNGeoffrey
left a comment
There was a problem hiding this comment.
Thanks! Can you try patching in the changes from #9954 to confirm this fixes that issue? It's just a one-line change to the CI to enable these tests.
Done, but given that I timed this to let me leave precisely at 5pm on Friday... if it doesn't actually work, I will cry.
It works! 🙂 Approving because this fixes the bug, but maybe @benvanik wants to review the substance of this
This was a bit tricky to track down. It only affects structured argument
packing/unpacking. We were leaking a reference to the sub-list, which,
given that it usually contains buffers, was causing a leak of any
contained device backed memory buffers. Then much later, with asserts
enabled, the vulkan driver would notice that not all allocated memory
was freed and assert.
I am not completely sure on the cause of the non-determinism. Since the
problem manifests on shutdown, I'm (just guessing) that the normal
shutdown process may be bypassed sometimes? This does only affect a
subset of TF-specific invocation schemes, and until that was obvious, it
was difficult to see the pattern.
Fixes #9936