-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False positive with semaphore lifetime tracking #5568
Comments
This is Issue #12 I suspect that the commit mentioned above changed timing so that this problem started happening in ANGLE. Playing with the tests on a platform that doesn't provide
I do NOT see ANGLE calling vkQueueWaitIdle() in the tests that hit this error. I agree that a call to that function should prevent this error. But I also think the call sequence I observed should also not trigger the error. |
FYI @artem-lunarg |
ANGLE used to call
Agreed, it's supposed to be the same as |
I built the latest angle and checked that 27ba73e from Sep 30, 2022, indeed, was the PR that introduced the issue or increased reproducibility of existing issue.
I tested on the platform that does not support And sorry for the delayed response. |
UPDATE: managed to reproduce |
@ShabbyX the api dump shows that the tests often initiate resource deletion immediately after the last I have attached API dump for apidump_semaphore_ea7170000000031.txt I saw you participated in the discussions related to present semaphore deletion and as I understand without I'll check more tests if they generate 01137 in other scenarios and also will try to reproduce Jeremy's use case. |
@jeremyg-lunarg I can reproduce your test case. It looks like it's a valid behavior. Image acquire does not happen on the queue and waiting for acquire fence does not guarantee that previous present operation (which happens on the queue) finished. Strictly speaking, waiting on the queue also does not guarantee that present operation finished because present queue batch is not included in the synchronization scope of fence signaling operation (and queue wait is equivalent to wait on the fence). I believe we still assume that Some references for documentation purposes : One suggestion to return it back to submission order, so it can be picked up by QueueWaitIdle (did not happen though): |
I run a bunch of test sessions on the latest angle and used different versions of vvl starting from the latest code, also tried the commit mentioned in the description of this ticket 27ba73e, and the commit just before that change 19314aa. I can confirm that all these vvl versions report the same issue: the last It's safe to destroy semaphore when angle inserts Even if the fence check reports READY after VVL expects that there is The attached api dumps are from the latest vvl and also from the vvl commit before api_latest_vvl_(8366ffa)_error_and_no_fence_check.txt The fix suggestion is to always call |
Closing this as not a VVL bug. So far, all verified |
Since 27ba73e, ANGLE's been hitting a validation error saying that a semaphore being destroyed is in use by the command buffers.
I finally got around to looking into it, and the failure is coming from when ANGLE is destroying semaphores used for
vkQueuePresentKHR
. This is happening on surface destruction after a call tovkQueueWaitIdle
. Additionally, ifVK_EXT_swapchain_maintenance1
is supported, the present fences are waited on, if any.On the platform I'm hitting this,
VK_EXT_swapchain_maintenance1
is not supported. However,vkQueueWaitIdle
is supposed to have been enough to destroy the semaphores (because there is no alternative). This might be a bug, or a race condition with the above change?Context: anglebug.com/7729
Need to unsuppress
VUID-vkDestroySemaphore-semaphore-01137
in RendererVk.cpp before running the test.The text was updated successfully, but these errors were encountered: