Skip to content
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

Deadlock on shutdown with debug callbacks #2027

Closed
etang-cw opened this issue Sep 29, 2023 · 1 comment · Fixed by #2037
Closed

Deadlock on shutdown with debug callbacks #2027

etang-cw opened this issue Sep 29, 2023 · 1 comment · Fixed by #2037
Labels
Bug Completed Issue has been fixed, or enhancement implemented.

Comments

@etang-cw
Copy link
Contributor

To reproduce:
Run vulkaninfo against MoltenVK

Expected result:
vulkaninfo exits

Actual result:
vulkaninfo doesn't exit
Sampling the process gives this trace (lldb wouldn't attach because annoying macOS restrictions on debugging signed apps):
image

Seems related to ~MVKInstance logging under _dcbLock

lock_guard<mutex> lock(_dcbLock);
mvkDestroyContainerContents(_debugReportCallbacks);
MVKLogInfo("Destroyed VkInstance for Vulkan version %s with %d Vulkan extensions enabled.",
mvkGetVulkanVersionString(_appInfo.apiVersion).c_str(),
_enabledExtensions.getEnabledCount());

Not sure whether you meant to log before clearing the debug report callbacks, or to drop the lock before logging, but either of the two should fix it

@billhollings
Copy link
Contributor

PR #2037 fixes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Completed Issue has been fixed, or enhancement implemented.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants