Skip to content

Connection to terminal's pty host process is becoming unresponsive #130320

Closed

Description

Issue Type: Bug

After updating to latest VSCode stable (1.59) I started encountering an error when running tasks (The connection to the terminal's pty host process is unresponsive, the terminals may stop working.). This used to work fine on 1.58.2 and I confirmed that it is broken on latest insider build too (1.60.0)

I have a bunch of VSCode tasks for 'orchestrating' local docker setup, so I can run some commands to run builds and generate TypeScript clients directly from the UI. When I run tasks without any "dependsOn" tasks they run fine. If one task depends on single other task, it also runs fine. I have problems when single task have multiple entries in "dependsOn" section - it usually works fine for the first time after I open VSCode but then the issue happens and I have to fully restart VSCode to make it work again.

VS Code version: Code - Insiders 1.60.0-insider (49af1cb, 2021-08-06T06:41:50.275Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 9 3900X 12-Core Processor (24 x 3800)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.93GB (18.13GB free)
Process Argv --crash-reporter-id 99c6e3ee-c17a-4f3a-a118-c9cbac23e0db
Screen Reader no
VM 0%
Extensions (1)
Extension Author (truncated) Version
csharp ms- 1.23.14
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30291494
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30291487
pythontb:30258533
pythonvspyt551:30291412
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
pythonvsuse255:30319630
vscod805:30301674
pythonvspyt200:30323110
vsccppwt:30312692
pythonvssor306:30340298
bridge0708:30335490
pygetstartedt2:30348854
dockerwalkthru:30348713

Tasks hierarchy
{
      "label": "[Debug] Create base image for Api container",
      "command": "powershell",
      "args": [
        "docker",
        "build",
        "--rm",
        "-f",
        "${workspaceFolder}/BaseImage.Debug.Dockerfile",
        "-t",
        "baseimage-api-debug:latest",
        "."
      ]
    },
    {
      "label": "[Debug] Create image for Api.Dockerfile",
      "command": "powershell",
      "args": [
        "docker",
        "build",
        "--rm",
        "-f",
        "${workspaceFolder}/Api.Dockerfile",
        "-t",
        "backend-core-debug:latest",
        "."
      ],
      "problemMatcher": {
        "base": "$msCompile",
        "fileLocation": [
          "relative",
          "${workspaceRoot}"
        ]
      },
      "dependsOn": [
        "[Debug] Create base image for Api container"
      ]
    },
    {
      "label": "[Debug] Create image for Hangfire.Server.Dockerfile",
      "command": "powershell",
      "args": [
        "docker",
        "build",
        "--rm",
        "-f",
        "${workspaceFolder}/Hangfire.Server.Dockerfile",
        "-t",
        "hangfire-server-debug:latest",
        "."
      ],
      "problemMatcher": {
        "base": "$msCompile",
        "fileLocation": [
          "relative",
          "${workspaceRoot}"
        ]
      },
      "dependsOn": [
        "[Debug] Create base image for Api container"
      ]
    },
    {
      "label": "[Debug] Create service for docker-compose.dev.yml",
      "command": "powershell",
      "args": [
        "docker-compose",
        "-f",
        "${workspaceFolder}/docker-compose.dev.yml",
        "up",
        "-d",
        "--build",
        "--force-recreate",
        "--renew-anon-volumes"
      ],
      "problemMatcher": "$msCompile",
      "dependsOn": [
        "[Debug] Create image for Api.Dockerfile", 
        "[Debug] Create image for Hangfire.Server.Dockerfile"
      ]
    },
    {
      "label": "[TS] generate libraries",
      "type": "shell",
      "command": "\"${workspaceRoot}/../_scripts/wait-for-it-http.ps1\" && nswag.cmd run || docker logs backend-core_api_1",
      "problemMatcher": "$msCompile",
      "options": {
        "cwd": "${workspaceRoot}/../tt-ts-core"
      },
      "dependsOn": [
        "[Debug] Create service for docker-compose.dev.yml"
      ]
    }

Activity

  1. JBaczuk commented on Sep 9, 2021

    @JBaczuk

    Every time I wake my mac up from sleep (since the latest update to 1.59.1) I get this too:

    image

    A lot of times all the terminal processes are still running too, so I have to open Activity Monitor to force close them.

  2. xianghongai commented on Sep 10, 2021

    @xianghongai

    pty

    "terminal.integrated.windowsEnableConpty": false
    

    restart vs code ...

  3. xianghongai commented on Sep 10, 2021

    @xianghongai

    Duplicate of #117956, #118606

  4. added
    bug
    terminal
    on Sep 10, 2021
  5. added this to the Backlog milestone on Sep 10, 2021
  6. Tyriar commented on Oct 19, 2021

    @Tyriar
    Contributor

    xianghongai that issue should be fixed already.

  7. Airmail50 commented on May 20, 2022

    @Airmail50

    I got this earlier all the time and then I deleted everything and now I get it when I try to download python extension back. Tried older versions of both python and vscode and vscode insiders but cant find a fix.

  8. lorand-horvath commented on Jun 5, 2022

    @lorand-horvath

    I confirm this error "The connection to the terminal's pty host process is unresponsive, the terminals may stop working." since I've updated my Windows 7 installation to latest version.

    I used to have a very old Windows 7 x64 from 2014 without any updates installed - all versions of VSCode up to 1.67 were running with absolutely no problems related to the terminal. Then, after I updated Windows 7 to latest available as of June 2022, the same VSCode I had installed started to throw this error, with the terminal (Command Prompt / CMD) disconnecting frequently (perhaps every 10-20 minutes or so).

    I've even disabled the ConPTY to fall back to Winpty, but the exact same issue occurs, it doesn't help at all.

    I hope this report helps the devs in finding out the underlying cause of the error and perhaps a fix....

  9. lorand-horvath commented on Jun 6, 2022

    @lorand-horvath

    Megan Rogge (@meganrogge) I'm trying to find a solution to this annoying issue. Can you point me in the right direction, please?

  10. lorand-horvath commented on Jun 10, 2022

    @lorand-horvath

    Megan Rogge (@meganrogge) I have the exact same issue with the latest VSCode 1.68. Is there something I can tryor do? Could you point me in the right direction so we can solve this?

  11. Tyriar commented on Jun 10, 2022

    @Tyriar
    Contributor
  12. 80 remaining items

  13. Nevrai commented on Jun 22, 2023

    @Nevrai

    I've closed this out with the following changes:

    I also spotted a few other issues with slow pty hosts which I'll look into if time allows this release: #185254, #185256, #185257

    Note that this is actioning the most recent issue, not longer standing problems. This issue has been a bit of a dumping ground for all the problems so it's probably best to hit the reset button and create a new issue if there are remaining issues after all the changes that have gone in recently.

    Thank you. Will the fixes be implemented in the near future?

  14. gjsjohnmurray commented on Jun 22, 2023

    @gjsjohnmurray
    Contributor

    @DeleteMetaInf please see above at #130320 (comment)

  15. astroganga commented on Jun 26, 2023

    @astroganga

    Same issue here. On three different Windows 10 systems I get the error message on 1.79.1 whenever I start the editor.
    Downgrading to version 1.78.2 solves the problem.

    I solved it with your downgrade method, thank you!

    I am on Red Hat Linux Enterprise. Same issue on 1.79.2. I solved with downgrade method (1.78.2)

  16. yanabcd commented on Jun 26, 2023

    @yanabcd

    I also have this problem,it 's so hard for me.I'dont kown why.extensive or use python programm?

  17. aiday-mar commented on Jun 27, 2023

    @aiday-mar
    Collaborator

    Hey! Sorry I unpinned the issue by accident

  18. laccd-minassn commented on Jun 28, 2023

    @laccd-minassn

    Would like to add that I was having this problem with v 1.79.2 on Fedora Linux with Gnome desktop. I installed the insiders edition v1.80.0 and I no longer have this issue for what it's worth.

    I would get "The connection to the terminal's pty host process is unresponsive" and after about 2 minutes, the terminal would finally show up. Comes up instantly in 1.80.0

  19. AnrDaemon commented on Jun 29, 2023

    @AnrDaemon

    "The connection to the terminal's pty host process is unresponsive"

    This message comes up on 1.79.2 startup but disappears after a short while.

  20. exosomal commented on Jul 1, 2023

    @exosomal

    Why is this closed, the problem still exists.

  21. laccd-minassn commented on Jul 2, 2023

    @laccd-minassn

    It's fixed in 1.80+ so I guess there's no reason to keep it open.

  22. Tyriar commented on Jul 3, 2023

    @Tyriar
    Contributor

    Sorry about the hassle all, this is fixed in v1.80.0 which we're targeting to release Thursday the 6th ~11am PST

  23. locked as resolved and limited conversation to collaborators on Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugconfirmation-pendinginsiders-releasedon-testplanterminal-process

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions