-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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/win] Increase stack size (reserve) to 8MB #60265
[mono/win] Increase stack size (reserve) to 8MB #60265
Conversation
Fix dotnet#57141 in windows build. Set the stack size (reserve) to 8MB, which is usually a default on linux. This way we should get similar behavior on windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be doing this on al Windows builds or just the cross compiler?
I think on all windows builds producing |
Did similar change on Mono couple of years ago, mono/mono@29a2383, so that will make default stack size for binary, 8MB for debug builds and matching CoreCLR stack size for release build 1.5 MB (mainly due to interpreter getting larger stackframes when running debug builds). All threads that we create later (through our PAL API) will get default stack size of 1MB (that part of the change is carried over to dotnet/runtime). |
Reading up on the issue, so sounds like increasing the stack size is just a temporary fix for the underlying recursion problem in WASM AOT compiler? |
I think we can keep this change long term, to have similar run conditions for the executables on windows and linux. For the underlying recursion I have opened #60266 where I would like to look closer at it. |
I assume fix still keeps initial commit size of stack memory? If so we should just keep in mind that this will change stack size of main thread. All threads created through our PAL will continue to get default stack size of 1MB (for example managed threads) unless explicitly setting stack size to larger value. This will only affect runtime when run through mono-sgen.exe and won't have any impact when running using coreclr host. We also had similar discussion when doing similar change in mono/mono, mono/mono#14760 (comment). |
Yes, this change should affect just |
I think it is less of a concern in dotnet/runtime since its pretty much just used by the cross compilers. |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1354497221 |
@radekdoulik an error occurred while backporting to release/6.0, please check the run log for details! Error: @radekdoulik is not a repo collaborator, backporting is not allowed. |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1355427492 |
Fix #57141 in windows build.
Set the stack size (reserve) to 8MB, which is usually a default
on linux. This way we should get similar behavior on windows.