Skip to content

Conversation

@davepacheco
Copy link
Collaborator

@davepacheco davepacheco commented Dec 5, 2025

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.)

Base automatically changed from dap/dump-setup-to-debug-collector to main December 6, 2025 07:09
@davepacheco davepacheco marked this pull request as ready for review December 8, 2025 16:39
Comment on lines +48 to +81
//! ```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) |-+
//! +----------------------------------------------------------+ |-+
//! +----------------------------------------------------------+ |
//! +----------------------------------------------------------+
//! ```
Copy link
Member

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
Copy link
Member

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?

Copy link
Collaborator Author

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants