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

w32handle: double the available slots #4856

Merged
merged 1 commit into from
May 17, 2017
Merged

w32handle: double the available slots #4856

merged 1 commit into from
May 17, 2017

Conversation

DragonSA
Copy link
Contributor

Mono crashes if the system has more than ~128G of RAM. Doubling the
number of slots fixes the SIGSEGV error on FreeBSD.

Mono crashes if the system has more than ~128G of RAM.  Doubling the
number of slots fixes the SIGSEGV error on FreeBSD.
@monojenkins
Copy link
Contributor

Hello! I'm the build bot for the Mono project.

I need approval from a Mono team member to build this pull request. A team member should reply with "approve" to approve a build of this pull request, "whitelist" to whitelist this and all future pull requests from this contributor, or "build" to explicitly request a build, even if one has already been done.

Contributors can ignore this message.

@dnfclas
Copy link

dnfclas commented May 13, 2017

@DragonSA,
Thanks for having already signed the Contribution License Agreement. Your agreement has not been validated yet. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@luhenry
Copy link
Contributor

luhenry commented May 13, 2017

@DragonRsa thanks for the PR! Could you please provide more context with for example the SIGSEGV you are seeing?

@DragonSA
Copy link
Contributor Author

Please see PR 200937 on FreeBSD's bug tracker for the full details.

In summary: the normal SIGSEGV warning message is encountered ("while executing native code") when running mono-lite on a system with high memory, caused by the code running out of slots.

@luhenry
Copy link
Contributor

luhenry commented May 15, 2017

What your change implies is that you are creating more than 4 millions handles (file, console, pipe, mutex, semaphore, event, socket, etc.). Is that expected?

@DragonSA
Copy link
Contributor Author

DragonSA commented May 15, 2017

If I understand the code correctly, we are changing the handles from:

  • 4 million handles (SLOT_MAX(1024 * 16) * HANDLE_PER_SLOT(256)), to
  • 8 million handles (SLOT_MAX(1024 * 32) * HANDLE_PER_SLOT(256))

Yes, that is expected.

@kumpera
Copy link
Contributor

kumpera commented May 15, 2017

LGTM

The proper fix is to remove this arbitrary limit as I bet we'll run into it on machines with 1TB of ram.

@luhenry
Copy link
Contributor

luhenry commented May 15, 2017

build

@luhenry luhenry merged commit 8b27dee into mono:master May 17, 2017
@DragonSA DragonSA deleted the freebsd branch May 17, 2017 04:38
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Mono crashes if the system has more than ~128G of RAM.  Doubling the
number of slots fixes the SIGSEGV error on FreeBSD.

Commit migrated from mono/mono@8b27dee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants