Skip to content

[Bug]: Stdin pipe deadlocks when input exceeds 65536 bytes (OS Pipe Buffer Limit?) #477

Closed

Description

@takanoriyanagitani

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

  1. pull busybox(optional)
  2. Run the following two commands:
# CASE 1: 65536 bytes (Fits exactly in pipe buffer) -> SUCCESS
# The tool reads the buffer, hits EOF, and exits.
dd if=/dev/zero bs=65536 count=1 | container run --rm -i busybox wc -c
# Output: 65536

# CASE 2: 65537 bytes (Exceeds pipe buffer by 1 byte) -> HANGS
# The writer fills the pipe and blocks on the last byte. The reader never drains it.
dd if=/dev/zero bs=65537 count=1 | container run --rm -i busybox wc -c
# (Hangs indefinitely)

Current behavior

  • < 64KiB: The command completes successfully.

  • > 64KiB: The command hangs forever. The container inside the VM likely never receives the full payload or the close signal.

Expected behavior

The tool should continuously stream data from stdin to the VM regardless of size, handling backpressure correctly without deadlocking the host pipe.

Environment

- OS: 26.2(25C56)
- Xcode: 26.2
- Container: 0.7.1 (420be74)

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. dcantah commented on Jan 15, 2026

    @dcantah
    Contributor

    Great find, let me dig into this

  2. dcantah commented on Jan 16, 2026

    @dcantah
    Contributor
  3. transferred this issue fromapple/containeron Jan 16, 2026
  4. added theissue type on Jan 16, 2026
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions