-
Notifications
You must be signed in to change notification settings - Fork 991
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
Increase stack size at startup #2313
Conversation
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.
so, as discussed in our call, I think this is fine as a hotfix candidate. if we find that it does indeed work, we should refactor this code a bit, and move the process resource limit changes out of rocksdb code to another layer.
another possible fix is setting the stack limit via link args:
https://www.dsfcode.com/posts/increase-rust-stack-size-on-macos/
for now, approving this pr
don't forget to make the changes proposed by |
tl;dr - this fix solves stack overflow issue upon a restart, but does not solve overflow around block 9582 Done a bit of testing on our node with Sometimes it crashes on shutdown (logs - https://pastebin.com/reuwzrsP) and then tendermint won't start again, probably because of corrupted state. But this is most likely not caused by stack limit issues. There is also one more issue with stack overflow though - around block 9582 some nodes crash with following logs: |
Alright, so tried to test this as well like @Krewedk0 did. The only difference was that I didn't use I have to see how it performs for me around the infamous blocks 9500 - 10000 while having set it to an exact number. Will update in a bit, currently at height 900. Though, this all may hint towards a potential leak (recursion, memory, call stack not properly garbage collected)? I dunno, my knowledge concerning Rust is fairly limited. |
I am agree with @Krewedk0 words. I am still meeting same error on my side with infinity |
Checking the code now. Perhaps setting it as well to this value could solve it (the DEFAULT_STACK_LIMIT const to |
Can't access the pastebins, would be nice if you could re-upload them :) thanks for the comment! |
Okay so no, I restarted around 5k blocks and I got the stack overflow issue again. This means the necessary stack size keeps increasing. So there's definitely something up. |
For some reason first two are getting removed so i'll just leave them here
Unsuccessful shutdown:
crash around block 9582:
|
Got crashed at block 9595, Using LimitSTACK=infinity, v0.28.1-5-g679002d
|
closing in favor of #2325 |
Describe your changes
Try to increase stack size at ledger startup
Indicate on which release or other PRs this topic is based on
Checklist before merging to
draft