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

wifi long running connection break (IDFGH-6226) #7899

Closed
achao1104 opened this issue Nov 15, 2021 · 5 comments
Closed

wifi long running connection break (IDFGH-6226) #7899

achao1104 opened this issue Nov 15, 2021 · 5 comments
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@achao1104
Copy link

Hello,

idf:4.3.1 and module:esp32s2

We used a camera to connect esp32s2 by wifi, it worked, but after a couple of hours, the connection will break, but if the camera connects huawei wifi, it can run for long time without any issue.

Can you think of any reason about it?
Thanks,
Peter

@espressif-bot espressif-bot added the Status: Opened Issue is new label Nov 15, 2021
@github-actions github-actions bot changed the title wifi long running connection break wifi long running connection break (IDFGH-6226) Nov 15, 2021
@TianaESP
Copy link

Hi @achao1104, we cannot get enough info from your current description.
Please provide more info, for example, but not limited to:

  1. The recurrence steps and the rate of the issue
  2. logs, best to be as complete as possible

@achao1104
Copy link
Author

we only have dump log, plese take a look below.

==================== ESP32 CORE DUMP START ====================

Crashed task handle: 0x3ffe3958, name: 'wifi', GDB name: 'process 1073625432'

================== CURRENT THREAD REGISTERS ===================
exccause 0x1d (StoreProhibitedCause)
excvaddr 0x0
epc1 0x0
epc2 0x0
epc3 0x0
epc4 0x0
epc5 0x0
epc6 0x0
epc7 0x0
eps2 0x0
eps3 0x0
eps4 0x0
eps5 0x0
eps6 0x0
eps7 0x40089314
pc 0x4002eae1 0x4002eae1 <panic_abort+21>
lbeg 0x0 0
lend 0x0 0
lcount 0x0 0
sar 0x8 8
ps 0x60823 395299
threadptr
br
scompare1
acclo
acchi
m0
m1
m2
m3
expstate
f64r_lo
f64r_hi
f64s
fcr
fsr
a0 0x8002f25c -2147290532
a1 0x3ffcd8e0 1073535200
a2 0x3ffcd920 1073535264
a3 0x3ffcd96d 1073535341
a4 0xa 10
a5 0x14 20
a6 0x3 3
a7 0x3ffd2ca4 1073556644
a8 0x0 0
a9 0x1 1
a10 0x3ffcd96d 1073535341
a11 0x3ffcd96d 1073535341
a12 0xa 10
a13 0xc 12
a14 0x3 3
a15 0x1c 28

==================== CURRENT THREAD STACK =====================
#0 0x4002eae1 in panic_abort (details=0x3ffcd920 "abort() was called at PC 0x40027357 on core 0") at D:/project/esp32/idf-v4.3.1/components/esp_system/panic.c:379
#1 0x4002f25c in esp_system_abort (details=0x3ffcd920 "abort() was called at PC 0x40027357 on core 0") at D:/project/esp32/idf-v4.3.1/components/esp_system/system_api.c:112
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

