Post-mortem debugging support for protocol problems and for debug logs #734
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#734
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?
Currently with issues like #732, we are basically just screwed. There are no realistic ways to debug them besides some very careful guessing and basically "being pennae".
If we had a facility with a ring buffer of like 256k in size or something like that that stored frames of data in a totally ordered fashion, we could hook up protocol events to it and have a hope of actually debugging these problems.
The idea is, you have a framing mechanism where you store a frame of data and then its length directly after that. To extract the frames from the ring buffer, you pull the length from right before the write pointer and then pull the frame.
In the frames we probably want (but this is not critical, we NEED to have the facility at all, we cannot block on putting anything in particular in it):
std::source_location
).When Lix crashes via terminate, we could print out the base64 of the ring buffer (in the proper order but not deframed).
Then we could write a debug tool in Rust or GNU poke or something to pull the frames apart.
I discussed this with @lunaphied who was thinking about doing some of it.