-
Notifications
You must be signed in to change notification settings - Fork 168
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
Added config check for coroutine_stack_size #480
Added config check for coroutine_stack_size #480
Conversation
Looks like it's time to renew the certificates |
I like this idea to check |
I think we should investigate the idea of using |
simply adding the MAP_GROWSDOWN flag into mmap doesn't help |
This is not how it works, you should find a working example how to implement it, it is more complex |
Some people say: "Trying to rely on the MAP_GROWSDOWN flag is unreliable and dangerous because it cannot protect you against mmap creating a new mapping just adjacent to your stack, which will then get clobbered." |
The idea there is that you allow to grow stack automatically up to some adequate limit. It is better to find an implementation, how people are using it in their projects. It is not necessary about the GROWSDOWN flag, we need to allocate memory for stack usage (MAP_STACK) with guard page support. The direction of stack grows itself might be different depending on the architecture. This is more like a suggestion to research this field, if this can be done efficiently in Odyssey case. Maybe there is some lower limit needs to be allocated each time which is quite high, I am not sure. I believe it is worth to investigate anyway. |
Great idea, but I think dynamic memory allocation is not in best practices for high load projects, anyway for C-based, for example in nginx if you create many virtual servers more than placed in memory you get an error: |
@pmwkaa |
Yes, heap memory is essentially the same. Not sure how you would solve the problem with dynamic resizing though. I don't think you can realloc coroutine stack, because it could change base address and mess with the pointers allocated on stack. |
It probably rewrite memory after it, you should check memory santizer to make such it is not happening. Also I recommend enable malloc debuggning env variables to catch those errors |
you goddamn right) |
@pmwkaa |
can you create separate PR for this change? |
|
seemd like this pr is abandoned |
No description provided.