diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-01 23:13:11 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-01 23:13:11 +0300 |
| commit | bd544509846fb7e1882aa466d24aea937c2b2804 (patch) | |
| tree | 5e9a31a7cc6a7256b52ce4e842d9bb72f2baed80 /docs | |
| parent | 8251307ac3187b346ed12e9a54d9bf6d7cba7e53 (diff) | |
fix(classify): mq_timedsend returns status, not bytes — make ret UNCLASSIFIED
mq_timedsend(2)/mq_send(3) return 0 on success or -1 on error; the
payload size msg_len is an INPUT argument, never the return value. It was
wrongly listed in retClassifications as WriteClassified, which made
bytesFromRet attribute its 0 return as "bytes written" (the stats engine
WriteClassified path). Remove it so its return stays UNCLASSIFIED,
consistent with its POSIX mq sibling mq_timedreceive (which legitimately
stays ReadClassified because it returns the received byte count). This is
the exact same defect just fixed for SysV msgsnd (5057bd9) and mirrors
the msgrcv/msgsnd asymmetry.
Regenerated tracepoints/docs accordingly and updated the pre-existing
classify unit test and the TestPosixMqBasic integration assertion: the
mq_timedsend send no longer asserts a write byte count (now expects 0),
while mq_timedreceive keeps its received-byte-count assertion. Verified:
mage generate idempotent, mage build OK, internal/generate tests pass.
TestPosixMqBasic skips in this sandbox (mq_open: permission denied) but
compiles with the corrected assertions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/syscall-tracing-plan.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/syscall-tracing-plan.md b/docs/syscall-tracing-plan.md index 2225d48..9bb94e1 100644 --- a/docs/syscall-tracing-plan.md +++ b/docs/syscall-tracing-plan.md @@ -94,7 +94,7 @@ Payload bytes classified by return value: - ReadClassified: `fgetxattr`, `flistxattr`, `getdents`, `getdents64`, `getrandom`, `getxattr`, `getxattrat`, `lgetxattr`, `listxattr`, `listxattrat`, `llistxattr`, `mq_timedreceive`, `msgrcv`, `pread64`, `preadv`, `preadv2`, `process_vm_readv`, `read`, `readlink`, `readlinkat`, `readv`, `recvfrom`, `recvmsg`, `syslog` - TransferClassified: `copy_file_range`, `sendfile64`, `splice`, `tee`, `vmsplice` -- WriteClassified: `mq_timedsend`, `process_vm_writev`, `pwrite64`, `pwritev`, `pwritev2`, `sendmsg`, `sendto`, `write`, `writev` +- WriteClassified: `process_vm_writev`, `pwrite64`, `pwritev`, `pwritev2`, `sendmsg`, `sendto`, `write`, `writev` All other traced syscalls are treated as non-bytes for throughput accounting. Memory extent is tracked separately via address-space metrics. |
