Page MenuHomeFreeBSD

[RFC] ktrace: log genio events on failed write

Authored by kevans on Feb 9 2024, 4:21 AM.
Referenced Files
Unknown Object (File)
Tue, Jul 9, 9:13 PM
Unknown Object (File)
Thu, Jul 4, 12:36 PM
Unknown Object (File)
Thu, Jul 4, 7:24 AM
Unknown Object (File)
Mon, Jul 1, 4:33 PM
Unknown Object (File)
Mon, Jul 1, 4:33 PM
Unknown Object (File)
Mon, Jul 1, 4:21 PM
Unknown Object (File)
Sat, Jun 22, 11:37 AM
Unknown Object (File)
May 31 2024, 11:27 AM



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.

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

kevans requested review of this revision.Feb 9 2024, 4:21 AM
kib added inline comments.
This revision was not accepted when it landed; it landed in state Needs Review.Mar 5 2024, 5:46 AM
This revision was automatically updated to reflect the committed changes.