gvisor
gvisor copied to clipboard
Increase max stack size limit?
Description
The maximum stack size (set with ulimit -s) currently appears to be limited to 128 MB. Would maintainers be open to increasing this limit to 512 MB or 1 GB?
For context, I'm trying to run a competitive programming online judge in gVisor, which often requires running programs with a large stack size (usually 256 MB, but occasionally even more).
Thanks for considering this!
Is this feature related to a specific bug?
No
Do you have a specific solution in mind?
Yes -- increase maxStackSize to 512 MB or 1 GB.
https://github.com/google/gvisor/blob/master/runsc/boot/limits.go#L127
can you change your spec to apply the rlimit you want?
Thanks! My understanding is that this lets you set the initial stack size to something > 128 MB, but running ulimit -s within the container will reset it back to 128 MB again. Ideally the default stack size would be 8 MB, and a process within the container can run ulimit -s to increase the stack size later.