Detects OOM-kill cascades that reach session-critical processes (ssh, gnome-keyring, session.slice) -- the mechanism behind 'my computer keeps logging out my account'. A Collector<OomKillEvent> over `journalctl -k`, built on operations-diagnostic-engine rather than a bespoke parser.
| Tier | operations |
| Role | unclassified (baselined) |
| Path | crates/operations/crash-detector |
| Edition | 2021 |
| Targets | operations-crash-detector, operations_crash_detector |
| Public items | 5 across 0 modules |
| Tests | 7 |
What it is for
Parses journalctl -k output for OOM-kill events and flags the ones that reached session-critical processes -- the mechanism behind "my computer keeps logging out my account when pushing and CI mutating" (root-caused 2026-08-10: unconfined cargo-mutants + concurrent dev-server memory use exhausted RAM+swap; the kernel OOM killer then walked into session.slice and killed ssh / gnome-keyring-daemon).
Parsing lives here as pure, fixture-tested logic (Gate 2.1); the Collector<OomKillEvent> impl in JournalctlCollector is the only part that touches a live system, per operations-diagnostic-engine's seam (Gate 0.5: reuse the existing Collector/CollectOutcome contract instead of a bespoke report type).
Capabilities
JournalctlCollector
Parses journalctl -k output for OOM-kill events and flags the ones that
| Item |
|---|
pub struct JournalctlCollector |
JournalctlCollector :: fn name(& self) -> & str |
JournalctlCollector :: fn collect(& self) -> CollectOutcome <OomKillEvent> |
OomKillEvent
Parses journalctl -k output for OOM-kill events and flags the ones that
| Item |
|---|
pub struct OomKillEvent |
fn parse_oom_events(log : & str) -> Vec <OomKillEvent> |
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
No public modules: the crate root is its whole surface.
Public surface
`crate root`
| Item | What it is |
|---|---|
pub struct OomKillEvent | — |
fn parse_oom_events(log : & str) -> Vec <OomKillEvent> | Parses journalctl -k text into OOM-kill events |
pub struct JournalctlCollector | Collects OOM-kill evidence from the live kernel log via journalctl -k --since <since> |
JournalctlCollector :: fn name(& self) -> & str | — |
JournalctlCollector :: fn collect(& self) -> CollectOutcome <OomKillEvent> | — |
No pub use re-exports: every item above is declared in this crate.
Boundary
Depends on no other workspace tier.
Shares tier operations with 40 other crates: operations-approval-workflow, operations-assessments, operations-block-imaging, operations-boot-media, operations-browser-agent-worker, operations-camera-discovery, operations-camera-liveview, operations-camera-registry, … (40 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | operations |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/operations/crash-detector |
| Vocabulary in force (lexicon) | current |
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `operations-diagnostic-engine` | operations | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
anyhow | ^1 | — | no | always |
Development. None.
Build. None.
Depended on by. Nothing in this workspace.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR SELF["operations-crash-detector"] SELF -->|runtime| n_operations_diagnostic_engine["operations-diagnostic-engine"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| bin | operations-crash-detector | `src/main.rs` |
| lib | operations_crash_detector | `src/lib.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
No workspace crate depends on this one.
Verification
| Kind | Count |
|---|---|
| Unit tests | 7 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 3 | 0 | 0 |
What the tests establish, by name:
attributes_invoker_and_cgroup_to_each_kill—src/lib.rscarries_cgroup_forward_across_a_batched_kill_run—src/lib.rscollector_trait_degrades_explicitly_when_unavailable—src/lib.rsempty_log_yields_no_events—src/lib.rsflags_session_slice_cgroup_as_session_affecting—src/lib.rsnon_oom_lines_are_ignored—src/lib.rsparses_every_kill_line—src/lib.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 2 | 5 |
Public modules with a //! block | 0 | 0 |
pie showData
title Public items with rustdoc
"Documented" : 2
"No rustdoc detected" : 3
Metrics
| Metric | Value |
|---|---|
| Rust source files | 2 |
| Source lines | 340 |
| Code lines | 269 |
| Public API items | 5 |
| Public modules | 0 |
| Tests | 7 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 2 |
| Workspace reverse dependencies | 0 |
pie showData
title Public API by kind
"function" : 1
"method" : 2
"struct" : 2
pie showData
title Rust source composition
"Code" : 269
"Blank or comment" : 71
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.