esp-idf: Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled in ESP32C3 (IDFGH-8134)
Answers checklist.
- I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
- I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
- I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
v4.4.2 (stable)
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
No response
Development Kit.
ESP32-C3-DevKitM-1
Power Supply used.
USB
What is the expected behavior?
ESP32C3 crashes when connecting to Wi-Fi AP if CONFIG_NEWLIB_NANO_FORMAT is enabled. This shouldn’t happen. (Note: The issue is 100% reproducible during the wifi connection ).
What is the actual behavior?
ESP32 C3 crashes with load access fault when configured as station and tries to connect to the Wi-Fi Access point. (Same code works in ESP32 DEV kit without any issues). Any thoughts on this issue?
Steps to reproduce.
- Make sure to enable the CONFIG_NEWLIB_NANO_FORMAT in SDK config
- Configure the device as a Wi-Fi station and configure the wifi credentials for AP.
- Observe that the device crashes (with Guru Meditation Error:) while connecting to the Wi-Fi Access point.
Debug Logs.
Here is the debug log
I (3644) pp: pp rom version: 9387209
I (3644) net80211: net80211 rom version: 9387209
D (3654) nvs: nvs_open_from_partition misc 1
I (3664) wifi:wifi driver task: 3fc9fa08, prio:23, stack:6144, core=0
I (3664) system_api: Base MAC address is not set
I (3664) system_api: read default base MAC address from EFUSE
D (3674) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 8 bit
D (3684) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 0 bit
D (3684) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 24 bit
D (3694) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 16 bit
D (3704) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 8 bit
D (3704) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 0 bit
D (3714) nvs: nvs_open_from_partition nvs.net80211 1
D (3724) nvs: nvs_get opmode 1
D (3724) nvs: nvs_get_str_or_blob sta.ssid
D (3724) nvs: nvs_get sta.authmode 1
D (3734) nvs: nvs_get_str_or_blob sta.pswd
D (3734) nvs: nvs_get_str_or_blob sta.pmk
D (3744) nvs: nvs_get sta.chan 1
D (3744) nvs: nvs_get auto.conn 1
D (3744) nvs: nvs_get bssid.set 1
D (3754) nvs: nvs_get_str_or_blob sta.bssid
D (3754) nvs: nvs_get sta.lis_intval 2
D (3754) nvs: nvs_get sta.phym 1
D (3764) nvs: nvs_get sta.phybw 1
D (3764) nvs: nvs_get_str_or_blob sta.apsw
D (3764) nvs: nvs_get_str_or_blob sta.apinfo
D (3774) nvs: nvs_get sta.scan_method 1
D (3774) nvs: nvs_get sta.sort_method 1
D (3784) nvs: nvs_get sta.minrssi 1
D (3784) nvs: nvs_get sta.minauth 1
D (3784) nvs: nvs_get sta.pmf_e 1
D (3794) nvs: nvs_get sta.pmf_r 1
D (3794) nvs: nvs_get sta.btm_e 1
D (3794) nvs: nvs_get sta.rrm_e 1
D (3804) nvs: nvs_get sta.mbo_e 1
D (3804) nvs: nvs_get_str_or_blob ap.ssid
D (3804) nvs: nvs_get_str_or_blob ap.passwd
D (3814) nvs: nvs_get_str_or_blob ap.pmk
D (3814) nvs: nvs_get ap.chan 1
D (3824) nvs: nvs_get ap.authmode 1
D (3824) nvs: nvs_get ap.hidden 1
D (3824) nvs: nvs_get ap.max.conn 1
D (3834) nvs: nvs_get bcn.interval 2
D (3834) nvs: nvs_get ap.phym 1
D (3834) nvs: nvs_get ap.phybw 1
D (3844) nvs: nvs_get ap.sndchan 1
D (3844) nvs: nvs_get ap.pmf_e 1
D (3844) nvs: nvs_get ap.pmf_r 1
D (3854) nvs: nvs_get ap.p_cipher 1
D (3854) nvs: nvs_get lorate 1
D (3854) nvs: nvs_get_str_or_blob country
D (3864) nvs: nvs_get ap.ftm_r 1
D (3864) nvs: nvs_set ap.sndchan 1 1
I (3864) wifi:wifi firmware version: eeaa27d
I (3874) wifi:wifi certification version: v7.0
I (3874) wifi:config NVS flash: enabled
I (3884) wifi:config nano formating: enabled
I (3884) wifi:Init data frame dynamic rx buffer num: 32
I (3884) wifi:Init management frame dynamic rx buffer num: 32
I (3894) wifi:Init management short buffer num: 32
I (3894) wifi:Init dynamic tx buffer num: 32
I (3904) wifi:Init static tx FG buffer num: 2
I (3904) wifi:Init static rx buffer size: 1600
I (3914) wifi:Init static rx buffer num: 10
I (3914) wifi:Init dynamic rx buffer num: 32
I (3924) wifi_init: rx ba win: 6
I (3924) wifi_init: tcpip mbox: 32
I (3924) wifi_init: udp mbox: 6
I (3934) wifi_init: tcp mbox: 6
I (3934) wifi_init: tcp tx win: 5744
I (3934) wifi_init: tcp rx win: 5744
I (3944) wifi_init: tcp mss: 1440
I (3944) wifi_init: WiFi IRAM OP enabled
I (3954) wifi_init: WiFi RX IRAM OP enabled
D (3954) wifi:clear blacklist
D (3964) DIAG: connecting to test SSID: Agk, pswd: Ag@12345
I (3964) phy_init: phy_version 912,d001756,Jun 2 2022,16:28:07
D (3974) phy_init: loading PHY init data from application binary
D (3974) nvs: nvs_open_from_partition phy 0
D (3984) phy_init: esp_phy_load_cal_data_from_nvs: failed to open NVS namespace (0x1102)
W (3994) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
D (4004) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 8 bit
D (4004) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 0 bit
D (4014) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 24 bit
D (4024) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 16 bit
D (4024) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 8 bit
D (4034) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 0 bit
D (4074) nvs: nvs_open_from_partition phy 1
D (4074) nvs: nvs_set_blob cal_data 1904
D (4084) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 8 bit
D (4084) efuse: In EFUSE_BLK1__DATA1_REG is used 8 bits starting with 0 bit
D (4084) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 24 bit
D (4094) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 16 bit
D (4094) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 8 bit
D (4104) efuse: In EFUSE_BLK1__DATA0_REG is used 8 bits starting with 0 bit
D (4114) nvs: nvs_set_blob cal_mac 6
D (4114) nvs: nvs_set cal_version 4 912
D (4124) nvs: nvs_close 18
D (4124) wifi:filter: set rx policy=0
I (4124) wifi:mode : sta (70:04:1d:11:d7:d4)
I (4134) wifi:enable tsf
D (4134) wifi:filter: set rx policy=1
D (4134) wifi:connect status 0 -> 0
D (4144) event: running post WIFI_EVENT:2 with handler 0x420271ca and context 0x3fc97c70 on loop 0x3fc9a0a0
D (4144) wifi_init_default: wifi_start esp-netif:0x3fc979f8 event-id2
D (4154) wifi_init_default: WIFI mac address: 70 4 1d 11 d7 d4
D (4164) esp_netif_handlers: esp_netif action has started with netif0x3fc979f8 from event_id=2
D (4174) esp_netif_lwip: check: remote, if=0x3fc979f8 fn=0x4202482a
D (4174) esp_netif_lwip: esp_netif_start_api 0x3fc979f8
D (4184) esp_netif_lwip: esp_netif_get_hostname esp_netif:0x3fc979f8
D (4184) esp_netif_lwip: check: local, if=0x3fc979f8 fn=0x4202536c
D (4194) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3fc979f8
D (4204) esp_netif_lwip: call api in lwip: ret=0x0, give sem
D (4204) event: running post WIFI_EVENT:2 with handler 0x4200bc26 and context 0x3fca4cf0 on loop 0x3fc9a0a0
I (4214) DIAG: diag event_id = 2
I (4224) DIAG: WiFi test, STA Connected
D (4224) wifi:Start wifi connect
D (4224) wifi:connect status 0 -> 0
D (4234) wifi:connect chan=0
D (4234) wifi:first chan=1
D (4234) wifi:connect status 0 -> 1
D (4244) wifi:filter: set rx policy=3
D (4244) wifi:clear scan ap list
D (4244) wifi:start scan: type=0x50f, priority=2, cb=0x4207845e, arg=0, ss_state=0x1, time=4255886, index=0
D (4254) wifi:perform scan: ss_state=0x9, chan<1,0>, dur<0,120>
D (4384) wifi:scan end: arg=0, status=0, ss_state=0x3
D (4384) wifi:perform scan: ss_state=0x9, chan<2,0>, dur<0,120>
D (4504) wifi:scan end: arg=0, status=0, ss_state=0x3
D (4504) wifi:perform scan: ss_state=0x9, chan<3,0>, dur<0,120>
D (4624) wifi:scan end: arg=0, status=0, ss_state=0x3
D (4624) wifi:perform scan: ss_state=0x9, chan<4,0>, dur<0,120>
D (4744) wifi:scan end: arg=0, status=0, ss_state=0x3
D (4744) wifi:perform scan: ss_state=0x9, chan<5,0>, dur<0,120>
D (4864) wifi:scan end: arg=0, status=0, ss_state=0x3
D (4864) wifi:perform scan: ss_state=0x9, chan<6,0>, dur<0,120>
D (4874) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (4874) wifi:profile match: ss_state=0x7
D (4904) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (4904) wifi:set max rate: from <rate=130, phy=3, sig=0> to <rate=144, phy=3 sig=0>
D (4904) wifi:sig_b=0, sig_g=0, sig_n=0, max_b=22, max_g=108, max_n=144
D (4914) wifi:profile match: ss_state=0x7
D (4984) wifi:scan end: arg=0, status=0, ss_state=0x7
D (4994) wifi:perform scan: ss_state=0xd, chan<7,0>, dur<0,120>
D (5114) wifi:scan end: arg=0, status=0, ss_state=0x7
D (5114) wifi:perform scan: ss_state=0xd, chan<8,0>, dur<0,120>
D (5234) wifi:scan end: arg=0, status=0, ss_state=0x7
D (5234) wifi:perform scan: ss_state=0xd, chan<9,0>, dur<0,120>
D (5354) wifi:scan end: arg=0, status=0, ss_state=0x7
D (5354) wifi:perform scan: ss_state=0xd, chan<10,0>, dur<0,120>
D (5474) wifi:scan end: arg=0, status=0, ss_state=0x7
D (5474) wifi:perform scan: ss_state=0xd, chan<11,0>, dur<0,120>
D (5594) wifi:scan end: arg=0, status=0, ss_state=0x7
D (5594) wifi:perform scan: ss_state=0xd, chan<12,0>, dur<360,360>
D (5954) wifi:scan end: arg=0, status=0, ss_state=0x7
D (5954) wifi:perform scan: ss_state=0xd, chan<13,0>, dur<360,360>
D (6314) wifi:scan end: arg=0, status=0, ss_state=0x7
D (6314) wifi:perform scan: ss_state=0xd, chan<14,0>, dur<360,360>
D (6674) wifi:scan end: arg=0, status=0, ss_state=0x7
D (6684) wifi:filter: set rx policy=4
D (6684) wifi:first chan=1
D (6684) wifi:handoff_cb: status=0
D (6684) wifi:ap found, mac=ce:86:db:6c:fd:19
D (6684) wifi:new_bss=0x3fc937e8, cur_bss=0, new_chan=<6,0>, cur_chan=1
D (6694) wifi:filter: set rx policy=5
I (6694) wifi:new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1
D (6704) wifi:connect_op: status=0, auth=5, cipher=3
D (6704) gdma: new group (0) at 0x3fca5600
D (6714) gdma: new pair (0,0) at 0x3fca562c
D (6714) gdma: new tx channel (0,0) at 0x3fca55d0
D (6724) gdma: new rx channel (0,0) at 0x3fca564c
**Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled.**
Core 0 register dump:
MEPC : 0x40058766 RA : 0x40032866 SP : 0x3fc9f310 GP : 0x3fc8f000
TP : 0x3fc72d00 T0 : 0x4005890e T1 : 0x40381990 T2 : 0xffffffff
S0/FP : 0x3fc9f350 S1 : 0x3fc9fa64 A0 : 0x00000001 A1 : 0x00000000
A2 : 0x00000000 A3 : 0x3fc9f434 A4 : 0x3fc9f348 A5 : 0x3fc9f430
A6 : 0x00000000 A7 : 0x00000000 S2 : 0x3fc95edc S3 : 0x4003218e
S4 : 0x00000001 S5 : 0x00000001 S6 : 0x3ff1f000 S7 : 0x3ff1f000
S8 : 0x40032000 S9 : 0x00000025 S10 : 0x3ff1f000 S11 : 0x00000001
T3 : 0x0000001c T4 : 0x3fc9f6bd T5 : 0x00000006 T6 : 0x00000064
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000005 MTVAL : 0x00000001
MHARTID : 0x00000000
Stack memory:
3fc9f310: 0x3c0caabc 0x3fc9f41c 0x3fc96070 0x00000001 0x3ff1f000 0x400528e6 0x00000001 0x3fc9fa64
3fc9f330: 0x3c0caafc 0x3c0caafb 0x3fc95edc 0x400324f0 0xa5a5a5a5 0xa5a5a5a5 0x3fc9f434 0x00000000
3fc9f350: 0x00000000 0xffffffff 0x00000000 0x00000000 0x00000001 0x0000003e 0x3f302073 0x40387772
3fc9f370: 0x00000004 0x3fc9f3dc 0x3fc96188 0x00000000 0x3c0cb000 0x00000001 0x00000000 0x36000001
3fc9f390: 0x007a3237 0x00000010 0x3fc94ab8 0x3c0caa1c 0x00000004 0x00000019 0x00000000 0x4209dfc6
3fc9f3b0: 0x00000004 0x3fc9f41c 0x3fca562c 0x00000040 0x00000000 0x3fca54fc 0x00000000 0x00000040
3fc9f3d0: 0x3fca5600 0x00000010 0x3fca562c 0x00000001 0x3fca55d0 0x00000001 0x3c0cb000 0x4038c1d4
3fc9f3f0: 0x3fca564c 0x00000054 0x3fc95580 0x3fc9f41c 0xa5a5a5a5 0xb33fffff 0x3fca567c 0x420842c0
3fc9f410: 0xa5a5a5a5 0x00000054 0x3c0cb000 0x00001a44 0x3c0caa1c 0x3c0ca764 0x00000000 0x00000000
3fc9f430: 0x00000001 0x00000010 0x3c0c91c8 0x00000000 0x00000004 0x3fc94da4 0x3fc8fdbc 0x00000000
3fc9f450: 0x00000005 0x00000000 0x3fc94da8 0x420606fe 0x00000001 0x00000001 0x3fca5458 0x00000000
3fc9f470: 0x00000001 0x00000010 0x3fca5458 0x40387da0 0x00000001 0xffffffff 0x00000000 0x00000000
3fc9f490: 0x00000000 0x00000000 0x00000001 0x00000000 0x00000001 0x00000040 0x00000000 0x00000000
3fc9f4b0: 0x00000040 0x3fc8fdbc 0x3fc8fdc8 0x420605be 0x3fc72d00 0x3fca554c 0x00000001 0x00000001
3fc9f4d0: 0x00000000 0x00000000 0x3fc98ae4 0x00000000 0x00000008 0x00000008 0x3fc9f7a8 0x3fca54e8
3fc9f4f0: 0x00000000 0x00000040 0x00000008 0x3fca554c 0x00000000 0x00000040 0x3fca54e0 0x4205e112
3fc9f510: 0x00000004 0x00000000 0x3fc98ae4 0x00001000 0x00000003 0x3fc93114 0x00000008 0x3fca554c
3fc9f530: 0x3fc9313b 0x3fc9f674 0x00000000 0x420570be 0x3fc9fa08 0x00000001 0x3fc98ae4 0x403878f8
3fc9f550: 0x0000000a 0x3fc96216 0x0000000a 0x00000036 0x3fc9fa08 0x00000001 0x3fc98ae4 0x403878f8
3fc9f570: 0x00000000 0x3fc96216 0x3fc8ea08 0x420034ce 0x00000044 0xffffffff 0x3fc93217 0x00000014
3fc9f590: 0x00000020 0x3fc9f674 0x3fc9313b 0x4205810c 0x00000036 0x3fc9fa64 0x00000008 0x3fc9313b
3fc9f5b0: 0x00000000 0x3fc96206 0x3fc96070 0x01000000 0x0000000a 0x00000000 0xc0380000 0x3fc95c60
3fc9f5d0: 0x00000084 0x00000080 0x3fc95580 0x4038bfe0 0x0000000a 0x3fc9fa64 0x3fc95edc 0x00000080
3fc9f5f0: 0x00000004 0x00000080 0x00000804 0x40380a7c 0x00000000 0x00000000 0x3fc96070 0x00000000
3fc9f610: 0x00000008 0x00000008 0x3fc9f7a8 0x3fc95000 0x00000001 0x3fc9313b 0x3fc93217 0x00001000
3fc9f630: 0x00000804 0x00000080 0x00000000 0x40380a96 0x00000001 0x00000008 0x3fc9f7a8 0x3fc95000
3fc9f650: 0x00000001 0x3fc9313b 0x3fc93217 0x00001000 0x00000003 0x3fc93114 0x3fc9313b 0x42025caa
3fc9f670: 0x00000001 0x3c0c6c3c 0x3fca54e0 0x3fca554c 0x00000001 0x3fc9313b 0x3fc937ec 0x3fc9313b
3fc9f690: 0x3fc93110 0x3fc9525c 0x3fc95000 0x4208b5ee 0x00000000 0x3fca5418 0x3fc95580 0x00000003
3fc9f6b0: 0x00000003 0x3fc9313b 0x3fc937ec 0x3fc93114 0x00000003 0x3fc95000 0x3fc9525c 0x4208b844
3fc9f6d0: 0x00ce0000 0x00000000 0x3fc94ab8 0x3c0ba0c0 0x00000004 0x00000018 0x00000000 0x4209dfc6
3fc9f6f0: 0x00000004 0x3fc9f75c 0x420277f8 0x00000000 0x3fcdf934 0x3fce0000 0x00000001 0x3fca4d94
ELF file SHA256: 69f45d3de5c717d5
More Information.
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (4 by maintainers)
Commits related to this issue
- gdma: fixed crash from logging when using newlib nano Newlib nano printf formatting do not support %z, and will crash if such an identifier is followed by a %s indentifier. Closes https://github.com... — committed to espressif/esp-idf by ESP-Marius a year ago
- gdma: fixed crash from logging when using newlib nano Newlib nano printf formatting do not support %z, and will crash if such an identifier is followed by a %s indentifier. Closes https://github.com... — committed to espressif/esp-idf by ESP-Marius a year ago
- gdma: fixed crash from logging when using newlib nano Newlib nano printf formatting do not support %z, and will crash if such an identifier is followed by a %s indentifier. Closes https://github.com... — committed to espressif/esp-idf by ESP-Marius a year ago
Not sure exactly what you are trying to do here, but normally if you want to share and protect a resource, e.g. UART, in an RTOS you would use a mutex
Seems like that for UART the ardunio code already does take a mutex for you, e.g. see this.
If you have question specifically about the arduino port then you might be better of asking at https://github.com/espressif/arduino-esp32
To add to what @ESP-Marius said: In general, “load access fault” occurs in every case when the program tries to read from an invalid memory address. Please see docs for how to interpret the panic handler output.
@josef2600 As far as I know the arduino library does not come with
NEWLIB_NANO_FORMATactive. Are you sure this is the same issue?But yes, in general any fix merged into esp-idf will need some time before they appear in Ardunio.
@josef2600 You can try the below steps to disable it
@dmezh Temporary workaround is to disable the NEWLIB_NANO_FORMAT till fix is provided