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

ci: Lower and unify default stack size #29840

Open
dergoegge opened this issue Apr 10, 2024 · 2 comments
Open

ci: Lower and unify default stack size #29840

dergoegge opened this issue Apr 10, 2024 · 2 comments

Comments

@dergoegge
Copy link
Member

Default stack size differs across operating systems. E.g. the defaults for thread stack sizes: Linux: 8MiB, Windows 1MiB, FreeBSD 2MiB, OpenBSD 512 KiB.

It would be sensible to lower the stack size used in all CI jobs to the lowest default, so we don't miss stack overflow bugs that only occur with small stack sizes.

@maflcko
Copy link
Member

maflcko commented Apr 10, 2024

Any reason to not use half of the minimum, to more likely catch edge cases that would happen on unknown operating systems, or to more likely catch a runtime edge-case that is hit in production and not in the tests?

@laanwj
Copy link
Member

laanwj commented Apr 11, 2024

FWIW, the command on Linux to set the stack size for a session is ulimit -s 512. Where the amount is in KiB. This sets the maximum for the main thread, as well as additional theads created.

Any reason to not use half of the minimum, to more likely catch edge cases that would happen on unknown operating systems

i'm not sure, yes in principle this makes sense, but also the work that goes in having our code run with say a 256KiB stack seems unnecessary work if the lowest we know used is 512KiB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants