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

[mono] Raise soft RLIMIT_NOFILE on Linux #82429

Merged
merged 2 commits into from
Mar 1, 2023
Merged

[mono] Raise soft RLIMIT_NOFILE on Linux #82429

merged 2 commits into from
Mar 1, 2023

Conversation

uweigand
Copy link
Contributor

@uweigand uweigand commented Feb 21, 2023

Replace darwin_change_default_file_handles by a new routine increase_descriptor_limit, which mirrors the logic in the CoreCLR INIT_IncreaseDescriptorLimit routine.

Fixes #82428.

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Feb 21, 2023
Replace darwin_change_default_file_handles by a new routine
increase_descriptor_limit, which mirrors the logic in the
CoreCLR INIT_IncreaseDescriptorLimit routine.

Addresses #82428.
Co-authored-by: Alexander Köplinger <[email protected]>
@akoeplinger akoeplinger merged commit 605d05b into dotnet:main Mar 1, 2023
@uweigand uweigand deleted the mono-rlimit-nofile branch March 3, 2023 16:01
@uweigand
Copy link
Contributor Author

uweigand commented Mar 3, 2023

Thanks @akoeplinger ! Can this be backported to .NET 7 and possibly also .NET 6 ? We're seeing the same issue there as well.

@akoeplinger
Copy link
Member

/backport to release/7.0

@akoeplinger
Copy link
Member

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2023

@akoeplinger backporting to release/7.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: [mono] Raise soft RLIMIT_NOFILE on Linux
Using index info to reconstruct a base tree...
M	src/mono/CMakeLists.txt
M	src/mono/mono/mini/driver.c
Falling back to patching base and 3-way merge...
Auto-merging src/mono/mono/mini/driver.c
Auto-merging src/mono/CMakeLists.txt
CONFLICT (content): Merge conflict in src/mono/CMakeLists.txt
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 [mono] Raise soft RLIMIT_NOFILE on Linux
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2023

@akoeplinger an error occurred while backporting to release/7.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2023

@akoeplinger backporting to release/6.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: [mono] Raise soft RLIMIT_NOFILE on Linux
Using index info to reconstruct a base tree...
M	src/mono/CMakeLists.txt
M	src/mono/mono/mini/driver.c
Falling back to patching base and 3-way merge...
Auto-merging src/mono/mono/mini/driver.c
CONFLICT (content): Merge conflict in src/mono/mono/mini/driver.c
Auto-merging src/mono/CMakeLists.txt
CONFLICT (content): Merge conflict in src/mono/CMakeLists.txt
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 [mono] Raise soft RLIMIT_NOFILE on Linux
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2023

@akoeplinger an error occurred while backporting to release/6.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@akoeplinger
Copy link
Member

Looks like there are some merge conflicts, @uweigand would you mind preparing manual backports? thanks

uweigand added a commit to uweigand/runtime that referenced this pull request Mar 7, 2023
Manual backport of dotnet#82429.

Replace darwin_change_default_file_handles by a new routine
increase_descriptor_limit, which mirrors the logic in the CoreCLR
INIT_IncreaseDescriptorLimit routine.

Fixes dotnet#82428.
uweigand added a commit to uweigand/runtime that referenced this pull request Mar 7, 2023
Manual backport of dotnet#82429.

Replace darwin_change_default_file_handles by a new routine
increase_descriptor_limit, which mirrors the logic in the CoreCLR
INIT_IncreaseDescriptorLimit routine.

Fixes dotnet#82428.
@uweigand
Copy link
Contributor Author

uweigand commented Mar 7, 2023

Looks like there are some merge conflicts, @uweigand would you mind preparing manual backports? thanks

Hi @akoeplinger, I've now created manual backports (linked above). Note that these omit the Alpine-related cmake changes, since in .NET 6 and .NET 7 there isn't any support for Alpine in the Mono makefiles yet. If this is ever backported, the -DDONT_SET_RLIMIT_NOFILE change would have to be added at that point as well (CC @ayakael).

@akoeplinger
Copy link
Member

Ok, thanks!

@ayakael
Copy link
Contributor

ayakael commented Mar 7, 2023

Noted! I would like to backport #76500, which would allow the alpine-related changes to be backported as well. Unfortunately, there is worry associated with backporting platform support. Would you like me to backport that PR + your changes?

@uweigand
Copy link
Contributor Author

uweigand commented Mar 8, 2023

Noted! I would like to backport #76500, which would allow the alpine-related changes to be backported as well. Unfortunately, there is worry associated with backporting platform support. Would you like me to backport that PR + your changes?

The backport question is not really for me to decide. I wouldn't mind that, but I can also understand the concerns with backporting large features. In the end, that's for the maintainers to decide ...

@ghost ghost locked as resolved and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-meta-mono community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mono runtime does not raise open file limit on Linux
4 participants