Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.InvalidOperationException : Could not parse '/sys/fs/cgroup/memory.max' content. Expected to find available memory in bytes but got 'max ' instead #5161

Closed
tai-yi opened this issue May 16, 2024 · 1 comment
Labels
bug This issue describes a behavior which is not expected - a bug.

Comments

@tai-yi
Copy link

tai-yi commented May 16, 2024

Description

Run web API integration test(in container) error caused by Microsoft.Extensions.Diagnostics.ResourceMonitoring

System.InvalidOperationException : Could not parse '/sys/fs/cgroup/memory.max' content. Expected to find available memory in bytes but got 'max' instead

Microsoft.Extensions.Diagnostics.ResourceMonitoring 8.5.0
docker Image : mcr.microsoft.com/dotnet/sdk:8.0

Reproduction Steps

run dotnet test

Expected behavior

should not exception

Actual behavior

Error Message:
   System.InvalidOperationException : Could not parse '/sys/fs/cgroup/memory.max' content. Expected to find available memory in bytes but got 'max
' instead.
  Stack Trace:
     at Microsoft.Shared.Diagnostics.Throw.InvalidOperationException(String message)
   at Microsoft.Extensions.Diagnostics.ResourceMonitoring.Linux.LinuxUtilizationParserCgroupV2.GetAvailableMemoryInBytes()
   at Microsoft.Extensions.Diagnostics.ResourceMonitoring.Linux.LinuxUtilizationProvider..ctor(IOptions`1 options, ILinuxUtilizationParser parser, IMeterFactory meterFactory, TimeProvider timeProvider)
   at InvokeStub_LinuxUtilizationProvider..ctor(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Regression?

No response

Known Workarounds

Fallback to 8.4.0

Configuration

Image : mcr.microsoft.com/dotnet/sdk:8.0
Host OS: Ubuntu 22.04.4 LTS
docker: 26.1.2

Other information

No response

@tai-yi tai-yi added bug This issue describes a behavior which is not expected - a bug. untriaged labels May 16, 2024
@RussKie
Copy link
Member

RussKie commented May 16, 2024

Duplicate of #5114

@RussKie RussKie marked this as a duplicate of #5114 May 16, 2024
@RussKie RussKie closed this as completed May 16, 2024
@RussKie RussKie removed the untriaged label May 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue describes a behavior which is not expected - a bug.
Projects
None yet
Development

No branches or pull requests

2 participants