Skip to content

Shipped sidecars can say why they crashed - #2351

Merged
santoshkumarradha merged 5 commits into
app/v3from
fix/c61-crash-reports
Nov 4, 2026
Merged

santoshkumarradha merged 5 commits into
app/v3from
fix/c61-crash-reports

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

What changes

When the desktop app's engine crashed from a Go panic or a fatal runtime error, it ended with exit status 2 and printed nothing, so no one could tell why. The cause is garble's -tiny flag, which removes everything the runtime prints.

Shipped sidecars now build with -literals alone, so a crash prints its report. Names in the report stay hashed. make app-sidecar-reverse SEED=<file> LOG=<file>, run in a checkout of that build's commit, turns them back.

Each build makes its own random seed and keeps it in APP_SEED_DIR on the build machine, in a file named for the start of the binary's checksum. The seed goes in neither the repository nor anything that ships.

Measurements (darwin/arm64 sidecar, same commit)

Build Size Gzipped SIGQUIT: exit, stderr bytes
-literals -tiny 224.5 MB 94.4 MB 2, 0
-literals 252.6 MB 106.0 MB 2, 45,135

No workflow or script in this repository or the desktop repository depends on the sidecar's size.

Validation

A real sidecar with a temporary crash hook (not in this PR) ran under the desktop app's real supervisor. A forced panic and a real concurrent map write each ended with exit 2. The report reached the private log, and app-sidecar-reverse restored the function names, for example:

panic: forced panic from a worker
goroutine 82 [running]:
main.c61PanicDeep(...)
main.c61CrashWorker({0x4636507ac01a?, 0x0?})

Trade-offs and limits

  • The download grows about 11.6 MB.
  • The binary keeps more names and line data than -tiny did, so reverse engineering gets easier. Literals stay obfuscated.
  • GODEBUG is honoured again.
  • After reverse, function names are right but line numbers are not always (one frame read zz_crash.go:3 for code further down the file).
  • The proof build used a 16-byte seed, of which garble reads 8. This PR makes 8 directly; a final build with it has not been reversed yet.

🤖 Generated with Claude Code

santoshkumarradha and others added 4 commits November 4, 2026 10:40
-tiny removes everything the Go runtime prints, so a panic or fatal error in
the desktop app's engine ended it with status 2 and no words. Build with
-literals alone, and keep each build's seed privately so a report's hashed
names can be read back with make app-sidecar-reverse.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signing changes the binary's checksum, so a seed named for the checksum alone
could not be found from a shipped build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@santoshkumarradha
santoshkumarradha merged commit f483835 into app/v3 Nov 4, 2026
@santoshkumarradha
santoshkumarradha deleted the fix/c61-crash-reports branch November 4, 2026 18:54
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.

1 participant