Repository navigation
fix(cdb): confirm remote thread context before automatic triage - #127
xiaozhu1337 wants to merge 2 commits into
Conversation
|
Thank you for the investigation behind this one. The underlying problem is real and I want it fixed, but I cannot take this implementation, because when I tested it against a real debug server it does not fix the case in its own title and it regresses another one. It does not fix the running-target caseI built the scenario the PR describes: a real With a truly running target the And it regresses the no-context caseA target with no current process or thread, which The register probe passes by accident_REGISTER_CONTEXT = re.compile(r"^\s*(?:eax|rax|r0|x0|pc|ip|eip|rip|iip)\s*=\s*[0-9a-f]+", re.I)The first line of real So Where this leaves itTwo design points I want to settle before any readiness fix lands, and I would value your view on both:
I am deferring this to 1.6 rather than rushing it into 1.5, because testing it properly needs a live running remote target and there is currently no automated coverage of that path at all. Every live scenario in the suite opens a stopped target, which is exactly why both this and the consolidated branch shipped a defect there. Adding that scenario is part of the 1.6 work. Two things from this PR I am keeping: your correction that closing a client does not promise to resume the server's target is accurate, I measured it in both trees, and it will land as a docs change on its own. The "opening stops the target" wording will not, since it is not true for running targets. The readiness half of #125 stays open to track this. Closing the PR, not the problem. |
Summary
Remote startup currently accepts a bare
.echohandshake as readiness for!peb. The server may already have resumed its target; the historical transcript shows?:???>, no current process/thread warnings, then a successful marker. The first!peblater runs after break-in, but its open already failed.gon failure.Verification
python -m pytest src/mcp_windbg/tests/test_remote_startup.py -q: 7 passed. Fake process tests cover running and stopped targets, missing context, break failure, empty register output, never-replying handshake and a missing probe marker. No native debugger or live remote server was launched. These tests do not verify Windows signal forwarding or every architecture's real register format; native validation should be supervised.Scope
Related to #125; the undisclosed-session rollback is tracked independently in #126. This fixes a source-level readiness error and does not claim to reproduce or eliminate the observed NPFS/IRP kernel-pool exhaustion.