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 #6

Closed
AdySan opened this issue Sep 3, 2016 · 9 comments
Closed

Guru Meditation Error #6

AdySan opened this issue Sep 3, 2016 · 9 comments
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Status: Opened Issue is new

Comments

@AdySan
Copy link

AdySan commented Sep 3, 2016

I just got my Demo board today and followed the steps in this excellent readme.

This part regarding selecting serial port worked well.
ady_2016-sep-02

make flash didn't work a couple of times, but then is suddenly worked and finished correctly

ady_2016-sep-02 2

After that when I reboot the board and look at the serial trace, looks like the chip keep rebooting. Here's the trace

+.@ 0.@ÿÿ?³..Initializing heap allocator:
Region 19: 3FFC0998 len 0001F668 tag 0
Region 25: 3FFE8000 len 00018000 tag 1
Pro cpu up.
Pro cpu start user code
erase sector 5
erase sector 6
erase sector 7
nvs_flash_init
misc_nvs_init g_misc_nvs=0x3ffc0b04
/Users/adityatannu/Developer/esp-idf/components/freertos/./tasks.c:601 (xTaskGenericCreate)- assert failed!
Guru Meditation Error: Core   0 panic'ed.
Register dump:
PC      : Guru Meditation Error of type LoadProhibited occured on core   0. Exception was unhandled.
Register dump:
PC      :  40083842  PS      :  00060033  A0      :  80083a65  A1      :  3ffe3a70  
A2      :  00000000  A3      :  00000002  A4      :  00000000  A5      :  00000000  
A6      :  3f40681c  A7      :  3ff4001c  A8      :  0000007d  A9      :  3ff4001c  
A10     :  3ff4001c  A11     :  3f400284  A12     :  00000000  A13     :  3ffe3ad0  
A14     :  00000000  A15     :  3f406930  SAR     :  0000001b  EXCCAUSE:  0000001c  
EXCVADDR:  00000004  LBEG    :  4000c2e0  LEND    :  4000c2f6  LCOUNT  :  00000000  
Rebooting...
����Ĥ���§å¤bb¥äÄ�&a..À¦çäĤÄ.b..#.A#cÀb姦Åä��."àÄ�bÅg¤åÄ���¥��Äd¤åÄ�¦��¥��Ä��¥��Ä��¥��D.ä@.æå�¦§bæ��¦¥��Ä�çD.äÄ¥¥��Æä§�E.äÄ�¤��Æä§ÅF.äÄ�Ä��Æä�¥bä¤�Ä�Ä�¥bcä¥FCc�f�§ÅçççççççççççççççççççbcÄcä¥æ���ÄÄæ���¥¦..¥����Gc�f�§Å����¤�¤ç�¦¤äǧ����äbcÄcä¥æ�������¥æ�&äÄ�����Gc�f�§ÅçççççççççççççççççççbcÄc䥦ÇÄ��Æ�¥�åÅbbcÄcä¥�$@$�������BGc�f�§Å�.�â����ä.bbcÄcä¥�$@$�Å$æ��DAc�f�§Å���æ��ÅäbcÄc䥦���������.�������À�$�£¥��Dä�Fc�f�§Å�¤¤äÅ�������§�����������������bcÄcä¥��¥�������$�������������������Dc�f�§Å¤¤¦�������ÁÁ��������¤���������bcÄcä¥.�ä����æ��ÅDc�f�§Åâ�æ������æ��ä¥������bcÄc䥦¤Äç����ÅÄ����¤�¤������Å���¥ÄĤ�¤�bcÄc䥦¤Äç����ÅÄ����¤�¤�¦����Å����¥Ä¤�¥��Dc�f�§Å��æ�å��¤���ÄÄ���ÅÄ¥¥¥�¤æÄÄ�����¥ÅÄ�Dc�öì.�.ï§.â��ÆǧÄ��Äæ�äåb�Åç�æ¤!�Æ�����¡Å�¤�b�Åç¤ä¤!À���������¤�b ����G.å¤�¤�����å�b¤¤���§�b¤¤���§¤b¤¤��

Did I do something wrong?

@AdySan
Copy link
Author

AdySan commented Sep 3, 2016

FWIW, I did not rebuild the toolchain, just got the binaries from the espressif server.

@Spritetm
Copy link
Member

Spritetm commented Sep 3, 2016

tasks.c:601 is configASSERT( (xCoreID>=0 && xCoreID<portNUM_PROCESSORS) || (xCoreID==tskNO_AFFINITY) );

it looks like you're trying to start a process on core 2 while FreeRTOS only has one core. Can you check in menuconfig if components->esp32->reserve memory for 2 cores is enabled, and components->freertos->run freertos only on first core is disabled?

By the way, 'guru meditation error' is basically a panic or unhandled exception.

@AdySan
Copy link
Author

AdySan commented Sep 3, 2016

Tried removing wifi as @igrr suggested on Twitter, and it works now

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:QIO, clock div:2
load:0x3ffc0000,len:0
load:0x3ffc0000,len:2312
load:0x40078000,len:3788
load:0x40098000,len:532
entry 0x4009813c
.[1;36m

.[0m.[1;36m**************************************
.[0m.[1;36m*       hello espressif ESP32!       *
.[0m.[1;36m*        2nd boot is running!        *
.[0m.[1;36m*            version (V0.1)          *
.[0m.[1;36m**************************************
.[0m.[0;36mcompile time 22:31:01

.[0m.[0;36m  SPI Speed      : 40MHz
.[0m.[0;36m  SPI Mode       : QIO
.[0m.[0;36m  SPI Flash Size : 4MB
.[0m.[1;36mPartition Table:
.[0m.[1;36m## Label            Usage          Type ST Offset   Length
.[0m.[1;36m 0 factory          factory app      00 00 00010000 00100000
.[0m.[1;36m 1 rfdata           RF data          01 01 00110000 00040000
.[0m.[1;36m 2 wifidata         WiFi data        01 02 00150000 00040000
.[0m.[1;36mEnd of partition table
.[0m.[1;36mLoading app partition at offset 00010000
.[0m.[0;36msection 0: paddr=0x00000020 vaddr=0x00000000 size=0x0ffe8 ( 65512) 
.[0m.[0;36msection 1: paddr=0x00010010 vaddr=0x3f400010 size=0x00d48 (  3400) map
.[0m.[0;36msection 2: paddr=0x00010d60 vaddr=0x3ffb03f0 size=0x009ac (  2476) load
.[0m.[0;36msection 3: paddr=0x00011714 vaddr=0x40080000 size=0x00400 (  1024) load
.[0m.[0;36msection 4: paddr=0x00011b1c vaddr=0x40080400 size=0x03718 ( 14104) load
.[0m.[0;36msection 5: paddr=0x0001523c vaddr=0x00000000 size=0x0add4 ( 44500) 
.[0m.[0;36msection 6: paddr=0x00020018 vaddr=0x400d0018 size=0x04430 ( 17456) map
.[0m.[0;36mstart: 0x400806e4

.[0mInitializing heap allocator:
Region 19: 3FFB0D9C len 0002F264 tag 0
Region 25: 3FFE8000 len 00018000 tag 1
Pro cpu up.
Pro cpu start user code
ping
ping
ping
ping
ping

@AdySan AdySan closed this as completed Sep 3, 2016
@igrr
Copy link
Member

igrr commented Sep 3, 2016

Another possible option — we have changed the "no affinity" constant in
master but wifi libs haven't been updated there yet.

On Sat, Sep 3, 2016, 13:29 Jeroen Domburg notifications@github.com wrote:

tasks.c:601 is configASSERT( (xCoreID>=0 && xCoreID<portNUM_PROCESSORS) ||
(xCoreID==tskNO_AFFINITY) );

it looks like you're trying to start a process on core 2 while FreeRTOS
only has one core. Can you check in menuconfig if
components->esp32->reserve memory for 2 cores is enabled, and
components->freertos->run freertos only on first core is disabled?

By the way, 'guru meditation error' is basically a panic or unhandled
exception.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#6 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEJcenjGNE9MfnRXd20zGcA6LnMiHQB8ks5qmQWdgaJpZM4J0Ohe
.

@Spritetm
Copy link
Member

Spritetm commented Sep 3, 2016

Oooh, that'll break stuff indeed.

@AdySan
Copy link
Author

AdySan commented Sep 3, 2016

Yeah, @Spritetm's suggestion kinda fixed the issue too, but I get quite a long trace before getting to the app.

ø.ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:QIO, clock div:2
load:0x3ffc0000,len:0
load:0x3ffc0000,len:2312
load:0x40078000,len:3788
load:0x40098000,len:532
entry 0x4009813c
.[1;36m

.[0m.[1;36m**************************************
.[0m.[1;36m*       hello espressif ESP32!       *
.[0m.[1;36m*        2nd boot is running!        *
.[0m.[1;36m*            version (V0.1)          *
.[0m.[1;36m**************************************
.[0m.[0;36mcompile time 22:35:44

.[0m.[0;36m  SPI Speed      : 40MHz
.[0m.[0;36m  SPI Mode       : QIO
.[0m.[0;36m  SPI Flash Size : 4MB
.[0m.[1;36mPartition Table:
.[0m.[1;36m## Label            Usage          Type ST Offset   Length
.[0m.[1;36m 0 factory          factory app      00 00 00010000 00100000
.[0m.[1;36m 1 rfdata           RF data          01 01 00110000 00040000
.[0m.[1;36m 2 wifidata         WiFi data        01 02 00150000 00040000
.[0m.[1;36mEnd of partition table
.[0m.[1;36mLoading app partition at offset 00010000
.[0m.[0;36msection 0: paddr=0x00000020 vaddr=0x00000000 size=0x0ffe8 ( 65512) 
.[0m.[0;36msection 1: paddr=0x00010010 vaddr=0x3f400010 size=0x085f0 ( 34288) map
.[0m.[0;36msection 2: paddr=0x00018608 vaddr=0x3ffbf790 size=0x0162c (  5676) load
.[0ml;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@`3.@.l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@`3.@.l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@`3.@.l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@`3.@.l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@l;.@`3.@.Initializing heap allocator:
Region 19: 3FFC0DBC len 0001F244 tag 0
Region 25: 3FFE8000 len 00018000 tag 1
Pro cpu up.
Starting app cpu, entry point is 0x40080778
App cpu up.
Pro cpu start user code
erase sector 5
erase sector 6
erase sector 7
nvs_flash_init
misc_nvs_init g_misc_nvs=0x3ffc0f28
frc2_timer_task_hdl:3ffc18c4, prio:22, stack:2048
tcpip_task_hdlxxx : 3ffc33ac, prio:20,stack:2048
Core0 started initializing FreeRTOS. Jumpinwito_icht uwif. 
nit start, config=0x3ffc4880
wifi_mac_init sta 18:fe:34:6a:87:40
wifi_mac_init ap  1a:fe:34:6a:87:40
wifi_nvs_init init nvs start
wifi_nvs_init init nvs - open nvs namespace=nvs.net80211 ok, handle=0x00000002
wifi_nvs_load nvs load:0-0-opmode-0-1-(0-3-2)-0x3ffb02f0-2
wifi_nvs_load, get_u8 fail, key=opmode index=0 not found
wifi_nvs_load use default value=2 ret=0
wifi_nvs_load nvs load:1-1-country-0-1-(0-3-0)-0x3ffb02f1-2
wifi_nvs_load, get_u8 fail, key=country index=1 not found
wifi_nvs_load use default value=0 ret=0
wifi_nvs_load nvs load:2-2-sta.ssid-7-36-(0-0-0)-0x3ffb02f4-2
wifi_nvs_load not found key, default to 0xff
wifi_nvs_load nvs load:3-3-sta.mac-7-6-(0-0-0)-0x3ffb0318-2
wifi_nvs_load not found key, default to 0xff
wifi_nvs_load nvs load:4-4-sta.authmode-0-1-(1-7-1)-0x3ffb031e-2
wifi_nvs_load, get_u8 fail, key=sta.authmode index=4 not found
wifi_nvs_load use default value=1 ret=0
wifi_nvs_load nvs load:5-5-sta.pswd-6-65-(0-0-0)-0x3ffb031f-2
wifi_nvs_load not found key, default to 0xff
wifi_nvs_load nvs load:6-6-sta.pmk-7-32-(0-0-0)-0x3ffb0360-2
wifi_nvs_load not found key, default to 0xff
wifi_nvs_load nvs load:7-7-sta.chan-0-1-(1-14-1)-0x3ffb0380-2
wifi_nvs_load, get_u8 fail, key=sta.chan index=7 not found
wifi_nvs_load use default value=1 ret=0
wifi_nvs_load nvs load:8-8-auto.conn-0-1-(0-1-1)-0x3ffb0381-2
wifi_nvs_load, get_u8 fail, key=auto.conn index=8 not found
wifi_nvs_load use default value=1 ret=0
wifi_nvs_load nvs load:9-9-bssid.set-0-1-(0-1-0)-0x3ffb0382-2
wifi_nvs_load, get_u8 fail, key=bssid.set index=9 not found
wifi_nvs_load use default value=0 ret=0
wifi_nvs_load nvs load:10-10-sta.bssid-7-6-(0-0-0)-0x3ffb0383-2
wifi_nvs_load not found key, default to 0xff
wifi_nvs_load nvs load:11-11-sta.phym-0-1-(1-3-3)-0x3ffb0389-2
wifi_nvs_load, get_u8 fail, key=sta.phym index=11 not found
wifi_nvs_load use default value=3 ret=0
wifi_nvs_load nvs load:12-12-sta.phybw-0-1-(1-3-2)-0x3ffb038a-2
wifi_nvs_load, get_u8 fail, key=sta.phybw index=12 not found
wifi_nvs_load use default value=2 ret=0
wifi_nvs_load nvs load:13-13-sta.apsw-7-2-(0-0-0)-0x3ffb038b-2
wifi_nvs_load not found key, default to 0xff
wifi_nvs_load nvs load:14-14-sta.apinfo-7-700-(0-0-0)-0x3ffb0390-2
wifi_nvs_load not found key, default to 0xff
wifi_nvs_load nvs load:15-15-ap.ssid-7-36-(0-0-0)-0x3ffb064c-2
wifi_nvs_load not found key, default to 0xff
wifi_nvs_load nvs load:16-16-ap.mac-7-6-(0-0-0)-0x3ffb0670-2
wifi_nvs_load not found key, default to 0xff
wifi_nvs_load nvs load:17-17-ap.passwd-6-65-(0-0-0)-0x3ffb0676-2
wifi_nvs_load not found key, default to 0xff
wifi_nvs_load nvs load:18-18-ap.pmk-6-32-(0-0-0)-0x3ffb06b7-2
wifi_nvs_load not found key, default to 0xff
wifi_nvs_load nvs load:19-19-ap.chan-0-1-(1-14-14)-0x3ffb06d7-2
wifi_nvs_load, get_u8 fail, key=ap.chan index=19 not found
wifi_nvs_load use default value=14 ret=0
wifi_nvs_load nvs load:20-20-ap.authmode-0-1-(0-5-0)-0x3ffb06d8-2
wifi_nvs_load, get_u8 fail, key=ap.authmode index=20 not found
wifi_nvs_load use default value=0 ret=0
wifi_nvs_load nvs load:21-21-ap.hidden-0-1-(0-1-0)-0x3ffb06d9-2
wifi_nvs_load, get_u8 fail, key=ap.hidden index=21 not found
wifi_nvs_load use default value=0 ret=0
wifi_nvs_load nvs load:22-22-ap.max.conn-0-1-(1-4-4)-0x3ffb06da-2
wifi_nvs_load, get_u8 fail, key=ap.max.conn index=22 not found
wifi_nvs_load use default value=4 ret=0
wifi_nvs_load nvs load:23-23-bcn.interval-2-2-(10-65535-100)-0x3ffb06dc-2
wifi_nvs_load, get_u8 fail, key=bcn.interval index=23 not found
wifi_nvs_load use default value=100 ret=0
wifi_nvs_load nvs load:24-24-ap.phym-0-1-(1-3-3)-0x3ffb06de-2
wifi_nvs_load, get_u8 fail, key=ap.phym index=24 not found
wifi_nvs_load use default value=3 ret=0
wifi_nvs_load nvs load:25-25-ap.phybw-0-1-(1-3-2)-0x3ffb06df-2
wifi_nvs_load, get_u8 fail, key=ap.phybw index=25 not found
wifi_nvs_load use default value=2 ret=0
wifi_nvs_load nvs load:26-26-ap.sndchan-0-1-(1-2-1)-0x3ffb06e0-2
wifi_nvs_load, get_u8 fail, key=ap.sndchan index=26 not found
wifi_nvs_load use default value=1 ret=0
wifi_nvs_validate_country nvs load, country=0 chan range [1 13]
wifi_set_default_ssid default ap ssid=ESP_6A8740
wifi_nvs_validate_ap_ssid ap ssid: ESP_6A8740
wifi_nvs_set index=19 value=1 flag=1
wifi_nvs_validate_ap_chan home channel:1
wifi_nvs_load nvs load, commit 0
wifi_nvs_init init nvs done, ret=0
wifi_nvs_set index=3 value=0x3ffbec5a flag=1
wifi_nvs_set index=16 value=0x3ffbec54 flag=1

rc_cal: rc=84, wifi: 66, 66, 24, 24, bt: 86, 86
txcap: 11, 7, 3, 11, 7, 2, 7, 5, 2, 7, 5, 2, 
vdd33=3180, -3; temp_code=82
0x5f, 0x120, 22
0x5f, 0x120, 22
tx_pwctrl:-4, -1, 2, 8, 12, 19, -2, 1, 5, 10, 14, 21, 1, 5, 8, 13, 17, 24, 3, 6, 10, 15, 18, 26, 
tx_backoff:0, 0, 0, 0, 
txiq: 0, 52, 0, 0, 2
txiq: 1, 52, 0, 1, 1
txiq: 2, 20, 0, -2, 2
tx_gain: pa=0x5f, bbc=0x20, bbf=0x4
bt: pa=0x50, bb=0,21
rx_gain_index: 38
5408371, 5046960, 4528294, rxdc_index: 58, 168
rx_gain_index: 30
5026628, 4455776, 3881304, rxdc_index: 58, 168
nf: -378, -379, -387, 0x0, -387
phy_version: 1032, Aug 15 2016, 16:50:08
ieee80211_ifattach sta=0x00000000 ap=0x00000000
chm_init ic=0x3ffbeb20
chm_chan_init chan1 freq=2412 ch_flags=83
chm_chan_init chan2 freq=2417 ch_flags=83
chm_chan_init chan3 freq=2422 ch_flags=83
chm_chan_init chan4 freq=2427 ch_flags=83
chm_chan_init chan5 freq=2432 ch_flags=83
chm_chan_init chan6 freq=2437 ch_flags=83
chm_chan_init chan7 freq=2442 ch_flags=83
chm_chan_init chan8 freq=2447 ch_flags=83
chm_chan_init chan9 freq=2452 ch_flags=83
chm_chan_init chan10 freq=2457 ch_flags=83
chm_chan_init chan11 freq=2462 ch_flags=83
chm_chan_init chan12 freq=2467 ch_flags=83
chm_chan_init chan13 freq=2472 ch_flags=83
chm_chan_init chan14 freq=2484 ch_flags=83
chm_init init home/current ch=1 width=0 dwell_timer=0x3ffb094c
ieee80211_scan_attach ieee80211_scan_attach hint=255 maxact_dur=120 minact_dur=120 pas_dur=360 nchans=14 history_num=0
ic_set_rx_policy i=0 beacon=0 bc=0 uc=0
ic_set_rx_policy old 600330d8=7155 60033024=1ffff 60033064=1ffff
ic_set_rx_policy new 600330d8=7145 60033024=ffff 60033064=ffff
ic_set_rx_policy bss 0:0
ic_set_rx_policy i=1 beacon=0 bc=0 uc=0
ic_set_rx_policy old 600330dc=7155 6003302c=0 6003306c=0
ic_set_rx_policy new 600330dc=7145 6003302c=0 6003306c=0
ic_set_rx_policy bss 0:0
pp_task_hdl : 3ffc6bfc, prio:23, stack:2048
chip_init s=0
wifi_set_rx_policy set mac i=0 18:fe:34:6a:87:40
wifi_set_rx_policy set mac i=1 1a:fe:34:6a:87:40
wifi_set_rx_policy rx policy i=0 beacon=0 bc=0 uc=0
ic_set_rx_policy i=0 beacon=0 bc=0 uc=0
ic_set_rx_policy old 600330d8=7145 60033024=ffff 60033064=1ffff
ic_set_rx_policy new 600330d8=7145 60033024=ffff 60033064=ffff
ic_set_rx_policy bss 0:0
wifi_set_rx_policy rx policy i=1 beacon=0 bc=0 uc=0
ic_set_rx_policy i=1 beacon=0 bc=0 uc=0
ic_set_rx_policy old 600330dc=7145 6003302c=0 6003306c=1ffff
ic_set_rx_policy new 600330dc=7145 6003302c=0 6003306c=ffff
ic_set_rx_policy bss 0:0
wifi_init init event q=0x3ffc1a3c
wifi_init wifi init done
ping

@igrr
Copy link
Member

igrr commented Sep 3, 2016

Some logs to be removed, yeah.

@ESP32DE
Copy link
Contributor

ESP32DE commented Sep 4, 2016

@AdySan, Guys please :)
the staff have make nice ANSI prints in this - please - use onetime ANSI Term emmulation for the colours in boot and "OCD debugger". 👍 this would be great!
best wishes
rudi ;-)

igrr pushed a commit that referenced this issue Sep 6, 2016
@projectgus
Copy link
Contributor

master branch should now be updated to avoid the configuration combination that caused this error loop. Thanks for reporting the bug in the first place!

tim-nordell-nimbelink added a commit to tim-nordell-nimbelink/esp-idf that referenced this issue Feb 28, 2019
It's possible for esp_pm_impl_isr_hook(...) to be nested due to the fact
that interrupts are nested on the ESP32.  To fix this we need to place the
acquiring of the lock into a critical section to ensure it does not get
nested on the system, otherwise the system will never release the idle
lock when this occurs and will not go into lower power states.

A sample backtrace encountering this (the code was instrumented to go into
a while(1) loop when the condition was hit to get this backtrace) from
commit d7a7a68:

    #0  leave_idle () at esp-idf/components/esp32/pm_esp32.c:444
    espressif#1  0x4008143a in esp_pm_impl_isr_hook () at esp-idf/components/esp32/pm_esp32.c:473
    espressif#2  0x40082750 in _xt_medint2 () at esp-idf/components/freertos/xtensa_vectors.S:1243
    espressif#3  0x4000bff0 in ?? ()
    espressif#4  0x40090bb0 in vTaskExitCritical (mux=0x3ffbd230) at esp-idf/components/freertos/tasks.c:4304
    espressif#5  0x40081758 in esp_pm_lock_acquire (handle=0x3ffbd218) at esp-idf/components/esp32/pm_locks.c:126
    espressif#6  0x40081399 in leave_idle () at esp-idf/components/esp32/pm_esp32.c:440
    espressif#7  0x4008143a in esp_pm_impl_isr_hook () at esp-idf/components/esp32/pm_esp32.c:473
    espressif#8  0x400826b8 in _xt_lowint1 () at esp-idf/components/freertos/xtensa_vectors.S:1154
    espressif#9  0x400d14b0 in esp_pm_impl_waiti () at esp-idf/components/esp32/pm_esp32.c:483
    espressif#10 0x400d2c77 in esp_vApplicationIdleHook () at esp-idf/components/esp32/freertos_hooks.c:63
    espressif#11 0x40091008 in prvIdleTask (pvParameters=0x0) at esp-idf/components/freertos/tasks.c:3412
    espressif#12 0x40090344 in vPortTaskWrapper (pxCode=0x40090ffc <prvIdleTask>, pvParameters=0x0) at esp-idf/components/freertos/port.c:143

Signed-off-by: Tim Nordell <tim.nordell@nimbelink.com>
0xFEEDC0DE64 pushed a commit to 0xFEEDC0DE64/esp-idf that referenced this issue May 5, 2021
…#3752)

This patch fixes update timeouts (error espressif#6) on slow HTTP/HTTPS links.
@espressif-bot espressif-bot added the Status: Opened Issue is new label Nov 17, 2021
@espressif-bot espressif-bot added Resolution: Won't Do This will not be worked on Status: Done Issue is done internally and removed Status: Opened Issue is new labels Nov 25, 2021
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Status: Opened Issue is new
Projects
None yet
Development

No branches or pull requests

6 participants