Skip to content

Restore failing with "Too many open files in system" inside docker #8571

@dsplaisted

Description

@dsplaisted

One of our tests in the dotnet/sdk repo (GivenThatWeWantToPublishAWebApp.It_publishes_as_framework_dependent_by_default) is failing in CI for the Linux-portable legs, which run inside docker. Restore is failing with the error "Too many open files in system".

The project which is being restored looks like this:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Folder Include="wwwroot\" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.9" />
  </ItemGroup>

</Project>

Here is a run where it is failing: https://dev.azure.com/dnceng/public/_build/results?buildId=348310&view=ms.vss-test-web.build-test-results-tab&runId=10462046&resultId=100023&paneView=debug

Here's the output for the failure:

/home/vsts/work/1/s/artifacts/bin/redist/Release/dotnet-with-previous-runtimes/dotnet msbuild /t:restore /home/vsts/work/1/s/artifacts/tmp/Release/dotnetSdkTests/It_publishes_---43300696/web.csproj -p:Configuration=Release
Microsoft (R) Build Engine version 16.3.0-preview-19426-01+faf5e5d75 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetmyget.blob.core.windows.net/artifacts/nuget-build/nuget/v3/flatcontainer/microsoft.extensions.localization/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetmyget.blob.core.windows.net/artifacts/nuget-build/nuget/v3/flatcontainer/microsoft.extensions.localization/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnet.myget.org/F/templating/api/v3/flatcontainer/microsoft.extensions.localization/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnet.myget.org/F/templating/api/v3/flatcontainer/microsoft.extensions.localization/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/dotnet-toolset/flatcontainer/microsoft.extensions.localization/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/dotnet-toolset/flatcontainer/microsoft.extensions.localization/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-extensions/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-extensions/flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.extensions.localization.abstractions/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.extensions.logging.debug/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.extensions.logging.debug/index.json'.
  Too many open files in system
  Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore/index.json'.
  Too many open files
/home/vsts/work/1/s/artifacts/bin/redist/Release/dotnet-with-previous-runtimes/sdk/3.0.100-rc2-014208/NuGet.targets(123,5): error : Failed to retrieve information about 'Microsoft.Extensions.Localization' from remote source 'https://dotnetmyget.blob.core.windows.net/artifacts/nuget-build/nuget/v3/flatcontainer/microsoft.extensions.localization/index.json'. [/home/vsts/work/1/s/artifacts/tmp/Release/dotnetSdkTests/It_publishes_---43300696/web.csproj]
/home/vsts/work/1/s/artifacts/bin/redist/Release/dotnet-with-previous-runtimes/sdk/3.0.100-rc2-014208/NuGet.targets(123,5): error :   Too many open files in system [/home/vsts/work/1/s/artifacts/tmp/Release/dotnetSdkTests/It_publishes_---43300696/web.csproj]
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/flatcontainer/microsoft.extensions.logging.debug/index.json'.
  Bad value for ai_flags
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/flatcontainer/microsoft.extensions.logging.debug/index.json'.
  Bad value for ai_flags
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/flatcontainer/microsoft.extensions.logging.debug/index.json'.
  Bad value for ai_flags
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/dotnet-toolset/flatcontainer/microsoft.extensions.options.configurationextensions/index.json'.
  Name or service not known
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/dotnet-toolset/flatcontainer/microsoft.extensions.options.configurationextensions/index.json'.
  Name or service not known
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetmyget.blob.core.windows.net/artifacts/msbuild/nuget/v3/flatcontainer/microsoft.extensions.localization/index.json'.
  Bad value for ai_flags
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetmyget.blob.core.windows.net/artifacts/msbuild/nuget/v3/flatcontainer/microsoft.extensions.localization/index.json'.
  Bad value for ai_flags
  Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.extensions.localization/index.json'.
  Bad value for ai_flags
  Retrying 'FindPackagesByIdAsync' for source 'https://api.nuget.org/v3-flatcontainer/microsoft.extensions.localization/index.json'.
  Bad value for ai_flags
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-extensions/flatcontainer/microsoft.extensions.localization/index.json'.
  Bad value for ai_flags
  Retrying 'FindPackagesByIdAsync' for source 'https://dotnetfeed.blob.core.windows.net/aspnet-extensions/flatcontainer/microsoft.extensions.localization/index.json'.
  Bad value for ai_flags

Here is a zip with the test run logs: Microsoft.NET.Publish.Tests.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions