-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Increasing CHIP_TASK_STACK_SIZE from 4096 -> 5120 #8216
Increasing CHIP_TASK_STACK_SIZE from 4096 -> 5120 #8216
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.
The need for such a large stack is somewhat concerning.
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.
Should this be changed in this central location, or for this specific platform? Other platforms already override this...
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.
This should be changed for the relevant platform, not globally.
@bzbarsky-apple The stack increase is now done on platform level instead og globally. Tested and is working. Please see 12f48da |
I had a similar thought, however I also wondered what would make TI special here - I would have assumed that the chip stack is quite low level and its stack usage should not differ greatly between platforms. @mgarb1 Do we know what code path causes the overflow? That may help us in determining if this is really platform-specific or if this is just the platform that found it (and others happily corrupt memory). |
@andy31415 The stack increase is done on platform level instead of globally. Tested and is working. Please see 12f48da @srickardti @andy31415 is asking "Do we know what code path causes the overflow? That may help us in determining if this is really platform-specific or if this is just the platform that found it (and others happily corrupt memory)." can you answer this? |
@mgarb1 @andy31415 I haven't investigated this specifically, but we could add a watchpoint at the top of the stack. The issue I've found in debugging these things is the stack check feature of the kernel is done in the idle loop or in a context switch, not when it actually pops the stack. I have noticed that other platforms have very large callstacks, larger than this. In the past I've seen these issues caused by log messages. snprintf has no problem allocating hundreds of bytes on the stack to build its message. If the stack is filled with space characters ( |
* Increasing HANDLER_STACK_SIZE from 4096 -> 5120 * increase CHIP_TASK_STACK_SIZE 4096 - > 5120 * Increasing the Stack size on platform level instead of globally
* Increasing HANDLER_STACK_SIZE from 4096 -> 5120 * increase CHIP_TASK_STACK_SIZE 4096 - > 5120 * Increasing the Stack size on platform level instead of globally
Problem
What is being fixed? Examples:-
Change overview
Increasing CHIP_TASK_STACK_SIZE from 4096 -> 5120
Testing
Tested on physical device and provisioning do not get memory error anymore.