Skip to content

[macOS and Linux] PSES crashes - System.IO.IOException: Too many open files #1017

Open
@mklement0

Description

@mklement0

System Details

  • Operating system name and version:
    • macOS 10.12.6
    • Ubuntu 16.0
  • VS Code version: 1.15.1
  • PowerShell extension version: 1.14.1
  • Output from $PSVersionTable (on macOS):
Name                           Value                                                                                                                                               
----                           -----                                                                                                                                               
PSVersion                      6.0.0-beta                                                                                                                                          
PSEdition                      Core                                                                                                                                                
GitCommitId                    v6.0.0-beta.6                                                                                                                                       
OS                             Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64                                      
Platform                       Unix                                                                                                                                                
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                             
PSRemotingProtocolVersion      2.3                                                                                                                                                 
SerializationVersion           1.1.0.1                                                                                                                                             
WSManStackVersion              3.0                                                                                                                                                 

From macOS:

PS> code -v
1.15.1
41abd21afdf7424c89319ee7cb0445cc6f376959
PS> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      4      1      0


PS> code --list-extensions --show-versions
Shan.code-settings-sync@2.8.3
donjayamanne.python@0.7.0
fabianlauer.vs-code-xml-format@0.1.5
florianloch.text-transform@0.1.0
idleberg.applescript@0.6.1
ms-vscode.cpptools@0.12.3
ms-vscode.csharp@1.12.1
ms-vscode.PowerShell@1.4.1
slevesque.vscode-hexdump@1.4.0
PS> $PSVersionTable

Issue Description

Things start to go wrong when the PS version cannot be determined and the version is assumed to be v5:

[WARNING] - Method "GetVersionDetails" at line 153 of C:\projects\powershelleditorservices\src\PowerShellEditorServices\Session\PowerShellVersionDetails.cs

  Failed to look up PowerShell version, defaulting to version 5.

In effect, the Editor Services don't work properly on either platform, but some aspects still work on Linux, such as F8.

On macOS, the logs show additional failures:

System.AggregateException: One or more errors occurred. (Too many open files) ---> System.IO.IOException: Too many open files
...
PowerShell Editor Services is terminating due to an unhandled exception

Note that ulimit -n (number of files that can be open simultaneously) still defaults to 256 as of macOS 10.12.6.

Attached Logs

macOs.zip

ubuntu.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions