Skip to content

Large console output can cause stdio-expose to hang and not print everything #26

Closed

Description

@GDYendell

If the application wrapped by stdio-expose creates a large amount of output, it gets stuck part way through and becomes unresponsive.

Steps To Reproduce

Steps to reproduce the behavior:

Run the following script under stdio-expose --stdin 'python reproduce_stdio_hang.py'

from rich.traceback import install as install_rich_traceback

install_rich_traceback(show_locals=True)


def deeply_nested(depth: int, data: dict) -> None:
    if depth == 0:
        raise ValueError(f"Reached the bottom with data: {data}")
    deeply_nested(depth - 1, {**data, f"key_{depth}": "x" * 100})


def outer():
    local_var_a = "a" * 500
    local_var_b = list(range(200))
    local_var_c = {f"key_{i}": f"value_{i}" * 10 for i in range(50)}
    deeply_nested(
        50, {"initial": local_var_a, "list": local_var_b, "dict": local_var_c}
    )


outer()

Acceptance Criteria

  • The full stack traces are printed

Activity

  1. added
    bug
    on Mar 16, 2026
  2. GDYendell commented on Mar 16, 2026

    @GDYendell
    Author
  3. gilesknap commented on Mar 20, 2026

    @gilesknap
    Member

    @hyperrealist I believe you are looking at this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions