espressif / esp-mdf

Espressif Mesh Development Framework, limited maintain, recommend to use https://github.com/espressif/esp-mesh-lite
Other
774 stars 253 forks source link

Stack overflow in task MTX. #302

Open novflying opened 2 years ago

novflying commented 2 years ago

Hello, what's the MTX task? I think it's inside the wifi mesh library so there is no chance to debug it. I am using a fixed root configuration, the mesh root device is offline, and the log is from a node device which is keep trying to join a mesh network, it keeps scanning 60 times and report a 'No parent found error', after 3 or 4 times, the stack overflows ...

I (63280) wifi:Set ps type: 0

I (63281) mesh: 452<stop>
I (63284) mesh: [SCAN][ch:6]AP:8, other(ID:0, RD:0), MAP:0, idle:0, candidate:0, root:0, topMAP:0[c:0,i:0][90:98:38:58:c2:d4]router found[FIXED-ROOT]<>
I (63305) mesh: [FAIL][184]root:0, fail:184, normal:0

W (63293) mesh: [mesh.c,455] <stop>vendor ie
W (63307) mesh: [mesh.c,458] <stop>send block
W (63318) mesh: [mesh.c,461] <stop>rx task
W (63319) m
***ERROR*** A stack overflow in task MTX has been detected.
Stack dump detected
Core  0 register dump:
MEPC    : 0x403808fc  RA      : 0x4038b1f4  SP      : 0x3fc9b120  GP      : 0x3fc97400
0x403808fc: panic_abort at D:/Projects/ESP/repo/powermagic/esp-idf-v4.4/components/esp_system/panic.c:402

0x4038b1f4: __ubsan_include at D:/Projects/ESP/repo/powermagic/esp-idf-v4.4/components/esp_system/ubsan.c:293

TP      : 0x3fc688d4  T0      : 0x4005890e  T1      : 0x0000000f  T2      : 0x00000001
S0/FP   : 0x00000003  S1      : 0x80000004  A0      : 0x3fc9b160  A1      : 0x3c1d23ec
A2      : 0x0000000b  A3      : 0x3fc9b189  A4      : 0x00000001  A5      : 0x3fca3000
A6      : 0xfa000000  A7      : 0x0000003e  S2      : 0x00001881  S3      : 0x00000001
S4      : 0x00000000  S5      : 0x00000000  S6      : 0x3c225a81  S7      : 0x00000000
S8      : 0x0000000c  S9      : 0x00000000  S10     : 0x3fcc6d34  S11     : 0x00000004
T3      : 0x00000000  T4      : 0x00000000  T5      : 0x00000001  T6      : 0x00000000
MSTATUS : 0x00001801  MTVEC   : 0x40380001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000
0x40380001: _vector_table at ??:?

MHARTID : 0x00000000

Failed to run gdb_panic_server.py script: Command '['riscv32-esp-elf-gdb', '--batch', '-n', 'd:\\projects\\esp\\repo\\powermagic\\esp-mdf\\examples\\smart_lighting\\smartlighting_switch\\build\\smartlighting_node.elf', '-ex', 'target remote | "D:\\Projects\\ESP\\repo\\.espressif\\python_env\\idf4.4_py3.8_env\\Scripts\\python.exe" "D:\\Projects\\ESP\\repo\\powermagic\\esp-idf-v4.4\\tools\\idf_monitor_base\\..\\gdb_panic_server.py" --target esp32c3 "C:\\Users\\T480S\\AppData\\Local\\Temp\\tmpyqlq13oo"', '-ex', 'bt']' returned non-zero exit status 1.
b'error starting child process \'"D:\\Projects\\ESP\\repo\\.espressif\\python_env\\idf4.4_py3.8_env\\Scripts\\python.exe" "D:\\Projects\\ESP\\repo\\powermagic\\esp-idf-v4.4\\tools\\idf_monitor_base\\..\\gdb_panic_server.py" --target esp32c3 "C:\\Users\\T480S\\AppData\\Local\\Temp\\tmpyqlq13oo"\': CreateProcess: No such file or directory\r\nNo stack.\r\n'

Core  0 register dump:
MEPC    : 0x403808fc  RA      : 0x4038b1f4  SP      : 0x3fc9b120  GP      : 0x3fc97400
TP      : 0x3fc688d4  T0      : 0x4005890e  T1      : 0x0000000f  T2      : 0x00000001
S0/FP   : 0x00000003  S1      : 0x80000004  A0      : 0x3fc9b160  A1      : 0x3c1d23ec
A2      : 0x0000000b  A3      : 0x3fc9b189  A4      : 0x00000001  A5      : 0x3fca3000
A6      : 0xfa000000  A7      : 0x0000003e  S2      : 0x00001881  S3      : 0x00000001
S4      : 0x00000000  S5      : 0x00000000  S6      : 0x3c225a81  S7      : 0x00000000
S8      : 0x0000000c  S9      : 0x00000000  S10     : 0x3fcc6d34  S11     : 0x00000004
T3      : 0x00000000  T4      : 0x00000000  T5      : 0x00000001  T6      : 0x00000000
MSTATUS : 0x00001801  MTVEC   : 0x40380001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000
MHARTID : 0x00000000

Stack memory:
3fc9b120: 0x00000000 0x00000000 0x00000019 0x83a53eb3 0x4003ed0c 0x3fca342c 0x00000000 0x83a53eb3
3fc9b140: 0x00000003 0x00000001 0x3fcbc28c 0x40390166 0x00000019 0x3c1d23b0 0x3fcc74f4 0x3c1d23d8
3fc9b160: 0x452a2a2a 0x524f5252 0x202a2a2a 0x74732041 0x206b6361 0x7265766f 0x776f6c66 0x206e6920
3fc9b180: 0x6b736174 0x58544d20 0x73616820 0x65656220 0x6564206e 0x74636574 0x002e6465 0x00000000
3fc9b1a0: 0x00000000 0x00000000 0x00000000 0x83a53eb3 0x00001881 0x80000003 0x00000000 0x4038dc5c
3fc9b1c0: 0x00001881 0x80000004 0x00000000 0x83a53eb3 0x00000000 0x40382818 0x3fca342c 0x4038b294
3fc9b1e0: 0x403801b8 0x00000000 0x00000001 0x4038019c 0x00000001 0x3fc9b1f8 0xffffffff 0x3fcaaebc
3fc9b200: 0x3fcaaebc 0x00000000 0x3fc9b20c 0xffffffff 0x3fc9b20c 0x3fc9b20c 0x00000000 0x3fc9b220
3fc9b220: 0xffffffff 0x3fc9b220 0x3fc9b220 0x00000000 0x3fc9b234 0xffffffff 0x3fc9b234 0x3fc9b234
3fc9b240: 0x00000000 0x3fc9b248 0xffffffff 0x3fc9b248 0x3fc9b248 0x00000000 0x3fc9b25c 0xffffffff
3fc9b260: 0x3fc9b25c 0x3fc9b25c 0x00000000 0x3fc9b270 0xffffffff 0x3fc9b270 0x3fc9b270 0x00000000
3fc9b280: 0x3fc9b284 0xffffffff 0x3fc9b284 0x3fc9b284 0x00000000 0x3fc9b298 0xffffffff 0x3fc9b298
3fc9b2a0: 0x3fc9b298 0x00000000 0x3fc9b2ac 0xffffffff 0x3fc9b2ac 0x3fc9b2ac 0x00000000 0x3fc9b2c0
3fc9b2c0: 0xffffffff 0x3fc9b2c0 0x3fc9b2c0 0x00000000 0x3fc9b2d4 0xffffffff 0x3fc9b2d4 0x3fc9b2d4
3fc9b2e0: 0x00000000 0x3fc9b2e8 0xffffffff 0x3fc9b2e8 0x3fc9b2e8 0x00000002 0x3fc9b2fc 0xffffffff
3fc9b300: 0x3fcc822c 0x3fcc74c4 0x00000000 0x3fc9b310 0xffffffff 0x3fc9b310 0x3fc9b310 0x00000000
3fc9b320: 0x3fc9b324 0xffffffff 0x3fc9b324 0x3fc9b324 0x00000000 0x3fc9b338 0xffffffff 0x3fc9b338
3fc9b340: 0x3fc9b338 0x00000000 0x3fc9b34c 0xffffffff 0x3fc9b34c 0x3fc9b34c 0x00000000 0x3fc9b360
3fc9b360: 0xffffffff 0x3fc9b360 0x3fc9b360 0x00000000 0x3fc9b374 0xffffffff 0x3fc9b374 0x3fc9b374
3fc9b380: 0x00000000 0x3fc9b388 0xffffffff 0x3fc9b388 0x3fc9b388 0x00000000 0x3fc9b39c 0xffffffff
3fc9b3a0: 0x3fc9b39c 0x3fc9b39c 0x00000000 0x3fc9b3b0 0xffffffff 0x3fc9b3b0 0x3fc9b3b0 0x00000000
3fc9b3c0: 0x3fc9b3c4 0xffffffff 0x3fc9b3c4 0x3fc9b3c4 0x00000000 0x3fc9b3d8 0xffffffff 0x3fc9b3d8
3fc9b3e0: 0x3fc9b3d8 0x00000006 0x3fc9b3ec 0xffffffff 0x3fcab624 0x3fcbf458 0x00000000 0x3fc9b400
3fc9b400: 0xffffffff 0x3fc9b400 0x3fc9b400 0x00000000 0x3fc9b414 0xffffffff 0x3fc9b414 0x3fc9b414
3fc9b420: 0x00000008 0x3fc9b428 0xffffffff 0x3fcbd4a0 0x3fcc3a58 0x00000001 0x3fc9b43c 0xffffffff
3fc9b440: 0x3fcc9514 0x3fcc9514 0x00000001 0x0000f464 0x3fcad488 0x00000000 0x00000004 0x000000c8
3fc9b460: 0x3fcad488 0x00000000 0x00000001 0x0000ec94 0x3fcad488 0x00000000 0x00000004 0x00000320
3fc9b480: 0x3fcad488 0x00000000 0x00000001 0x0000ed5c 0x3fcad488 0x00000000 0x00000004 0x000000c8
3fc9b4a0: 0x3fcad488 0x00000000 0x00000001 0x0000f07c 0x3fcad488 0x00000000 0x00000004 0x00000320
3fc9b4c0: 0x3fcad488 0x00000000 0x00000001 0x0000f144 0x3fcad488 0x00000000 0x00000004 0x000000c8
3fc9b4e0: 0x3fcad488 0x00000000 0x00000004 0x3fc9b4f0 0xffffffff 0x3fcad48c 0x3fcc3bbc 0x00000000
3fc9b500: 0x3fc9b504 0xffffffff 0x3fc9b504 0x3fc9b504 0x3fc9b448 0x3fc9b458 0x3fc9b4e8 0x3fc9b448