======================== THREADS INFO =========================
Id Target Id Frame

  • 1 process 1073625432 0x4002eae1 in panic_abort (details=0x3ffcd920 "abort() was called at PC 0x40027357 on core 0") at D:/project/esp32/idf-v4.3.1/components/esp_system/panic.c:379
    2 process 1073344660 0x4001a8d4 in ?? ()
    3 process 1073598248 0x4002fd12 in xQueueReceive (xQueue=0x3fffd7c0, pvBuffer=0x3ffdcef0, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
    4 process 1073619716 0x4002fd12 in xQueueReceive (xQueue=0x3ffff0d0, pvBuffer=0x3ffe22c0, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
    5 process 1073615272 vTaskDelay (xTicksToDelay=100) at D:/project/esp32/idf-v4.3.1/components/freertos/tasks.c:1530
    6 process 1073347272 0x4010325a in rcUpdateAckSnr () at D:/project/esp32/idf-v4.3.1/components/lwip/port/esp32/freertos/sys_arch.c:152
    7 process 1073345388 0x4002fe66 in xQueueSemaphoreTake (xQueue=0x3ff9ff14, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
    8 process 1073347616 0x40031a50 in prvProcessTimerOrBlockTask (xListWasEmpty=, xNextExpireTime=0) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
    9 process 1073601412 0x4002fd12 in xQueueReceive (xQueue=0x3fffd964, pvBuffer=0x3ffddb10, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
    10 process 1073610536 0x4002fd12 in xQueueReceive (xQueue=0x3fffe020, pvBuffer=0x3ffdfef8, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
    11 process 1073606092 0x4002fd12 in xQueueReceive (xQueue=0x3fffdc14, pvBuffer=0x3ffded90, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33

==================== THREAD 1 (TCB: 0x3ffe3958, name: 'wifi') =====================
#0 0x4002eae1 in panic_abort (details=0x3ffcd920 "abort() was called at PC 0x40027357 on core 0") at D:/project/esp32/idf-v4.3.1/components/esp_system/panic.c:379
#1 0x4002f25c in esp_system_abort (details=0x3ffcd920 "abort() was called at PC 0x40027357 on core 0") at D:/project/esp32/idf-v4.3.1/components/esp_system/system_api.c:112
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

==================== THREAD 2 (TCB: 0x3ff9f094, name: 'esp_timer') =====================
#0 0x4001a8d4 in ?? ()
#1 0x40031ce8 in vPortExitCritical (mux=0x3ffcdfc8 ) at D:/project/esp32/idf-v4.3.1/components/freertos/port/xtensa/port.c:473
#2 0x40031260 in ulTaskNotifyTake (xClearCountOnExit=1, xTicksToWait=4294967295) at D:/project/esp32/idf-v4.3.1/components/freertos/tasks.c:5203
#3 0x4008a346 in timer_task (arg=) at D:/project/esp32/idf-v4.3.1/components/esp_timer/src/esp_timer.c:347

==================== THREAD 3 (TCB: 0x3ffdcf28, name: 'tiT') =====================
#0 0x4002fd12 in xQueueReceive (xQueue=0x3fffd7c0, pvBuffer=0x3ffdcef0, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
#1 0x40036ad8 in sys_arch_mbox_fetch (mbox=, msg=0x3ffdcef0, timeout=180) at D:/project/esp32/idf-v4.3.1/components/lwip/port/esp32/freertos/sys_arch.c:325
#2 0x40036d62 in tcpip_timeouts_mbox_fetch (mbox=, msg=) at D:/project/esp32/idf-v4.3.1/components/lwip/lwip/src/api/tcpip.c:110
#3 tcpip_thread (arg=) at D:/project/esp32/idf-v4.3.1/components/lwip/lwip/src/api/tcpip.c:148

==================== THREAD 4 (TCB: 0x3ffe2304, name: 'uart_event') =====================
#0 0x4002fd12 in xQueueReceive (xQueue=0x3ffff0d0, pvBuffer=0x3ffe22c0, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
#1 0x4009ef88 in esp_handle_uart_pattern (esp_dte=0x3fffe0c0) at ../components/modem/src/esp_modem.c:168

==================== THREAD 5 (TCB: 0x3ffe11a8, name: 'cloud_action_ta') =====================
#0 vTaskDelay (xTicksToDelay=100) at D:/project/esp32/idf-v4.3.1/components/freertos/tasks.c:1530
#1 0x4008dea5 in user_memset (context=, s0=, maxlen=0, s=0x0, d=255 '\377', len=3) at ../main/util.c:498
#2 0x40093d7d in server_send_execute (musthaversp=, recvtimeoutshort=, datalen=, data=, sockin=0x3fd825cc, prefix=0x6159 <error: Cannot access memory at address 0x6159>) at ../main/bizutil.c:398
#3 server_send (sockin=0x3fd825cc, prefix=0x6159 <error: Cannot access memory at address 0x6159>, data=, datalen=, retrytimes=, recvtimeoutshort=, musthaversp=, issetfailed=) at ../main/bizutil.c:418

==================== THREAD 6 (TCB: 0x3ff9fac8, name: 'IDLE') =====================
#0 0x4010325a in rcUpdateAckSnr () at D:/project/esp32/idf-v4.3.1/components/lwip/lwip/src/api/tcpip.c:368
#1 0x400c2a7a in esp_fill_random (buf=, len=1) at D:/project/esp32/idf-v4.3.1/components/esp32s2/hw_random.c:63
#2 0x40030247 in prvIdleTask (pvParameters=) at D:/project/esp32/idf-v4.3.1/components/freertos/tasks.c:3839

==================== THREAD 7 (TCB: 0x3ff9f36c, name: 'main') =====================
#0 0x4002fe66 in xQueueSemaphoreTake (xQueue=0x3ff9ff14, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
#1 0x400947cc in system_sleep () at ../main/bizutil.c:980
#2 0x4008b1c6 in app_main () at ../main/main.c:165
#3 0x40104e5e in main_task (args=) at D:/project/esp32/idf-v4.3.1/components/freertos/port/port_common.c:106

==================== THREAD 8 (TCB: 0x3ff9fc20, name: 'Tmr Svc') =====================
#0 0x40031a50 in prvProcessTimerOrBlockTask (xListWasEmpty=, xNextExpireTime=0) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
#1 prvTimerTask (pvParameters=) at D:/project/esp32/idf-v4.3.1/components/freertos/timers.c:555

==================== THREAD 9 (TCB: 0x3ffddb84, name: 'sys_evt') =====================
#0 0x4002fd12 in xQueueReceive (xQueue=0x3fffd964, pvBuffer=0x3ffddb10, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
#1 0x40104160 in esp_event_loop_create (event_loop_args=, event_loop=0xffffffff) at D:/project/esp32/idf-v4.3.1/components/esp_event/esp_event.c:499
#2 0x401042d3 in esp_event_loop_run (event_loop=0x3fffd948, ticks_to_run=) at D:/project/esp32/idf-v4.3.1/components/esp_event/esp_event.c:608

==================== THREAD 10 (TCB: 0x3ffdff28, name: 'pir_task') =====================
#0 0x4002fd12 in xQueueReceive (xQueue=0x3fffe020, pvBuffer=0x3ffdfef8, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
#1 0x4008dd79 in pir_task (pvParameters=) at ../main/util.c:1198

==================== THREAD 11 (TCB: 0x3ffdedcc, name: 'lora_task') =====================
#0 0x4002fd12 in xQueueReceive (xQueue=0x3fffdc14, pvBuffer=0x3ffded90, xTicksToWait=) at D:/project/esp32/idf-v4.3.1/components/hal/esp32s2/include/hal/cpu_ll.h:33
#1 0x4008f7dd in lora_task (pvParameters=) at ../main/lorautil.c:245

======================= ALL MEMORY REGIONS ========================
Name Address Size Attrs
.rtc.text 0x40070000 0x2c R XA
.rtc.force_fast 0x3ff9e02c 0x0 RW
.rtc.data 0x50000000 0x1c RW A
.rtc_noinit 0x5000001c 0x0 RW
.rtc.force_slow 0x5000001c 0x0 RW
.iram0.vectors 0x40024000 0x403 R XA
.iram0.text 0x40024404 0x1915c R XA
.dram0.data 0x3ffcd560 0x56d0 RW A
.noinit 0x3ffd2c30 0x0 RW
.flash.appdesc 0x3f000020 0x100 R A
.flash.rodata 0x3f000120 0x228d0 RW A
.flash.text 0x40080020 0x88fc7 R XA
.iram0.text_end 0x4003d560 0x0 RW
.dram0.heap_start 0x3ffd81e8 0x0 RW
.coredump.tasks.data 0x3ffe3958 0x154 RW
.coredump.tasks.data 0x3ffe37b0 0x1a0 RW
.coredump.tasks.data 0x3ff9f094 0x154 RW
.coredump.tasks.data 0x3ffd9a50 0x110 RW
.coredump.tasks.data 0x3ffdcf28 0x154 RW
.coredump.tasks.data 0x3ffdcdf0 0x130 RW
.coredump.tasks.data 0x3ffe2304 0x154 RW
.coredump.tasks.data 0x3ffe21f0 0x10c RW
.coredump.tasks.data 0x3ffe11a8 0x154 RW
.coredump.tasks.data 0x3ffe1090 0x110 RW
.coredump.tasks.data 0x3ff9fac8 0x154 RW
.coredump.tasks.data 0x3ff9f9d0 0xf0 RW
.coredump.tasks.data 0x3ff9f36c 0x154 RW
.coredump.tasks.data 0x3ffda9f0 0x174 RW
.coredump.tasks.data 0x3ff9fc20 0x154 RW
.coredump.tasks.data 0x3ffdb2a0 0xc8 RW
.coredump.tasks.data 0x3ffddb84 0x154 RW
.coredump.tasks.data 0x3ffdda30 0x14c RW
.coredump.tasks.data 0x3ffdff28 0x154 RW
.coredump.tasks.data 0x3ffdfe00 0x120 RW
.coredump.tasks.data 0x3ffdedcc 0x154 RW
.coredump.tasks.data 0x3ffdecc0 0x104 RW

===================== ESP32 CORE DUMP END =====================

@MaxwellAlan
Copy link
Collaborator

Hi @achao1104
From your core dump log, we only get that there are some operation in WiFi will cause the stack corruption, but lack of more details in the backtrace, it's hard for us to debug. Can you config the IDF Log level to Debug level, it will show more logs.
And what the camera is? And what operation when the camera connect to ESP32-S2 SoftAP?
Thanks.

@jack0c
Copy link
Collaborator

jack0c commented May 20, 2022

@achao1104 again have you use ADC in your project? please use latest v4.3 and try again.

@Alvin1Zhang
Copy link
Collaborator

Thanks for reporting, feel free to reopen if the issue still happens. Thanks.

@espressif-bot espressif-bot added Resolution: Done Issue is done internally Status: Done Issue is done internally and removed Status: Opened Issue is new labels Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

6 participants