-
Notifications
You must be signed in to change notification settings - Fork 63
better document DebugCollector internals #9484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| //! ```text | ||
| //! +------------------------+ +--------------+ +---------------+ | ||
| //! | dump device containing | | user process | | log files | | ||
| //! | kernel crash dump | +--------------+ | inside zones | | ||
| //! +------------------------+ | +---------------+ | ||
| //! | | | | ||
| //! | | process crash: | | ||
| //! | | system writes | | ||
| //! | DebugCollector | core dump to | | ||
| //! | invokes | configured | | ||
| //! | savecore(8) | directory | | ||
| //! | | | | ||
| //! | v | | ||
| //! | +--------------------------------------+ | | ||
| //! | | chosen "core" dataset | | | ||
| //! | | (ZFS dataset on internal (M.2) disk) | | | ||
| //! | +--------------------------------------+ | | ||
| //! | | | | ||
| //! | | | | ||
| //! | | | | ||
| //! | | DebugCollector | | ||
| //! | | periodically archives | | ||
| //! | | the core dumps and | | ||
| //! | | log files (copies to | | ||
| //! | | debug dataset, then | | ||
| //! | | deletes the original) | | ||
| //! | | | | ||
| //! v v v | ||
| //! +----------------------------------------------------------+ | ||
| //! | debug datasets (ZFS datasets on external (U.2) disks) |-+ | ||
| //! +----------------------------------------------------------+ |-+ | ||
| //! +----------------------------------------------------------+ | | ||
| //! +----------------------------------------------------------+ | ||
| //! ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful <3
| //! directory we find: | ||
| //! | ||
| //! * `core.[zone-name].[exe-filename].[pid].[time]`: process core dumps | ||
| //! * `unix.[0-9]+`, `bounds`: files associated with kernel crash dumps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's bounds? it's a little ambiguous IMO whether or not this is saying there's exactly one file called bounds or multiple bounds.[0-9]+es?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there is at most one file called bounds and any number of files matching the pattern unix.[0-9]+. The comment is deliberately vague about what the bounds file is because I don't know authoritatively and I don't think it's important here. (I believe savecore writes it out along with each dump it writes out and it contains the largest-numbered file so far so that the next time it runs it doesn't have to check for the existence of unix.0, unix.1, etc., but as I said I'm not positive.)
This updates the Big Theory Statement on the DebugCollector and adds documentation to a bunch of constants and types in the
DebugCollector.I'm deliberately not changing anything meaningful in this PR. I'll keep doing some cleanup in follow-up PRs.
(Staged on #9479 so I'm keeping this "draft" so I don't land it early.)