Skip to content

Windows Terminal freezes all windows when one tab receives high‑rate stdout #20719

Description

@zoharl3

Windows Terminal version

10.0.22631.6060

Windows build number

10.0.22631.6060

Other Software

No response

Steps to reproduce

  1. Open Windows Terminal (PowerShell or CMD tab).

  2. Run a program that produces continuous stdout updates.
    Example Python script (sleep reduced from 0.3 → 0.01 to emphasize the issue):

   import sys, os, time
   from pathlib import Path

   def tail_follow(path):
       last_size = 0
       last_mtime = 0
       while True:
           if not os.path.exists(path):
               os.system("cls")
               last_size = 0
               last_mtime = 0
               time.sleep(0.01)
               continue

           stat = os.stat(path)
           size = stat.st_size
           mtime = stat.st_mtime

           if size < last_size:
               os.system("cls")
               last_size = 0

           if mtime != last_mtime:
               with open(path, "rb") as f:
                   f.seek(last_size)
                   data = f.read()
                   print(data.decode("utf-8", errors="replace"), end="", flush=True)
               last_size = size
               last_mtime = mtime

           time.sleep(0.01)

   def main():
       if len(sys.argv) < 2:
           print("usage: tail.py <path>")
           sys.exit(1)
       tail_follow(sys.argv[1])

   if __name__ == "__main__":
       main()
  1. While the script is running, open a new Windows Terminal window or tab.

Expected Behavior

Other Terminal windows/tabs should remain responsive.
New windows should render normally.

Actual Behavior

  • New Terminal windows draw only a frame and then stop rendering.
  • Existing Terminal windows freeze completely.
  • The freeze persists until the high‑rate stdout process is stopped.

This does not occur in standalone cmd.exe (OpenConsole).
The issue appears specific to Windows Terminal’s renderer/UI thread.

Notes
This appears to be renderer starvation: one tab’s output load prevents the UI thread from servicing other windows.

Standalone CMD does not exhibit this behavior, suggesting the bottleneck is in Terminal’s rendering pipeline rather than OpenConsole.

Activity

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

    Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions