Skip to content

test: packaged-startup harness records no stack when the frontend dies from a signal #2714

Closed

Description

@zackees

Found investigating #2432. Correction to my first draft: #2446 (merged) already uploads macos-<target>-crash-reports on a failed DMG-startup job, so the .ips/.crash file is collected. What is still missing is any of it in the log the lane reader actually sees, and the hang variant produces no .ips at all.

What happens today

close_frontend (test/packaged-startup.py):

Ask

  1. On a signal exit, read the newest DiagnosticReports/*.ips written after the launch time and print the four lines a reader needs into the step output before raising: file name, Exception Type, Crashed Thread, and that thread's first ~10 frames. Keep the failure fatal - evidence, not a pass.
  2. Print both branches (.ips summary and sample summary) in one shape, and say plainly in the log when no report was produced (the hang case) instead of leaving it implied.
  3. A test that needs no real crash: point the summariser at a fixture directory with a canned .ips and assert the summary lines appear; assert a missing/empty directory degrades to a notice, not an exception. That part runs on Linux CI.

Activity

  1. added
    infra
    on Oct 28, 2026
  2. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Claiming: investigation

    Reading test/packaged-startup.py against the three asks before I write code. Plan below; the implementation claim follows once the issue is ready.

    1. On a non-zero exit, summarise the newest DiagnosticReports/*.ips written after the launch time into the step output: file name, Exception Type, Crashed Thread, and that thread's first ~10 frames. Keep it fatal.
    2. One shape for both branches (sample on a hang, .ips on a signal exit), and an explicit notice when neither exists (the hang case).
    3. A Linux-runnable test: a fixture .ips summarised without a real crash, plus a missing/empty directory degrading to a notice.
  3. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    /ready

  4. added
    needs-investigation
    on Oct 28, 2026
  5. added
    ready
    and removed
    needs-investigation
    on Oct 28, 2026
  6. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Claiming: packaged-startup crash-report evidence

    Taking the three asks as one unit (one file plus its test):

    1. summarize_diagnostic_report() reads the two-document .ips (header line, then body) and returns exception type:, crashed thread: <index> <name>, and frame N: <image> <symbol> + <offset> for the faulting thread only, capped at 10 frames. report_crash_reports() prints the newest report written after the launch inside one shutdown evidence: group and returns whether one was printed; an unreadable or unparsable report says no frames parsed instead of raising.
    2. close_frontend() now takes the launch time: the signal-exit path prints the report and names the signal (signal 11 (SIGSEGV)) before raising, and the 30 s timeout path uses the same group shape, then says no crash report was written after the launch on a hang because there never is one.
    3. ci/test_packaged_startup.py::CrashReportEvidenceTest drives it from a canned .ips fixture - no real crash - and covers a missing, empty, older and unparsable directory as notices.

    RED is the failing test on master (8 AttributeErrors); GREEN is the harness change. First PR next.

  7. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Opened as #2718 (draft -> ready once CI is green).

    • RED 0d7207c6b: ci/test_packaged_startup.py::CrashReportEvidenceTest, 8 cases, all AttributeError on the missing summarize_diagnostic_report / report_crash_reports.
    • GREEN efa5c6b8e: the harness prints shutdown evidence: frontend exited with signal 11 (SIGSEGV) plus the newest post-launch .ips summary (exception type, crashed thread, first 10 frames) before raising; the timeout branch uses the same group and then says no report was written. uv run python -m unittest ci/test_packaged_startup.py OK (35 tests), ./lint ok (45.2 s).

    No real crash is needed: the fixture is a canned two-document .ips, and missing/empty/older/unparsable directories are asserted as notices. Watching CI.

  8. zackees commented on Oct 28, 2026

    @zackees
    MemberAuthor

    Done in #2718 (merged master).

    What landed, against the three asks:

    1. summarize_diagnostic_report() + report_crash_reports() in test/packaged-startup.py: on a non-zero exit the step now prints the newest .ips/.crash written after the launch — file name, exception type:, crashed thread: <index> <name>, and that thread's first ten frame N: <image> <symbol> + <offset> — and raises with signal 11 (SIGSEGV) instead of a bare -11. Still fatal.
    2. One shutdown evidence: group shape for both branches (.ips summary and the live sample), and an explicit no crash report was written after the launch when neither exists — the hang case now says so instead of leaving it implied.
    3. ci/test_packaged_startup.py::CrashReportEvidenceTest: a canned two-document .ips fixture, no real crash needed, plus missing / empty / older-than-launch / unparsable directories as notices. Runs on the Linux lanes (Fast Gate 2m26s green).

    Not covered here: the .ips is only summarised on macOS (the paths Apple writes to); the Windows lane keeps its bare exit code. Say so if a Windows crash-report path is wanted as a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

infraready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions