Repository navigation
fix(agc): stop capture tracing before driver unload - #19324
oneandonlydean merged 1 commit into
Conversation
|
Windows check of head All 21
AI-assisted: yes. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows NVIDIA check of head Setup: Windows 11 Home 10.0.26300, i9-13900K, WinLibs GCC 15.2.0, Release, RTX 4080 (
The three extra tests are the ones this PR adds to that set; they pass. Not checked: whether the new tests fail on AI-assisted: yes |
|
Check of head Windows, WinLibs GCC 15, Release
Linux 6.18, GCC 16, Release. The 20
Not covered: the two-line call in AI-assisted: yes. |
What
With capture tracing enabled on Windows, a completed replay can hang while its DLL is unloaded:
CaptureTracejoins its writer from a static destructor under the loader lock.Stop and drain the trace during normal driver shutdown, after its producers have stopped. The later destructor reuses that completed stop. Repeated/concurrent stops are safe, unused tracing stays unused, and late records cannot restart the writer.
Tested
Windows x64, MinGW GCC 15.2 / UCRT: 21 focused CaptureTrace cases passed, including queued-record preservation, repeated/concurrent stop, write/flush failure handling and DLL unload. The final DLL fixture also builds and passes its unload test with the project's
-fno-asynchronous-unwind-tablessetting andlibclinkage.The current-main DLL reproducer hangs during explicit unload and ordinary process exit; stopping the candidate first lets both finish, preserving all 32 queued records and one summary. Reproduction commands and waiting stacks are described in #19321. Conventions and diff checks pass.
Validation setup — 2026-11-13
Base:
a6606d5bab753def2a088d412795039a8f71e076. CPU-only logging/lifecycle tests, using the actual CaptureTrace sources and test-registration fragment in a focused Ninja configuration with an existing source-builtlibc. All three CaptureTrace test executables are registered as run. The standalone process-exit harness returns normally with exit code 0.pr_overlap.pyrequired manual comparison of the sharedLifecycle.cppchanges in #5925, #6188, #11435, #11436, #15136, #15456 and #18293. Those changes concern other workers, recorder waits or the arm gate; none stops CaptureTrace or creates a landing dependency for this fix.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)