-
Notifications
You must be signed in to change notification settings - Fork 626
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
Timeline semaphore sample not available on Windows #588
Timeline semaphore sample not available on Windows #588
Comments
Right now, the sample is disabled using a define in the CMake file. So in order to build this on windows, you need to remove the if statement at https://github.com/KhronosGroup/Vulkan-Samples/blob/master/samples/extensions/timeline_semaphore/CMakeLists.txt#L18 And also make sure to save all your work before running it, as the initial kernel bug caused hardlocks back then. |
Just tried again on an up-to-date Windows 10, and the sample still hangs for me in such a manner that I can't even quit it anymore. Looks like the kernel hang is still there :( This means we don't have a usable timeline semaphore example for windows. Maybe we should do another sample that's a bit more simplistic? |
Using the validation layer from the latest public SDK (1.3.236.0), I don't even get any validation layer errors. This sample just runs on Win10 with an RTX A3000. Would someone else dare to run this on Win10, to get more data points? Is it just Sascha's machine where it doesn't work, or is it just mine where it's working? |
Just checked again with everything updated, using the latest Vulkan developer driver and I still get a kernel hang. Maybe it's not related to the GPU but something on the CPU side instead? I'm on an AMD Ryzen 5 3600. |
I've got the same issue with enabled VK_LAYER_KHRONOS_validation on Ubuntu 22.04. vulkaninfo output:
|
@avpdiver: So you get a kernel hang on Linux? If so this may hint at a general problem with the sample, rather than an issue with isolated setups. |
After updating to Windows 11 I no longer get a kernel hang, but the sample still does not work. It just displays a blank window, if a toggle between other windows and back to the sample I get something displayed, but it's never updated :( |
I tried to debug this, and it looks like the sample only does the first submit and then gets stuck waiting for something forever. If I remove the lock guard. If we're not able to fix this sample maybe we can add a more basic timeline semaphore sample that's guaranteed to work. |
@HansKristian-Work: Can you help us with this one? |
If it still hangs the kernel, that means Windows still has not been fixed. Not sure what I can do. |
To make the sample more robust, I'd suggest removing the wait-before-signal. That's the real problem on Windows. If there is a stalled queue (does not have to be the present queue itself) that cannot make forward progress when vkQueuePresentKHR is called, the entire system locks up. |
I am hitting seemingly the same issue in a hobby project. (wip commit)
So this might occur because the semaphores wait values are invalid (i.e too high) and therefore can not render the next frame? ... Or are you talking about any vkQueuePresentKHR waiting for a stalled vkQueueSubmit that is again waiting on a timeline semaphore? I would guess this would be normal use-case of timeline semaphores? |
Any queue, yes. The behavior seems to be as-if the present on Windows does a full device-wide wait-for-idle instead of just waiting for the present queue. That will indeed deadlock, but it also violates the Vulkan specification. As long as the sample ensures that all queues have forward progress at the time of Present, that seems to work around it. |
Thanks for the clarification. Do we know if this will be fixed any time soon? |
No idea. It's been known for years at this point. |
Due to a kernel bug the timeline semaphore sample was disabled on windows:
We should reevaluate this and if it works on Windows now, the sample should be enabled for that platform again.
The text was updated successfully, but these errors were encountered: