Skip to content
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

panic handler crash (IDFGH-3230) #5227

Open
szmodz opened this issue May 1, 2020 · 2 comments
Open

panic handler crash (IDFGH-3230) #5227

szmodz opened this issue May 1, 2020 · 2 comments
Assignees
Labels
Status: Opened Issue is new

Comments

@szmodz
Copy link

szmodz commented May 1, 2020

In case of stack pointer corruption, the panic handler will enter infinite recursion, which eventually results in an interrupt WDT timeout, without providing any useful information about the crash.

In my opinion, the panic handler should switch stacks and print at least basic information before touching the original stack pointer, which may be invalid.

A crash in the panic handler will result in a DoubleException,

Double exceptions are not a normal occurrence. They indicate a bug of some kind.

test case:
https://github.com/szmodz/esp-idf/commits/panic_crash

example output:

Hello world!
ets Jun  8 2016 00:22:57

rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:5132
load:0x40078000,len:14484
load:0x40080400,len:4068
entry 0x40080624
W (205) boot.esp32: PRO CPU has been reset by WDT.
W (205) boot.esp32: WDT reset info: PRO CPU PC=0x4008e4b2
0x4008e4b2: _xt_context_save at /home/szmodz/invendyne/esp-idf/components/freertos/xtensa/xtens
a_context.S:149                                                                                      
                                                                                                    
E (205) boot.esp32: WDT reset info: &s CPU not support!
@github-actions github-actions bot changed the title panic handler crash panic handler crash (IDFGH-3230) May 1, 2020
@Dazza0 Dazza0 self-assigned this May 9, 2020
@Alvin1Zhang
Copy link
Collaborator

@szmodz Thanks for reporting, we will look into later. Thanks.

@espressif-bot espressif-bot added the Status: In Progress Work is in progress label May 3, 2021
@espressif-bot espressif-bot added Status: Opened Issue is new and removed Status: In Progress Work is in progress labels Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new
Projects
None yet
Development

No branches or pull requests

5 participants
@szmodz @Dazza0 @Alvin1Zhang @espressif-bot and others