Skip to content

Extension/Integrated Console hangs on startup before prompt #2014

Closed

Description

Issue Type: Bug

Open Visual Studio Code (the terminal window won't load after five minutes with 30 gb of RAM).

Extension version: 2019.5.0
VS Code version: Code 1.35.0 (553cfb2c2205db5f15f3ee8395bbd5cf066d357d, 2019-06-04T01:17:12.481Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz (4 x 2808)
GPU Status 2d_canvas: disabled_software
checker_imaging: disabled_off
flash_3d: disabled_software
flash_stage3d: disabled_software
flash_stage3d_baseline: disabled_software
gpu_compositing: disabled_software
multiple_raster_threads: disabled_off
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
surface_synchronization: disabled_off
video_decode: disabled_software
webgl: disabled_off
webgl2: disabled_off
Load (avg) undefined
Memory (System) 23.87GB (12.35GB free)
Process Argv
Screen Reader no
VM 0%

Activity

  1. MarkKharitonov commented on Jun 6, 2019

    @MarkKharitonov

    I second this motion. Was about to open an issue myself. The console window just shows PowerShell Integrated Console and that's it.

  2. rjmholt commented on Jun 6, 2019

    @rjmholt
    Contributor

    Thanks for opening an issue. If we can find a way to reproduce it, we can hopefully fix it.

    the terminal window won't load after five minutes with 30 gb of RAM

    This is likely not a performance issue.

    A couple of questions:

    • If you go to the Integrated Console and press Enter, does it then continue?
    • When did this last work for you? Did it stop working when VSCode (not the extension) updated? Or when the PowerShell extension updated at the end of May?
    • In Jason Dempsey (@metalmensch)'s case, does it display anything in the terminal? Do you have a PowerShell file open?
    • In MarkKharitonov's case, what operating system (and version) are you running?
    • If you try to restart the PowerShell extension session (with Ctrl+Shift+P PowerShell: Restart Current Session), what happens?
    • If you open a native powershell or pwsh terminal, does a similar problem occur?

    We're aware of a Windows bug that's been affecting recent VSCode builds in which the terminal doesn't behave properly, so that's my current suspicion.

  3. rjmholt commented on Jun 6, 2019

    @rjmholt
    Contributor

    See also: #1795 (comment)

  4. metalmensch commented on Jun 6, 2019

    @metalmensch
    Author
  5. MarkKharitonov commented on Jun 7, 2019

    @MarkKharitonov

    I would like to answer the questions:

    • If you go to the Integrated Console and press Enter, does it then continue?

    No, still stuck at PowerShell Integrated Console

    • When did this last work for you? Did it stop working when VSCode (not the extension) updated? Or when the PowerShell extension updated at the end of May?

    Sorry, but I do not know.

    • In MarkKharitonov's case, what operating system (and version) are you running?

    I have two machines. On the "good" the Powershell console opens OK., On the "bad" - it is stuck. In both cases it is Windows 10.
    Here is the info:
    "Bad" Machine
    Powershell Integrated Console hangs, pressing Enter does not help. At least not in the first N minutes, where N is sizeable (10?)
    VS Code

    Version: 1.34.0 (system setup)
    Commit: a622c65b2c713c890fcf4fbf07cf34049d5fe758
    Date: 2019-05-15T21:59:37.030Z
    Electron: 3.1.8
    Chrome: 66.0.3359.181
    Node.js: 10.2.0
    V8: 6.6.346.32
    OS: Windows_NT x64 10.0.17763
    

    Powershell extension

    Name: PowerShell
    Id: ms-vscode.powershell
    Description: Develop PowerShell scripts in Visual Studio Code!
    Version: 2019.5.0
    Publisher: Microsoft
    VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell
    

    "Good" Machine
    VS Code

    Version: 1.34.0 (system setup)
    Commit: a622c65b2c713c890fcf4fbf07cf34049d5fe758
    Date: 2019-05-15T21:59:37.030Z
    Electron: 3.1.8
    Chrome: 66.0.3359.181
    Node.js: 10.2.0
    V8: 6.6.346.32
    OS: Windows_NT x64 10.0.16299
    

    Powershell extension

    Name: PowerShell
    Id: ms-vscode.powershell
    Description: Develop PowerShell scripts in Visual Studio Code!
    Version: 2019.5.0
    Publisher: Microsoft
    VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell
    
    • If you try to restart the PowerShell extension session (with Ctrl+Shift+P PowerShell: Restart Current Session), what happens?

    Same thing - it hangs.

    • If you open a native powershell or pwsh terminal, does a similar problem occur?

    No.

  6. rjmholt commented on Jun 7, 2019

    @rjmholt
    Contributor

    Hmmm it certainly looks like the only difference between machines is the Windows version (which implies it may be the Windows bug).

    Another thing it might be worth doing is turning the logging up to Diagnostic and seeing how far you get through startup

  7. MarkKharitonov commented on Jun 7, 2019

    @MarkKharitonov

    Actually on the "bad" machine hitting many times Enter does force the console to show the prompt. So, yes - hitting multiple times Enter shows the console. But, it does not load the profile.

    I will get the logs later.

  8. rjmholt commented on Jun 7, 2019

    @rjmholt
    Contributor

    hitting multiple times Enter shows the console

    Yeah that sounds like the relevant Windows bug.

    But, it does not load the profile

    Which profile is that? The PowerShell extension looks for the profile in ~\Documents\PowerShell\Microsoft.VSCode_profile.ps1. I assume this works on the good machine?

  9. MarkKharitonov commented on Jun 7, 2019

    @MarkKharitonov

    Yes, it does not load the $PROFILE, whatever it should be in this context. Does load on the "good" machine.

    Note that once the prompt is shown explicitly loading $PROFILE works fine.

  10. rjmholt commented on Jun 7, 2019

    @rjmholt
    Contributor

    Note that once the prompt is shown explicitly loading $PROFILE works fine.

    Ohhhh, as in it loads once you press Enter?

    Yeah that's because this Windows bug just stops the startup from proceeding (it's a bug in the Windows console APIs), before it can get to the profile execution stage. It's like if you put Wait-Debugger at the start of your profile.

    The fix lies below the extension -- it's something we depend on VSCode and Windows for. From what I can tell, the fix is to run Windows update.

  11. 38 remaining items

  12. dotnetcanuck commented on Mar 31, 2020

    @dotnetcanuck

    Does anyone have a solution for this? I've got the same "Timed out waiting for session file to appear" error, and the extension reports there was an error during session initialization.

    EDIT: Looks like it works if I switch to PS 5.1. There's something it doesn't seem to like about PowerShell Core on my machine. 🤔

  13. ghost added
    Needs: Maintainer Attention
    on Mar 31, 2020
  14. jbayardo commented on Apr 1, 2020

    @jbayardo

    Having the same issue too!

  15. ghost added
    Needs: Maintainer Attention
    on Apr 1, 2020
  16. TylerLeonhardt commented on Apr 2, 2020

    @TylerLeonhardt
    Member

    For those of you on Windows PowerShell that see this issue, can you please send me your event logs for Windows PowerShell? I wonder if that has anything important... ALSO If you see the issue & you have an anti-virus, can you please check the logs of your AV for anything suspicious?

    Thanks for your patience... this has been very hard to troubleshoot without a repro on my end.

  17. oliviermasson commented on Apr 3, 2020

    @oliviermasson
  18. ghost added
    Needs: Maintainer Attention
    on Apr 3, 2020
  19. astratom commented on May 27, 2020

    @astratom

    From my side the problem has been solved by running x86 version of the language extension. x64 version always hangs. But, I also have to mention that my corporate laptop has security component (like beyondtrust privilege guard) that is upgraded very often without notification. So, I don't know if these upgrades have not also help solving this issue. HTH Le jeu. 2 avr. 2020 à 19:54, Tyler James Leonhardt [email protected] a écrit :
    …
    For those of you on Windows PowerShell that see this issue, can you please send me your event logs for Windows PowerShell? I wonder if that has anything important... ALSO If you see the issue & you have an anti-virus, can you please check the logs of your AV for anything suspicious? Thanks for your patience... this has been very hard to troubleshoot without a repro on my end. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#2014 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJCYS2D6P443SR7PXVZ5UY3RKTGONANCNFSM4HVICWCA .

    Hi,

    You're right about BeyondTrust Privilege Management having something to do with this. I could not find anything in its' logs that would point to this issue though.

    This issue went away after we upgraded to BeyondTrust Privilege Management for Windows (x64) 5.6.126.0. Previously we had 5.4.230.0 and I could reproduce the issue on a clean image with just Privilege Management 5.4.230.0, Visual Studio Code 1.45.1 and the PowerShell extension 2020.4.0 installed.

    Stopping the "Avecto Defendpoint Service" service also makes the issue go away (that's the older name for the product).

  20. ghost added
    Needs: Maintainer Attention
    on May 27, 2020
  21. rjmholt commented on Dec 3, 2020

    @rjmholt
    Contributor

    If anyone's still running into BeyondTrust/Avecto issues, we're following up on that in #3077, since there's new discussion on it. I'm going to close this issue now, so we can deduplicate discussions.

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

    Area-StartupBug: VS CodeIssue-BugOS-Windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions