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

Long GC pause times caused by Array.Sort of primitive array #13730

Closed
jkotas opened this issue Nov 5, 2019 · 1 comment · Fixed by dotnet/coreclr#27700
Closed

Long GC pause times caused by Array.Sort of primitive array #13730

jkotas opened this issue Nov 5, 2019 · 1 comment · Fixed by dotnet/coreclr#27700
Assignees

Comments

@jkotas
Copy link
Member

jkotas commented Nov 5, 2019

Repro:

static void Main()
{
    new Thread(() =>
    {
        var src = new int[10_000_000];
        for (;;) Array.Sort(src);
    }).Start();
    for (;;) { Console.WriteLine("GC start"); GC.Collect(); Console.WriteLine("GC end"); Thread.Sleep(1); }
}

Result: The GC takes very long time - if it finishes at all.

@jkotas
Copy link
Member Author

jkotas commented Nov 5, 2019

The fix should be to either make the Sort fully managed (preferred) or to add GC polls to the current unmanaged implementation.

Related: https://github.com/dotnet/coreclr/issues/27106
Related: dotnet/coreclr#24419

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants