-
Notifications
You must be signed in to change notification settings - Fork 3k
Increased LWIP main worker thread stack size for debug builds #7194
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
Conversation
#define TCPIP_THREAD_STACKSIZE MBED_CONF_LWIP_TCPIP_THREAD_STACKSIZE*2 | ||
#elif MBED_DEBUG | ||
// When debug is enabled on the build increase stack 25 percent, thread stack uses 8-byte alignment | ||
#define LWIP_ALIGN_UP(pos, align) ((pos) % (align) ? (pos) + ((align) - (pos) % (align)) : (pos)) |
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.
If this alignment is needed here, isn't it potentially needed everywhere? Do they get a loud/clear error if they set something non-aligned in the JSON?
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.
Loud, maybe not so clear:
[1528872011.15][CONN][RXD] ++ MbedOS Error Info ++
[1528872011.20][CONN][RXD] Error Status: 0x80ff0100 Code: 256 Module: 255
[1528872011.24][CONN][RXD] Error Message: Fatal Run-time error
[1528872011.26][CONN][RXD] Location: 0x12005
[1528872011.27][CONN][RXD] Error Value: 0x0
[1528872011.37][CONN][RXD] Current Thread: Id: 0x2000e8cc Entry: 0x12aad StackSize: 0x1000 StackMem: 0x2000e918 SP: 0x2000f7c0
[1528872011.40][CONN][RXD] -- MbedOS Error Info --
[1528872011.43][CONN][RXD] sys_thread_new create error
We are using the low level rtos api:s which seem to not to protect from this. The standard Thread.cpp would do the align for the behalf the the user.
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.
Okay, so maybe stick the same align macro on all the #if
cases just in case while we're here.
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.
Ok, I added the macro to all stack size definitions.
LWIP stack is configured to be 1200 as default. Without debug enabled, maximum stack size used for asynchronous DNS operations is 880 bytes. With debug enabled maximum used stack size is 1248. Added configuration to LWIP to increase stack size by 25 percent when debug is enabled on build.
/morph build |
Build : SUCCESSBuild number : 2341 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1965 |
Test : SUCCESSBuild number : 2126 |
Description
LWIP stack is configured to be 1200 as default. Without debug enabled,
maximum stack size used for asynchronous DNS operations is 880 bytes. With
debug enabled maximum used stack size is 1248. Added configuration
to LWIP to increase stack size by 25 percent when debug is enabled on build.
Pull request type