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

no "thread has overflowed its stack" messages on stack exhaustion within a stacker-created segment #89

Closed
sunshowers opened this issue Aug 2, 2024 · 2 comments

Comments

@sunshowers
Copy link
Contributor

sunshowers commented Aug 2, 2024

Hi there, thanks for maintaining stacker!

Currently, on Linux x86_64, a simple stack exhaustion results in a message like:

thread 'main' has overflowed its stack
fatal runtime error: stack overflow

However, if stacker has created a stack segment, then no such message gets printed:

zsh: segmentation fault (core dumped)

This makes it somewhat harder to diagnose stack exhaustion issues.

I wrote a little program that tests a bunch of combinations: https://github.com/sunshowers/stack-exhaust-test. With this program, the issue is reproducible with:

cargo run -- --use-stacker once --red-zone $((16 * 1024 * 1024))

The ./run-commands.sh script runs the program with a bunch of flag combinations.

I'm not sure if it's possible to fix this (probably related, on Linux the program exits with SIGSEGV rather than SIGIOT) but it would be good to document this. Thanks again!

@nagisa
Copy link
Member

nagisa commented Aug 3, 2024

Duplicate of #59

@nagisa nagisa marked this as a duplicate of #59 Aug 3, 2024
@nagisa nagisa closed this as completed Aug 3, 2024
@sunshowers
Copy link
Contributor Author

Thank you!

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

No branches or pull requests

2 participants