Page MenuHomeFreeBSD

[RFC] ktrace: log genio events on failed write
ClosedPublic

Authored by kevans on Feb 9 2024, 4:21 AM.
Tags
None
Referenced Files
F107087282: D43799.diff
Thu, Jan 9, 10:06 PM
Unknown Object (File)
Nov 30 2024, 4:58 AM
Unknown Object (File)
Nov 15 2024, 1:59 AM
Unknown Object (File)
Sep 21 2024, 1:18 AM
Unknown Object (File)
Sep 8 2024, 8:56 AM
Unknown Object (File)
Sep 8 2024, 5:00 AM
Unknown Object (File)
Sep 8 2024, 4:46 AM
Unknown Object (File)
Sep 5 2024, 6:22 PM

Details

Summary

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

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 55873
Build 52762: arc lint + arc unit

Event Timeline

kevans requested review of this revision.Feb 9 2024, 4:21 AM
kib added inline comments.
sys/kern/kern_ktrace.c
770
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.