Skip to content

Terminal output buffers can grow unbounded causing memory leaks #10666

@hannesrudolph

Description

@hannesrudolph

Problem

Terminal process implementations retain command output buffers for too long. When commands produce large output, these buffers can grow unbounded and keep large strings in memory, leading to steadily increasing memory usage and causing grey screens.

Expected behavior

After a command completes, large output buffers should be trimmed and/or cleared so finished commands do not keep large output in memory.

Impact

Running commands with large output can cause significant memory growth over time (potentially a leak-like behavior).

Repro Steps

Run this commend in code mode

This is a test. Use execute_command with `seq 1 2000000`, wait for it to complete, then repeat this 40 more times. Do not attempt to do this all in one go. execute_command needs to be called 41 times before we are considered complete.

Related

Originated from PR #7666.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions