Repository navigation
Conversation
The log is mirrored to session.log through tracing-appender's non-blocking writer; after an unclean exit the tail of the previous session is attached to the crash report. A watchdog probes the main thread and, when it stays blocked, leaves a marker naming the command it is stuck in, so a killed 'Not responding' window is reported as a hang instead of a bare unexpected exit. Webview errors are logged to the same file.
…logs The session log attached to a crash report can end up in a public issue, so the home directory is replaced with ~ and IP addresses with <ip>.
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 does this PR do?
Makes crash reports useful when there is no stack
session.login the app log dir and capped at 4 MB. On start the old file becomesprevious-session.log; after an unclean exit its last 300 lines go into the crash report.run_on_main_thread. After 5 s without an answer it writeshang.json, naming the IPC command the main thread is stuck in. If the app is then killed, the next launch shows ahang("Not responding") report instead of "did not shut down cleanly".onerrorandunhandledrejectionare written to the same log throughlog_frontend.~and IP addresses become<ip>, since reports end up in public issues.Why is this the right approach?
tracing-appender's non-blocking writer in non-lossy mode. Its rolling appender rotates only by time, and we need one file per session, so rotation stays ours.regexwas already in the tree throughtracing-subscriber. Candidates are confirmed with std'sIpv4Addr/Ipv6Addrparsers.crash-handler+minidumper, including dumps on hang) and Sentry come later, in separate PRs.Checklist
bun run checkpassescargo check --manifest-path src-tauri/Cargo.tomlpassesbun run formatleaves the tree cleantracing-appender,regex)Platform coverage
hangreport namingdebug_hang, with the previous session log. Recovery after a hang is logged. Unit tests cover redaction.No per-OS files. The watchdog relies on
run_on_main_thread, and the log dir comes from Tauri'sapp_log_diron every platform.