Skip to content

Protobuf TCP access logs discard short-write progress #1830

Closed

Description

@FlorentinDUBOIS

The protobuf TCP arm calls TcpStream::write and maps any successful byte count to success. A stream write may accept a prefix. The adjacent ASCII TCP path explicitly uses write_all for this reason.

Evidence: source-confirmed; runtime unverified. UNVERIFIED at runtime. A focused injectable short-writer test should accept only a prefix, emit two protobuf records, and require complete decoding or a surfaced error.

No wrapper retries the protobuf remainder, and log_access returns success after discarding the count. A real socket short write was not induced, so occurrence frequency remains unmeasured.

Acceptance criteria: Retain partial-write progress or return an error instead of accepting a truncated record. Add an injectable short-writer test and verify framing across consecutive protobuf records.

Source checked at bd19a78e2831fa9b3bc099eff96359f1bd457958 on 2026-10-03:

Runtime evidence, where stated, was collected on 8ed38435c6e80dc374de421116d8b145f1e5ce6a; the reviewed mechanisms remain unchanged at the source revision above. Audit regression tests are prepared locally and are not yet published on main.

Activity

  1. FlorentinDUBOIS commented on Oct 3, 2026

    @FlorentinDUBOIS
    CollaboratorAuthor

    Reproduced independently and in the combined draft #1843 on the frozen bd19a78e2831fa9b3bc099eff96359f1bd457958 base.

    The real TCP writer returns Ok twice after short writes, but the receiver captures only 747069 of 2097376 bytes and protobuf decoding ends in buffer underflow. The command-library run is exit 101 with 246 passed/1 failed.

    PR #1835 remains open at head 1e7abcae13de147555ab81584dde95b16d8511a4; it is outside the frozen base and was not validated by this investigation. The draft contains no product fix.

  2. added a commit that references this issue on Oct 4, 2026
    1a1677b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions