Skip to content

Collect Metal crash diagnostics for PR 3822 - #3825

Closed
leiyue123 wants to merge 6 commits into
mainfrom
bugfix/yuelei_metal_crash
Closed

leiyue123 wants to merge 6 commits into
mainfrom
bugfix/yuelei_metal_crash

Conversation

@leiyue123

@leiyue123 leiyue123 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Temporary diagnostic PR based on #3822 at caa3c77. Do not merge this diagnostic PR.

The previous Metal runs crashed with SIGTRAP during PAGFrameCompareTest.RenderFiles and PAGCompositionTest.VideoSequence without uploading a crash report. This PR keeps the decoder changes intact and adds diagnostics to the same test configuration.

The first diagnostic run also reproduced SIGSEGV during PAGFrameCompareTest.RenderFiles in UpdateBaseline_Metal built from origin/main. It failed before reaching the PR test binary. The follow up commit extends collection to cover this earlier failure path.

Diagnostic changes

  • Save native test stdout and stderr while preserving the test process exit code.
  • Collect available JSON and screenshots even when the process crashes or result copying fails.
  • Save the complete Metal autotest step log including baseline refresh output while preserving the original step exit code.
  • On Metal failure wait up to 30 seconds for current PAGFullTest_Metal and UpdateBaseline_Metal crash reports.
  • Collect binaries from both build and build-update-baseline.
  • Upload each available binary with its UUID matching source commit and generated dSYM in separate subdirectories under mac_metal_result/crash. Baseline binaries record origin/main while PR test binaries record the CI merge commit.
  • Keep existing test execution and baseline checks unchanged. No decoder test or baseline changes are added by the diagnostic commits.

Validation

  • Bash syntax workflow YAML and all inline shell syntax checks passed.
  • Nine native result collection scenarios passed in the initial diagnostic commit.
  • Five complete step logging and exit status scenarios passed in the follow up commit including simulated SIGSEGV and log failures.
  • Eight extended crash collection scenarios passed including both binary paths correct source commit mapping delayed reports stale report filtering missing binaries and symbol generation failure.
  • Project code formatting was run.
  • Debug PAGFullTest_OpenGL built successfully with PAG_BUILD_TESTS=ON.
  • Real hosted runner crash report generation remains to be verified by the next Metal CI run.

@codecov-commenter

codecov-commenter commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.43%. Comparing base (5faac72) to head (880241b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3825      +/-   ##
==========================================
+ Coverage   83.41%   83.43%   +0.01%     
==========================================
  Files         748      748              
  Lines      105944   105944              
  Branches    29587    29587              
==========================================
+ Hits        88373    88391      +18     
+ Misses      10772    10766       -6     
+ Partials     6799     6787      -12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@leiyue123

Copy link
Copy Markdown
Collaborator Author

Enabled NSZombieEnabled=YES only for the Metal autotest step in commit 880241b. Both the baseline subprocess and the full PR test suite inherit the flag. Existing tests baseline checks exit status handling and crash artifact collection remain unchanged.

The previous run captured the real parent process SIGSEGV in PAGDiskCacheTest.PAGDecoderTeardownRace. Its faulting VideoToolbox paravirtualization queue was creating a CVPixelBuffer and IOSurface when CFDictionaryGetValue called objc_msgSend(hash) on an invalid address. The other three reports were expected death test aborts. The matching dSYM resolved the active decode caller to VTDecompressionSessionDecodeFrame in the macOS decoder.

This run aims to identify a deallocated object type rather than assuming the crash proves a decoder context or attribute dictionary bug. Zombie diagnostics retain deallocated objects and can increase memory use or change reproduction timing.

Validation passed for workflow and shell syntax Metal-only environment scope child process inheritance and the Debug PAGFullTest_OpenGL build.

@leiyue123 leiyue123 closed this Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants