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

Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled in ESP32C3 (IDFGH-8134) #9631

Closed
3 tasks done
aggaddam opened this issue Aug 25, 2022 · 15 comments
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@aggaddam
Copy link

aggaddam commented Aug 25, 2022

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.

  1. Make sure to enable the CONFIG_NEWLIB_NANO_FORMAT in SDK config
  2. Configure the device as a Wi-Fi station and configure the wifi credentials for AP.
  3. 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

@aggaddam aggaddam added the Type: Bug bugs in IDF label Aug 25, 2022
@aggaddam
Copy link
Author

aggaddam commented Aug 25, 2022

sdkconfig.txt

@espressif-bot espressif-bot added the Status: Opened Issue is new label Aug 25, 2022
@github-actions github-actions bot changed the title Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled in ESP32C3 Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled in ESP32C3 (IDFGH-8134) Aug 25, 2022
@DirtYiCE
Copy link

DirtYiCE commented Dec 7, 2022

Just run into this issue myself. For me it crashes here:

ESP_LOGD(TAG, "%s channel (%d,%d), (%zu:%zu) bytes aligned, burst %s", dma_chan->direction == GDMA_CHANNEL_DIRECTION_TX ? "tx" : "rx",
group->group_id, pair->pair_id, sram_alignment, psram_alignment, en_burst ? "enabled" : "disabled");

%zu is C99 which is not supported in nano format. I think it just ignores the %zu and moves on to the next %s and crashes because the sram_alignment is not a valid pointer to a c-style string...
I can workaround this issue by setting the log level higher, but a quick search on esp-idf came up with a bunch of results for %zu. I think the only safe way to use CONFIG_NEWLIB_NANO_FORMAT right now is to disable logging completely.

@AxelLin
Copy link
Contributor

AxelLin commented Mar 1, 2023

Any update for the fix? @zikalino

@dmezh
Copy link

dmezh commented Mar 27, 2023

Pretty sure I ran into this too (ESP32-S3, NEWLIB_NANO_FORMAT=y, log level = verbose). This seems like it's happening in the middle of an esp_ota_set_boot_partition op:

D (1704) gdma: new group (0) at 0x3fcee660
D (1704) gdma: new pair (0,0) at 0x3fcee69c
D (1704) gdma: new tx channel (0,0) at 0x3fcee630
D (1704) gdma: new rx channel (0,0) at 0x3fcee6bc
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x40056ea0  PS      : 0x00060130  A0      : 0x8200a756  A1      : 0x3fc98f60
A2      : 0x00000001  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x3fc99003
A6      : 0x42009a2c  A7      : 0x00000000  A8      : 0x3fcf0721  A9      : 0x3fcf0722
0x42009a2c: __sfputs_r at /Users/brnomac003/.gitlab-runner/builds/qR2TxTby/0/idf/crosstool-NG/.build/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/nano-vfprintf.c:407

A10     : 0x3fcee02c  A11     : 0x00000020  A12     : 0x3fcf0388  A13     : 0x3fc99003
A14     : 0x3fc98fd9  A15     : 0x00000005  SAR     : 0x0000001f  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000001  LBEG    : 0x400570e8  LEND    : 0x400570f3  LCOUNT  : 0x00000000


Backtrace: 0x40056e9d:0x3fc98f60 |<-CORRUPTED

Edit: bump @zikalino

@aggaddam
Copy link
Author

aggaddam commented Mar 27, 2023

@dmezh Temporary workaround is to disable the NEWLIB_NANO_FORMAT till fix is provided

@AxelLin
Copy link
Contributor

AxelLin commented Apr 10, 2023

@zikalino @igrr
Can someone help to fix this panic?

Hit below panic with v5.1-dev-4375-g42261df71f (ESP32-C3, NEWLIB_NANO_FORMAT=y, log level = verbose)
D (7804) gdma: new group (0) at 0x3fcbf4ac
D (7808) gdma: new pair (0,0) at 0x3fcbf4e0
D (7812) gdma: new tx channel (0,0) at 0x3fcbf47c
D (7817) gdma: new rx channel (0,0) at 0x3fcbf500
Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled.

Stack dump detected
Core 0 register dump:
MEPC : 0x40058766 RA : 0x420d7ab6 SP : 0x3fcb65a0 GP : 0x3fc94400
0x420d7ab6: _printf_i at /builds/idf/crosstool-NG/.build/riscv32-esp-elf/src/newlib/newlib/libc/stdio/nano-vfprintf_i.c:221

TP : 0x3fc72c68 T0 : 0x4005890e T1 : 0x0000000f T2 : 0xffffffff
S0/FP : 0x3fcb65e0 S1 : 0x3fcb69a4 A0 : 0x00000001 A1 : 0x00000000
A2 : 0x00000000 A3 : 0x3fcb66c4 A4 : 0x3fcb65d8 A5 : 0x3fcb66c0
A6 : 0x3c12f050 A7 : 0x00000073 S2 : 0x3fc9e394 S3 : 0x420d6d48
0x420d6d48: __sfputs_r at /builds/idf/crosstool-NG/.build/riscv32-esp-elf/src/newlib/newlib/libc/stdio/nano-vfprintf.c:407

S4 : 0x00000001 S5 : 0x00000001 S6 : 0x3c12f000 S7 : 0x3c12f000
S8 : 0x420d7000 S9 : 0x00000025 S10 : 0x3c12f000 S11 : 0x00000001
0x420d7000: _vfprintf_r at /builds/idf/crosstool-NG/.build/riscv32-esp-elf/src/newlib/newlib/libc/stdio/nano-vfprintf.c:609

T3 : 0x00000000 T4 : 0x00001dce T5 : 0x00000000 T6 : 0x00000000
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000005 MTVAL : 0x00000001
0x40380001: _vector_table at ??:?

MHARTID : 0x00000000

Backtrace:

0x40058766 in ?? ()
#0 0x40058766 in ?? ()
#1 0x420d7ab6 in _printf_i (data=0x3fcb69a4, pdata=0x3fcb65e0, fp=0x3fc9e394, pfunc=0x420d6d48 <__sfputs_r>, ap=) at /builds/idf/crosstool-NG/.build/riscv32-esp-elf/src/newlib/newlib/libc/stdio/nano-vfprintf_i.c:219
#2 0x00000000 in ?? ()
Backtrace stopped: frame did not save the PC
ELF file SHA256: 6c518fd84ce5f65b

Rebooting...
ESP-ROM:esp32c3-api1-20210207

@aggaddam
Copy link
Author

aggaddam commented Apr 10, 2023

@AxelLin

Enabling nano lib format i.e.NEWLIB_NANO_FORMAT=y might be causing this issue.
Please try disabling NEWLIB_NANO_FORMAT i.e NEWLIB_NANO_FORMAT=n till fix is available.

Note: Disabling NEWLIB_NANO_FORMAT might increase the image binary size.

@AxelLin
Copy link
Contributor

AxelLin commented Apr 10, 2023

@AxelLin

Enabling nano lib format i.e.NEWLIB_NANO_FORMAT=y might be causing this issue. Please try disabling NEWLIB_NANO_FORMAT i.e NEWLIB_NANO_FORMAT=n

@aggaddam NEWLIB_NANO_FORMAT=n is a workaround, not a real fix!

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Selected for Development Issue is selected for development Status: Reviewing Issue is being reviewed labels May 5, 2023
espressif-bot pushed a commit that referenced this issue May 9, 2023
Newlib nano printf formatting do not support %z, and will crash if such an identifier
is followed by a %s indentifier.

Closes #9631
@josef2600
Copy link

josef2600 commented May 10, 2023

hi, i am working with Arduino, and nop! it is not fixed. i have it when using info. i am using ESP32-C3.
Guru Meditation Error: Core 0 panic'ed (Load access fault). Exception was unhandled.
i don't know how can i disable NEWLIB_NANO_FORMAT either. any help would be appreciated. thanks.

@aggaddam
Copy link
Author

@josef2600 You can try the below steps to disable it

  1. idf.py menuconfig → Component config → Newlib
  2. Uncheck Enable Nano Formatting if checked already

image

@ESP-Marius
Copy link
Collaborator

@josef2600 As far as I know the arduino library does not come with NEWLIB_NANO_FORMAT active. 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.

@igrr
Copy link
Member

igrr commented May 11, 2023

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
Copy link

@josef2600 You can try the below steps to disable it

1. idf.py menuconfig  → Component config → Newlib

2. Uncheck Enable Nano Formatting if checked already

image

thanks, but i am not on IDF, i work with Arduino.

@josef2600 As far as I know the arduino library does not come with NEWLIB_NANO_FORMAT active. 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.

thanks, and yes it has it. i found them in libraries, they are using them to see if it is defined, then change some registers. but i didn't fined where the main thing is defined. just found thinks like #ifdef NEWLIB_NANO_FORMAT .

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.

thank you for your info, but this is a little beside the point. i am using uart in my code and using it for debug (info) too. it hangs while using the serial port. read this issue and you get the point. i have search for a week in internet and in datasheet and nothing works for preventing for clashing the uart. since esp32 uses RTOS and it is using serial port and i am using serial port, it is possible that program tries to access the serial port from different parts of program in the same time and it causes the chip to crash. at lest, it is my theory! in other microcontrollers, i can check to see if uart is busy or not then send data to it. but in Arduino, i couldn't find the damn thing!

espressif-bot pushed a commit that referenced this issue May 14, 2023
Newlib nano printf formatting do not support %z, and will crash if such an identifier
is followed by a %s indentifier.

Closes #9631
@ESP-Marius
Copy link
Collaborator

thank you for your info, but this is a little beside the point. i am using uart in my code and using it for debug (info) too. it hangs while using the serial port. read this issue and you get the point. i have search for a week in internet and in datasheet and nothing works for preventing for clashing the uart. since esp32 uses RTOS and it is using serial port and i am using serial port, it is possible that program tries to access the serial port from different parts of program in the same time and it causes the chip to crash. at lest, it is my theory! in other microcontrollers, i can check to see if uart is busy or not then send data to it. but in Arduino, i couldn't find the damn thing!

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

@josef2600
Copy link

josef2600 commented May 16, 2023

thank you. i used xQueueSend and xQueueReceive, it is fixed now. my main problem with Queue was the priority of the tasks. when i put them all low, it all fixed.

espressif-bot pushed a commit that referenced this issue Jun 14, 2023
Newlib nano printf formatting do not support %z, and will crash if such an identifier
is followed by a %s indentifier.

Closes #9631
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests