Skip to content

Ignore empty crash report files - #14730

Merged
Sean McManus (sean-mcmanus) merged 6 commits into
mainfrom
seanmcm/devbox2-wsl/agent79/fix-false-crash-telemetry
Sep 3, 2026
Merged

Ignore empty crash report files#14730
Sean McManus (sean-mcmanus) merged 6 commits into
mainfrom
seanmcm/devbox2-wsl/agent79/fix-false-crash-telemetry

Conversation

@sean-mcmanus

Copy link
Copy Markdown
Contributor

Summary

Prevent empty native crash-report placeholders from being classified and uploaded as crashes. Track delayed reads per file so a later write to the same file is still processed normally.

This PR was investigated and created by GitHub Copilot (in VS Code). Any message starting with ✨Copilot: was sent by Copilot.

Root cause

The crash watcher introduced in #11858 assumes every file change represents a completed report. The missing-signal fallback added in #13493 consequently classifies a zero-byte file as SIGMISSING, logs it as a crash, and deletes it. A report file can be observed before its crash header has been written, which can produce false telemetry and remove the path before a later real crash writes its report.

Fix

Use a per-file pending set only while a delayed read is scheduled. Release the filename before reading, and leave zero-byte files untouched without logging telemetry. A later write can then produce another change event and schedule normal processing, while non-empty crash-report parsing remains unchanged.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Watcher re-registration can clear active reservations and cause duplicate crash processing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Prevents empty crash-report placeholders from generating false telemetry while allowing later writes to be processed.

Changes:

  • Tracks pending delayed reads per crash filename.
  • Leaves zero-byte crash reports untouched.
File summaries
File Description
Extension/src/LanguageServer/extension.ts Updates crash-file scheduling and empty-file handling.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Extension/src/LanguageServer/extension.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Overlapping pending reports can incorrectly clear the shared crash-writing telemetry flag.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread Extension/src/LanguageServer/extension.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused changes correctly handle empty reports and overlapping delayed reads without altering non-empty report parsing.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@sean-mcmanus
Sean McManus (sean-mcmanus) marked this pull request as ready for review September 3, 2026 15:18
@sean-mcmanus
Sean McManus (sean-mcmanus) requested a review from a team as a code owner September 3, 2026 15:18
@sean-mcmanus
Sean McManus (sean-mcmanus) merged commit 8031bd0 into main Sep 3, 2026
6 checks passed
@sean-mcmanus
Sean McManus (sean-mcmanus) deleted the seanmcm/devbox2-wsl/agent79/fix-false-crash-telemetry branch September 3, 2026 17:36
@github-project-automation github-project-automation Bot moved this from Pull Request to Done in cpptools Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants