Repository navigation
Shipped sidecars can say why they crashed - #2351
Merged
Merged
Conversation
-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]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
-tinyflag, which removes everything the runtime prints.Shipped sidecars now build with
-literalsalone, 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_DIRon 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)
-literals -tiny-literalsNo 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-reverserestored the function names, for example:Trade-offs and limits
-tinydid, so reverse engineering gets easier. Literals stay obfuscated.GODEBUGis honoured again.zz_crash.go:3for code further down the file).🤖 Generated with Claude Code