-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Heap tracing 'Standalone' couse HTTPS client crash (IDFGH-3852) #5758
Comments
github-actions
bot
changed the title
Heap tracing 'Standalone' couse HTTPS client crash
Heap tracing 'Standalone' couse HTTPS client crash (IDFGH-3852)
Aug 19, 2020
Thanks for reporting and letting us know, we will look into. |
@lbaltoro We have found the issue, a bug we've been hunting for a few weeks already. Your post helped us fixing it! We'll first apply the fix on master. Then backport it to v4.2. |
1 task
espressif-bot
pushed a commit
that referenced
this issue
Oct 18, 2020
Commit 891eb3b was fixing an issue with PS and EPC1 not being preserved after the window spill procedure. It did so by saving PS in a2 and EPC1 in a4. However the a4 register may be a live register of another window in the call stack, and if it is overwritten and then spilled to the stack, then the corresponding register value will end up being corrupted. In practice the problem would show up as an IllegalInstruction exception, when trying to return from a function when a0 value was 0x40020. Fix by using a0 register instead of a4 as scratch. Also fix a comment about xthal_save_extra_nw, as this function in fact doesn't clobber a4 or a5 because XCHAL_NCP_NUM_ATMPS is defined as 1. Closes #5758
espressif-bot
pushed a commit
that referenced
this issue
Nov 15, 2020
Commit 891eb3b was fixing an issue with PS and EPC1 not being preserved after the window spill procedure. It did so by saving PS in a2 and EPC1 in a4. However the a4 register may be a live register of another window in the call stack, and if it is overwritten and then spilled to the stack, then the corresponding register value will end up being corrupted. In practice the problem would show up as an IllegalInstruction exception, when trying to return from a function when a0 value was 0x40020. Fix by using a0 register instead of a4 as scratch. Also fix a comment about xthal_save_extra_nw, as this function in fact doesn't clobber a4 or a5 because XCHAL_NCP_NUM_ATMPS is defined as 1. Closes #5758
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
git describe --tags
to find it):// v4.2-dev-2077-g7dfe4b468
xtensa-esp32-elf-gcc --version
to find it):// (crosstool-NG esp-2020r2) 8.2.0
Problem Description
I'm working on bigger project with ethernet works with MQTT, HTTPS.
Module has often crash with:
'Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled.'
when try to connect i.e. google.com by HTTPS.
I tried other HTTPS clients based on pure mbedtls library and module has still error.
I've isolated the problem to the simplest example.
I had combined:
esp-idf\examples\ethernet\basic\ with esp_http_client example
and run, and it works.
But when I set Heap tracing to 'Standalone' it couse crashing.
Expected Behavior
HTTPS Client works with enabled Heap tracing
Actual Behavior
ESP crashes after few HTTPS requests when 'Heap tracing' option is set to Standalone
Steps to reproduce
Code to reproduce this issue
Debug Logs
Other items if possible
coredump.log
sdkconfig.txt
ethernet_example_main.txt
The text was updated successfully, but these errors were encountered: