Skip to content

Process terminated bue to StackOverFlow - process terminated with code 3221225725 #1613

Closed
PowerShell/PowerShellEditorServices
#795

Description

@Amir-Mir

Issue Type: Bug

The PowerShell process keep getting terminated. The keeps getting terminated and this goes on in loop.

Extension version: 1.9.0
VS Code version: Code 1.29.0 (5f24c93878bd4bc645a4a17c620e2487b11005f9, 2018-11-12T07:47:15.448Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8 x 3592)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.69GB (14.92GB free)
Process Argv
Screen Reader no
VM 0%

Activity

  1. rjmholt commented on Nov 14, 2018

    @rjmholt
    Contributor

    Hi @BadSqlPro, thanks for opening an issue.

    Can you please follow through our troubleshooting docs to attach your PowerShell extension logs.

    We will need more information about what happened and a way to reproduce the issue in order to fix it.

  2. Amir-Mir commented on Nov 14, 2018

    @Amir-Mir
    Author

    Hello Rob Holt (@rjmholt) , I followed the instructions and turned on the Verbose logging for "powershell.developer.editorServicesLogLevel": "Verbose". I am attaching the logs here, Please let me know if the logs have the relevant info. I also some screenshots.
    Pleas let me know if I can provide further info.

    EditorServices.log
    Start-EditorServices-EditorServices.log
    vscode-powershell.log

    image

  3. rjmholt commented on Nov 14, 2018

    @rjmholt
    Contributor

    Thanks for that @BadSqlPro!

    So it looks like RecursivelyEnumerateFiles has a problem here. There's a big list of errors like this one:

    2018-11-14 12:32:13.221 [ERROR] C:\PowerShellEditorServices\src\PowerShellEditorServices\Workspace\Workspace.cs: In method 'RecursivelyEnumerateFiles', line 270: Could not enumerate files in the path 'c:\$Recycle.Bin\S-1-5-18' due to the path not being accessible
        System.UnauthorizedAccessException: Access to the path 'c:\$Recycle.Bin\S-1-5-18' is denied.
           at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
           at System.IO.FileSystemEnumerableIterator`1.CommonInit()
           at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
           at System.IO.Directory.GetDirectories(String path)
           at Microsoft.PowerShell.EditorServices.Workspace.RecursivelyEnumerateFiles(String folderPath)
    

    (That's the first, but it's identical to the others)

    However it looks like that didn't crash anything (but we should handle/log it better).

    EditorServices.log's last entry is this:

    2018-11-14 12:33:06.025 [VERBOSE] C:\PowerShellEditorServices\src\PowerShellEditorServices\Workspace\Workspace.cs: In method 'GetFile', line 98:
        Opened file on disk: c:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\WindowsUpdate\WindowsUpdate.psd1
    

    So there's not much indication of what caused the crash there.

    @BadSqlPro how did you determine that the cause of the crash was a stack overflow. If you've got a stack trace or any other error messages, can you share them? Otherwise, we might need to crank up logging to Diagnostic and come up with some repro steps.

  4. Amir-Mir commented on Nov 15, 2018

    @Amir-Mir
    Author
  5. rjmholt commented on Nov 15, 2018

    @rjmholt
    Contributor

    Right, I was looking at the screenshot, but it doesn't say stack overflow -- so I was wondering if there's another message?

    Anyway, I think we'll need diagnostic logs to work out what's happening here.

  6. Amir-Mir commented on Nov 16, 2018

    @Amir-Mir
    Author

    Well, to make matter even worst, my VS Code just wont work at all i.e. with the PowerShell extension. I even uninstalled VS Code and reinstalled it and was hoping that this issue would go away. But when I reinstalled VSCode, I saw all my previous extensions there, looks like they never got uninstalled. If it would help, I have Visual Studio 2015 and 2017 installed on my machine, hope that is not messing up the VS Code. I am also pasting a screenshot of the StackOverFlowException error that I see now, every single time I try to run a piece of PowerShell code. Please let me know how should I proceed.

    image

    And then I get these errors on the lower left corner of the window in VS Code.
    image

    And when I restart the session by clicking 'Yes' I get this error

    image

  7. rjmholt commented on Nov 16, 2018

    @rjmholt
    Contributor

    Visual Studio installations wouldn't (to my knowledge) interfere with anything here either.

    Reinstalling VSCode probably wouldn't touch the extensions. For that you need to close and uninstall VSCode, and then delete the ~/.vscode folder (rm -fo -r ~/.vscode will do it on Windows, rm -rf ~/.vscode on other platforms). Then reinstall VSCode.

    We still need more information on reproducing the StackOverflowExtension you're seeing. So please set logging to Diagnostic, start the extension and post the logs here once it's crashed.

    Another thing to try is finding the ~/.vscode/extensions/ms-vscode.powershell-1.9.0/modules/PowerShellEditorServices/Start-EditorServices.ps1 file, putting a Wait-Debugger in it and stepping through it one line at a time until you hit the crash.

  8. rjmholt commented on Nov 16, 2018

    @rjmholt
    Contributor

    My current theory is that there's maybe a cyclic symlink on your system that we try and traverse infinitely and eventually crash on. But I have no idea where we might be doing that.

  9. Amir-Mir commented on Nov 18, 2018

    @Amir-Mir
    Author
  10. rjmholt commented on Nov 18, 2018

    @rjmholt
    Contributor

    Try Diagnostic logging first and just attach the logs on GitHub (attaching by email won't work unfortunately).

    I don't think the Wait-Debugger option will work actually, since this crash seems to be happening after startup.

    So for now, we just need to work out where the crash might be occurring.

  11. MatthewHamous commented on Nov 19, 2018

    @MatthewHamous

    Also running into this issue, see below logs. Identical problems, but I'm not having any issue with the language client not being ready. I've had this occur on my native win10 installation as well as through an RDP connection to a windows server 2012r2 installation.

    Win10 info:
    Version 10.0.17134 Build 17134
    OS Name Microsoft Windows 10 Pro
    Processor Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz, 2904 Mhz, 2 Core(s), 4 Logical Processor(s)
    System Type x64-based PC
    BIOS Version/Date LENOVO N1MET49W (1.34 ), 7/2/2018

    VS Code info:
    Version: 1.29.0 (user setup)
    Commit: 5f24c93878bd4bc645a4a17c620e2487b11005f9
    Date: 2018-11-12T07:47:15.448Z
    Electron: 2.0.12
    Chrome: 61.0.3163.100
    Node.js: 8.9.3
    V8: 6.1.534.41
    Architecture: x64

    EditorServices.log
    vscode-powershell.log

  12. rjmholt commented on Nov 19, 2018

    @rjmholt
    Contributor

    Looks like we need some better recursion checking here.

    We might have to build a HashSet every time and ignore files that are already in it. Or, if it's a symlink problem, we should just ignore symlinks. Or just set a finite recursion depth of, perhaps, 127 or 255 or something.

  13. Amir-Mir commented on Nov 28, 2018

    @Amir-Mir
    Author
  14. rjmholt commented on Nov 28, 2018

    @rjmholt
    Contributor

    The issue was closed automatically since I merged a PR that we think will fix it. We're hoping to release next week, at which point we can follow up to see if the issue is still occurring or not. If it is, we can reopen this issue.

  15. Amir-Mir commented on Nov 28, 2018

    @Amir-Mir
    Author
  16. Amir-Mir commented on Nov 29, 2018

    @Amir-Mir
    Author
  17. TylerLeonhardt commented on Nov 29, 2018

    @TylerLeonhardt
    Member

    Not yet. We're looking to do it on Monday.

  18. Amir-Mir commented on Nov 29, 2018

    @Amir-Mir
    Author
  19. Firmbyte commented on Apr 3, 2020

    @Firmbyte

    I'm getting the same problem with version 1.43.2. Constantly crashes with error code 3221225725

    Problem signature:
    Problem Event Name: CLR20r3
    Problem Signature 01: powershell.exe
    Problem Signature 02: 10.0.14409.1005
    Problem Signature 03: 584a185c
    Problem Signature 04: System.Management.Automation
    Problem Signature 05: 10.0.14409.1018
    Problem Signature 06: 5bac3bc0
    Problem Signature 07: 7aae
    Problem Signature 08: 0
    Problem Signature 09: System.StackOverflowException
    OS Version: 6.3.9600.2.0.0.272.7
    Locale ID: 1033
    Additional Information 1: d34e
    Additional Information 2: d34e763b2334d493da43dffdedbbc013
    Additional Information 3: 61b9
    Additional Information 4: 61b9b0a0f4cfa4e08cfb59e255b305e7

  20. ghost added
    Needs: Maintainer Attention
    on Apr 3, 2020
  21. corbob commented on Apr 3, 2020

    @corbob
    Contributor

    Firmbyte could you open a new issue for this? This one has been closed for over a year and a half, the extension and underlying LSP has undergone significant changes in that time.

  22. removed
    Needs: Maintainer Attention
    on Apr 3, 2020
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions