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

Memory leak when build X509 chain #74200

Closed
Mordahlhuilhulh opened this issue Apr 5, 2020 · 3 comments
Closed

Memory leak when build X509 chain #74200

Mordahlhuilhulh opened this issue Apr 5, 2020 · 3 comments

Comments

@Mordahlhuilhulh
Copy link

I have .net standard project and my project is running on Linux
I can see that there is a memory leak problem on the following lines:

using (X509Chain x509Chain = new X509Chain())
{
x509Chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck;
x509Chain.ChainPolicy.ExtraStore.AddRange(_trustedStore.ToArray());

x509Chain.Build(Certificate);

// Check if the returned errors in the build are acceptable
if (x509Chain.ChainStatus.Any())
{
}

}

When running with a high load, the memory of the process starts at %MEM = 1.1 and after a few hours, the %MEM is 2.0

Any help will be highly appreciated.

@joperezr
Copy link
Member

joperezr commented Apr 9, 2020

cc: @bartonjs

@terrajobst terrajobst transferred this issue from dotnet/standard Aug 18, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Aug 18, 2022
@ghost
Copy link

ghost commented Aug 18, 2022

Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones
See info in area-owners.md if you want to be subscribed.

Issue Details

I have .net standard project and my project is running on Linux
I can see that there is a memory leak problem on the following lines:

using (X509Chain x509Chain = new X509Chain())
{
x509Chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck;
x509Chain.ChainPolicy.ExtraStore.AddRange(_trustedStore.ToArray());

x509Chain.Build(Certificate);

// Check if the returned errors in the build are acceptable
if (x509Chain.ChainStatus.Any())
{
}

}

When running with a high load, the memory of the process starts at %MEM = 1.1 and after a few hours, the %MEM is 2.0

Any help will be highly appreciated.

Author: Mordahlhuilhulh
Assignees: -
Labels:

area-System.Security

Milestone: -

@bartonjs
Copy link
Member

This seems like a duplicate of #55672.

Based on our testing, there are no leaks, just a combination of .NET Server GC and glibc's local-buffered free() that makes the memory usage go high; but it goes stable, so there's no leak.

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Aug 18, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Sep 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants