platform-espressif32
platform-espressif32 copied to clipboard
ESP32 Crash Report is not properly formatted
Environment Development Kit: LoLin D32 PRO / ESP32-CAM and more Kit version NA Module or chip used: [ESP32-WROOM-32] PLATFORM: Espressif 32 (3.3.1+sha.33ff413) WEMOS LOLIN D32 PRO IDF version (run git describe --tags to find it): framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.0 Build System: [platformio] Compiler version (run xtensa-esp32-elf-gcc --version to find it): unknown Operating System: [Windows] (Windows only) environment type: [MSYS2 mingw32|ESP Command Prompt|Plain Command Prompt|PowerShell]. Using an IDE?: [Yes platformio] Power Supply: [USB] Problem Description I am experiencing an RMT related crash (This ticket is not for the crash) which results in a back trace being printed to the console. The back trace fails to decode properly using the decoder in platformio (March 2022 (version 1.66)). I have manually decoded the trace and can see that there are issues that need to be resolved (separate question will be generated for that). Her is the defective back trace:
Guru Meditation Error: Core 1 panic'ed (InstrFetchProhibited). Exception was unhandled.
Core 1 register dump: PC : 0xbad00bad PS : 0x00060033 A0 : 0x80081aa2 A1 : 0x3ffbf1e0 A2 : 0x3ffe8da4 A3 : 0x3ff56000 A4 : 0x01000000 A5 : 0x3ffb7e40 A6 : 0x00000003 A7 : 0x00060f23 A8 : 0x80081a0a A9 : 0x00000040 A10 : 0x3ffe8bd4 A11 : 0x08000000 A12 : 0x08000000 A13 : 0x00000060 A14 : 0x00000000 A15 : 0x00000001 SAR : 0x0000001d EXCCAUSE: 0x00000014 EXCVADDR: 0xbad00bac LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace:0x7ad00baa:0x3ffbf1e00x40081a9f:0x3ffbf200 0x40085865:0x3ffbf220 0x40087859:0x3ffbf240 0x4008415f:0x3ffb7e90 0x40087da4:0x3ffb7eb0 #0 0x7ad00baa:0x3ffbf1e00 in ?? ??:0
The issue is a missing space in this text: "0x7ad00baa:0x3ffbf1e00x40081a9f:0x3ffbf200" The characters 0x3ffbf1e0 should have a space before 0x40081a9f:0x3ffbf200
Expected Behavior Back Trace string can be decoded
Actual Behavior Decoder fails to decode the back trace.
Steps to reproduce RMT is transmitting and I update a web page at the same time 100% Crash on RMT interrupt.
// If possible, attach a picture of your setup/wiring here. NA
Could you help us to improve https://github.com/platformio/platform-espressif32/blob/develop/monitor/filter_exception_decoder.py ?
Sorry but I am a C/C++ guy. My Python is virtually non existent.
This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.
This is still present in the latest release.
@MartinMueller2003 Can you check against the current version 5.1.1 of platform-expressif. Since I'm looking into another bug in the decoder I also checked this issue.
I could not reproduce the error. The bug comes from the fact, that the decoder sees the following text:
Backtrace:0xaabbccdd:0xaabbccdd0xaabbccdd:0xaabbccdd 0xaabbccdd:0xaabbccdd
It decodes the first pair as: 0xaabbccdd:0xaabbccdd0 (<-- 9th character is the starting 0x of the next block)
This is also present in your output: #0 0x7ad00baa:0x3ffbf1e00 in ?? ??:0
This bug should be fixed with #831. To check, I let an esp send the backtrace on the serial port and let the backtrace decoder do it's work:
Backtrace:0x7ad00baa:0x3ffbf1e00x40081a9f:0x3ffbf200 0x40085865:0x3ffbf220 0x40087859:0x3ffbf240 0x4008415f:0x3ffb7e90 0x40087da4:0x3ffb7eb0
#0 0x7ad00baa:0x3ffbf1e0 in ?? ??:0
#1 0x40081a9f:0x3ffbf200 in spi_flash_mmap_pages at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spi_flash/flash_mmap.c:258
#2 0x40085865:0x3ffbf220 in coex_core_ts_start at ??:?
#3 0x40087859:0x3ffbf240 in set_most_pwr_reg at ??:?
#4 0x4008415f:0x3ffb7e90 in esp_spiram_writeback_cache at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_hw_support/port/esp32/spiram.c:264
#5 0x40087da4:0x3ffb7eb0 in get_rate_fcc_index at /home/cff/gittree/chip7.1_phy/chip_7.1/board_code/app_test/pp/phy/phy_chip_v7_cal.c:1758
It decoded the Backtrace from the Issue without a hickup.
I am not sure how I would test this. I can say that the latest tools used in platformIO still have this issue. If there is a procedure for updating PlatformIO on VScode with this change, I would be happy to test.