Skip to content

Crash reports: a record left by an earlier build is not filed under the release that uploads it - #1370

Merged
GLinnik21 merged 2 commits into
mainfrom
lane/crash-release-attribution
Nov 13, 2026
Merged

GLinnik21 merged 2 commits into
mainfrom
lane/crash-release-attribution

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

A crash, panic, freeze or exit() record is uploaded at the NEXT launch. After an update that launch is a newer build, and every fallback report was stamped release = plxnative@<the uploading build>. Sentry PLX-NATIVE-26 is the field case: a 0.9.0 process crashed at shutdown (its dist, the crashed image's GNU build id, is 0.9.0's), and 0.10.0 uploaded it as a 0.10.0 crash. Every release would collect the previous release's last crashes in its first days, exactly when its numbers are watched.

  • stamp_release (one helper, all four bodies): when the record's img: build id differs from the running build's, the report carries no release; dist stays the crashed build's id, and two tags say what happened: crash.uploaded_by (the app version that sent it) and crash.build_id (the crashed build, because Sentry ignores dist on an event without a release, and a panic body has no debug_meta).
  • Same build, no img: line, or an unreadable running id: stamped as before.
  • Io::queue_report handed the bodies the record's own id as the "running" id, which would have made any comparison a no-op; body construction is now report_body(), which the queue and the tests share, and it receives current_build_id.
  • The consent preview's panic sample now shows the straddled shape (no release, both tags, placeholders); the fault sample shows the ordinary one.
  • PRIVACY.md says when release is left out and names the two tags (an app version and a binary build id, which these reports already carried). The set_release doc names the exception.

No record carries the crashed build's version (the image marker is written in src/main.c before the release is set), so these events are filed under no release rather than under the right one.

Gates

  • New tests: a_record_from_another_build_is_not_filed_under_the_running_release (all four kinds; failed before the fix: "a record from build 1122… was filed under the running release"), a_record_from_the_running_build_keeps_the_running_release, a_record_that_cannot_be_compared_is_stamped_as_before, the_panic_preview_shows_the_straddled_shape_and_the_fault_preview_the_ordinary_one.
  • make test-crate C=plx_telemetry: 362 passed, 0 failed, 1 ignored. make test-crate C=plx_screens T=consent: 62 passed.
  • Full gates: this PR's CI.
  • Reviewed once (pr-reviewer): two MINOR findings, both fixed in the second commit.

🤖 Generated with Claude Code

GLinnik21 and others added 2 commits November 13, 2026 02:08
…unning release

PLX-NATIVE-26 was a SIGSEGV in a 0.9.0 process (its dist is 0.9.0's build id), recovered and
uploaded by the next launch, 0.10.0, which stamped [email protected] on it. Every crash that
straddles an upgrade was filed under the NEW release, poisoning per-release crash counts and
Sentry's regression detection right after each release.

The record names the executable it ran as (its img: line) but not its version: the image marker
is written by src/main.c before the release is known. So the rule compares build ids, in one
shared stamp_release called last by the fault, panic, freeze and exit bodies:

- the record's image id equals the running one, the record has no image line, or the running id
  could not be read: release is the running release, as before;
- they differ: release is omitted, dist stays the crashed build's id, and the new tag
  crash.uploaded_by carries the running app version.

The recovery path used to hand every body the record's own id as its "build_id", so a comparison
inside the bodies could never have seen a difference. Body construction is now report_body(),
which queue_report and the tests both call, and it passes the running id. panic_sentry_body takes
the running id too.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…onsent preview shows it

Sentry ignores `dist` on an event that has no `release`, so the report bb073d1 files under no
release would have named no build at all, and a panic body has no `debug_meta`, so `dist` was its
only carrier. stamp_release now also sets the tag `crash.build_id` (the record's image build id)
beside `crash.uploaded_by`, on all four kinds of record, and only on the straddled path.

The doc comment no longer says `dist` is what ties an event to its symbols (that goes through
`debug_meta`'s code_id/debug_id; `dist` names the build), and its evidence for "the release is not
known when the image marker is written" is now src/main.c, which writes the marker before
enter_application, in place of a citation of docs/module-layers.md that does not say so.

The consent preview is built from the real serializers so that a new field shows up before the
person consents to it, but both samples were built with the record's own build id, so the straddled
shape never appeared. The panic sample is now built as a record recovered by a later build: no
`release`, and the two tags as placeholders (`<app version>`, `<crashed ELF build id>`, both already
in the consent screen's translated set). The fault sample is the ordinary shape and is unchanged.

PRIVACY.md says release is left out of a report left by an earlier build and names the two tags.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 4c00cf1 into main Nov 13, 2026
19 checks passed
@GLinnik21
GLinnik21 deleted the lane/crash-release-attribution branch November 13, 2026 11:37
@GLinnik21 GLinnik21 added the backport release/v0.10 When merged into main, also cherry-pick onto release/v0.10 (backport.yml) label Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Backport to release/v0.10: the cherry-pick applied, but pushing it or opening the pull request failed. See https://github.com/plxnative/plx-native/actions/runs/44191158823

GLinnik21 pushed a commit that referenced this pull request Nov 17, 2026
… under the release that uploads it (#1370) (#1450)

A crash, panic, freeze or exit() record is uploaded at the next launch, which after an update is a newer build, and every fallback report was stamped with the uploading build's release. Sentry PLX-NATIVE-26 was a 0.9.0 shutdown crash (its dist is 0.9.0's build id) filed as a 0.10.0 crash.

- stamp_release, shared by all four bodies: when the record's img: build id differs from the running build's, the report carries no release; dist stays the crashed build's id, and the tags crash.uploaded_by (the sending app version) and crash.build_id (the crashed build, since Sentry ignores dist without a release and a panic body has no debug_meta) say what happened. Same build, no image line or an unreadable running id: stamped as before.
- Io::queue_report handed the bodies the record's own id as the running id; body construction is now report_body(), shared by the queue and the tests, and receives current_build_id.
- The consent preview's panic sample shows the straddled shape; PRIVACY.md says when release is left out and names the two tags; the set_release doc names the exception.

No record carries the crashed build's version (the image marker is written in src/main.c before the release is set), so these events are filed under no release rather than under the right one.

(cherry picked from commit 4c00cf1)
GLinnik21 added a commit that referenced this pull request Nov 18, 2026
The release note and the authored half of the audit for v0.10.1, a patch released from release/v0.10: v0.10.0 plus the backports of #1438 (Realtek webOS 5 access() interposer), #1437 (seek snap-back on sets with no displayed-frame counter), #1405 (Continue Watching start position), #1439 (Play during a held prime) and #1370 (crash records filed under the uploading release).

Compatibility is unchanged from 0.10.0. The audit records the device evidence each fix rests on and leaves the generated block for the release run.
GLinnik21 pushed a commit that referenced this pull request Nov 18, 2026
The release note and the authored half of the audit for v0.10.1, a patch released from release/v0.10: v0.10.0 plus the backports of #1438 (Realtek webOS 5 access() interposer), #1437 (seek snap-back on sets with no displayed-frame counter), #1405 (Continue Watching start position), #1439 (Play during a held prime) and #1370 (crash records filed under the uploading release).

Compatibility is unchanged from 0.10.0. The audit records the device evidence each fix rests on and leaves the generated block for the release run.

(cherry picked from commit e2f8760)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release/v0.10 When merged into main, also cherry-pick onto release/v0.10 (backport.yml)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant