Add crash command capture to preserve crashing API call in trace#2834
Open
vrdaveb wants to merge 1 commit intoLunarG:devfrom
Open
Add crash command capture to preserve crashing API call in trace#2834vrdaveb wants to merge 1 commit intoLunarG:devfrom
vrdaveb wants to merge 1 commit intoLunarG:devfrom
Conversation
When a Vulkan driver crashes during an API call, the capture layer currently loses the offending command because parameter encoding happens post-call. This adds a new opt-in capture mode that records which API call is in-flight at the time of a crash. When enabled via GFXRECON_CAPTURE_CRASH_COMMAND=true: - Before each driver dispatch, a pre-encoded function call block (containing the call ID and thread ID) is saved in thread-local storage - Crash signal handlers (SIGSEGV/SIGABRT/SIGBUS/SIGFPE/SIGILL on POSIX, SEH on Windows) write any in-flight call blocks to the capture file and flush - Force-flush is activated so all completed calls are on disk - After the driver call returns, the in-flight marker is cleared The crashing function appears as the last block in the capture file, identifiable by tools like gfxrecon-convert. All preceding calls are preserved with full parameters. Performance impact when disabled: zero (early return on bool check). When enabled: one atomic store + small memcpy per API call, plus force-flush overhead. Fixes LunarG#699
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a Vulkan driver crashes during an API call, the capture layer currently loses the offending command because parameter encoding happens post-call. This adds a new opt-in capture mode that records which API call is in-flight at the time of a crash.
When enabled via GFXRECON_CAPTURE_CRASH_COMMAND=true:
The crashing function appears as the last block in the capture file, identifiable by tools like gfxrecon-convert. All preceding calls are preserved with full parameters.
Performance impact when disabled: zero (early return on bool check). When enabled: one atomic store + small memcpy per API call, plus force-flush overhead.
Fixes #699