Skip to content

Using Find References on Linux causes Editor Services to crash with "too many open files" #612

Closed
@daviwil

Description

@daviwil

Seems we're hitting OS limits for file handles while walking the project's folder structure.

Relevant stack trace:

   System.AggregateException: One or more errors occurred. (Too many open files) ---> System.IO.IOException: Too many open files
       at System.IO.UnixFileSystem.FileSystemEnumerable`1.OpenDirectory(String fullPath)
       at System.IO.UnixFileSystem.FileSystemEnumerable`1.Enumerate()
       at System.IO.UnixFileSystem.FileSystemEnumerable`1..ctor(String userPath, String searchPattern, SearchOption searchOption, SearchTarget searchTarget, Func`3 translateResult)
       at System.IO.UnixFileSystem.EnumeratePaths(String path, String searchPattern, SearchOption searchOption, SearchTarget searchTarget)
       at System.IO.Directory.EnumerateFileSystemNames(String path, String searchPattern, SearchOption searchOption, Boolean includeFiles, Boolean includeDirs)
       at System.IO.Directory.EnumerateFiles(String path, String searchPattern)
       at Microsoft.PowerShell.EditorServices.Workspace.RecursivelyEnumerateFiles(String folderPath)
       at Microsoft.PowerShell.EditorServices.Workspace.RecursivelyEnumerateFiles(String folderPath)
       at Microsoft.PowerShell.EditorServices.Workspace.RecursivelyEnumerateFiles(String folderPath)
       at Microsoft.PowerShell.EditorServices.Workspace.RecursivelyEnumerateFiles(String folderPath)
       at Microsoft.PowerShell.EditorServices.Workspace.RecursivelyEnumerateFiles(String folderPath)
       at Microsoft.PowerShell.EditorServices.Workspace.RecursivelyEnumerateFiles(String folderPath)
       at Microsoft.PowerShell.EditorServices.Workspace.RecursivelyEnumerateFiles(String folderPath)
       at Microsoft.PowerShell.EditorServices.LanguageService.<FindReferencesOfSymbol>d__18.MoveNext()

Related issues:

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions