breadbug: bread-client panic hook, log forwarding and heartbeat (automatic for every app) #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of ECO-EP1 (see ECO-66).
"Comes with every app" means no per-app work: adopting breadbug should be a version bump of bread-client.
Requirements
Acceptance
Implemented in bread-ecosystem PR #68 (bread-client lives in bread-utils, not the bread repo). Done: panic hook with module/offset/build-id frames and hook-frame cutting, bounded lossy log forwarding plus a log::Log backend, tick-gated heartbeat (GLib attachment under the gtk feature), per-app opt-out via BugOptions::disabled(), no-op without breadd, has_build_id(). Not done from the acceptance text: (1) the breadclip pilot integration, which will happen as part of the ECO-68 rollout once bread-utils is tagged; (2) a measured overhead number (the per-call cost of log()/tick() is a channel try_send / atomic store, but I did not benchmark it). The gtk-feature build and a release-mode run of the crash tests were not run in this session.
Independent verdict: changes_requested at exact head b2614ba0e1b48f25cd40a09e184b721f512f5408, base b52f0fd6faf10c0f595c70dbc3bfb64cb4114fa8. Full criterion mapping, commands and file/line repair checklist persisted: Breadway/bread-ecosystem#68 (comment). Findings ECO-76. Reproduced shutdown hang with retained logger (timeout3s exit124), raised SIGSEGV survives(exit0), prior disposition overwritten, raw fake PII preserved. Native glibc backtrace is not justified async-signal-safe; no prior handler/alt-stack restoration. Logs drop-newest without sustained rate limit; adoption remains manual, not automatic connect. Panic previous-hook call retained and debug/release crash fixtures pass, but do not satisfy integrated acceptance. Independent66 unit+4 integration tests,4 optimized crash fixtures,GTK check and targeted clippy pass; exact-head check/check(push) SUCCESS Actions297. Actual store PR22, scrubber and pilot CLIP-19 unmerged; store-entry/report acceptance and overhead unverified. BREAD-16/17 to todo for coordinator repair on existing PR68; preserve branch. No merge/tag/release/done. Fresh exact-head review after repair.
Independent changes_requested at exact head 63b855bce63313f789ab04ffea96f0b89fdce974, base 4f70691b33bc778294073681065665d3e2b7f559. Full mapping: Breadway/bread-ecosystem#68 (comment). Repair of comment 4431 verified for std-guard detection, SIGSEGV death (7/7 crash tests, 0 ignored), custom prior handler chaining, ucontext RIP frame, auto-connect, scrub-before-send, bounded shutdown, and measured overhead. Still failing: Queue::push (mod.rs:256-274) drops the newest line when take holds the lock, even under the 512 cap. Reproduced twice: logs_are_batched_clipped_and_leveled left 2, right 3, missing the last line. Filed ECO-77. Store entry and breadclip pilot stay unverified (CLIP-19 backlog; no tag). No merge. Move to todo for repair on existing PR 68.
PR #68 independent re-review at 47dbe00f5e1caf06dc3fa78d904001ba978e5b9a: changes requested. Queue::push in bread-utils/src/bug/mod.rs spins 1ms then takes blocking mutex, so app-thread logging can stall without a bound if lock holder is preempted. No IO under lock does not bound acquisition. Replace with truly bounded/nonblocking enqueue preserving newest under-cap and drop-oldest at cap; add a test holding lock > retry interval and asserting prompt producer return plus retained newest item. Full verdict persisted on PR #68. Keep pilot/store and CLIP-19 gates open; do not mark done.
Independent re-review of PR68 at 711e3e8261064e066b53b8f31d0cfade94d1d8ba: ECO-77/provider implementation passes, conditional on exact-SHA CI green. Persisted verdict/evidence: Breadway/bread-ecosystem#68 (comment). Queue nonblocking/drop-oldest tests and workspace suite passed; integrated store prerequisite is present, but CLIP-19 pilot remains unmerged. This is not full BREAD-16/17 acceptance. Preserve pilot/rollout gates, keep cards in review, and do not mark done. No merge until check/check (push) is green; then re-read current head/base/reviews/mergeability and merge per authorization, no tag.