HomeFreeBSD

ktrace: log genio events on failed write

Description

ktrace: log genio events on failed write

Visibility into the contents of the buffer when a write(2) has failed
can be immensely useful in debugging IPC issues -- pushing this to
discuss the idea, or maybe an alternative where we can set a flag like
KTRFAC_ERRIO to enable it.

When a genio event is potentially raised after an error, currently we'll
just free the uio and return. However, such data can be useful when
debugging communication between processes to, e.g., understand what the
remote side should have grabbed before closing a pipe. Tap out the
entire buffer on failure rather than simply discarding it.

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D43799

Details

Provenance
kevansAuthored on Mar 5 2024, 4:14 AM
Reviewer
kib
Differential Revision
D43799: [RFC] ktrace: log genio events on failed write
Parents
rG02c57f7b4877: kdump: decode pollfd struct arrays coming from poll(2)
Branches
Unknown
Tags
Unknown