Skip to content

Buffering issues #13

Closed
Closed

Description

@gilesknap

The latest version of stido-socket is still showing buffering issues.

See slack
https://diamondlightsource.slack.com/archives/CSWSUAXN0/p1754992000021919

From the description, potentially this is not a throughput issue but its just that the code is buffering before it sends to main process stdout. We don't see this when we have an interactive session via console command but perhaps

Activity

  1. added
    bug
    on Aug 13, 2025
  2. gilesknap commented on Sep 23, 2026

    @gilesknap
    MemberAuthor

    This looks fixed by changes made after the issue was filed:

    • 84a8c04 (Sep 2025, released in 1.3.1) wraps the child command in stdbuf -oL -eL in expose.py. That forces line buffering in the child, which is the "buffered before it reaches the main process stdout" symptom described here, and explains why an interactive console session (a TTY, so already line buffered) didn't show it.
    • 4f03bce (Jan 2026, 1.4.0) makes sure stdout is flushed correctly on exit.
    • cef7167 (Jun 2026, 1.4.1) fixes stdout going non-blocking after connect_read_pipe(). That could crash do_stdout and stall output on large bursts, and a PTY regression test was added.

    Caveat: stdbuf only affects programs that use libc stdio defaults. It does nothing for a child that sets its own buffering, or for a statically linked one. Can someone who saw the original problem (Slack thread above) confirm it's gone with stdio-socket >= 1.4.1? If so, this can be closed.

    Triage comment drafted by Claude Code.

  3. gilesknap commented on Sep 25, 2026

    @gilesknap
    MemberAuthor

    Fixed in 1.3.1 / 1.4.0; ioc-template requires stdio-socket>=1.4.0.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions