-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
w5500 phy core dump (IDFGH-5876) #7575
Comments
the full list as blow =============================================================== Crashed task handle: 0x3ffdce90, name: 'tiT', GDB name: 'process 1073598096' ================== CURRENT THREAD REGISTERS =================== ==================== CURRENT THREAD STACK ===================== ======================== THREADS INFO =========================
==================== THREAD 1 (TCB: 0x3ffdce90, name: 'tiT') ===================== ==================== THREAD 2 (TCB: 0x3ff9fb8c, name: 'Tmr Svc') ===================== |
esp32s2+w5500 |
idf verson v4.3.1 release |
add more log. assertion "dhcp_inc_pcb_refcount(): memory leak" failed: file "D:/project/esp32/es-idf-v4.3-release/components/lwip/lwip/src/core/ipv4/dhcp.c", line 232, function: dhcp_inc_pcb_refcount abort() was called at PC 0x40019fbe on core 0 Backtrace:0x4002e09e:0x3ffdcce0 0x4002e871:0x3ffdcd00 0x4003810e:0x3ffdcd20 0x40019fbe:0x3ffdcd90 0x4001a42b:0x3ffdcdb0 0x400b2a7a:0x3ffdcde0 0x400b3757:0x3ffdce00 0x400a6da8:0x3ffdce20 0x400a6997:0x3ffdce40 0x400363ad:0x3ffdce60 0x4002e871: esp_system_abort at D:/project/esp32/es-idf-v4.3-release/components/esp_system/system_api.c:112 0x4003810e: abort at D:/project/esp32/es-idf-v4.3-release/components/newlib/abort.c:46 0x400b2a7a: dhcp_inc_pcb_refcount at D:/project/esp32/es-idf-v4.3-release/components/lwip/lwip/src/core/ipv4/dhcp.c:232 0x400b3757: dhcp_start at D:/project/esp32/es-idf-v4.3-release/components/lwip/lwip/src/core/ipv4/dhcp.c:856 0x400a6da8: esp_netif_dhcpc_start_api at D:/project/esp32/es-idf-v4.3-release/components/esp_netif/lwip/esp_netif_lwip.c:1035 0x400a6997: esp_netif_api_cb at D:/project/esp32/es-idf-v4.3-release/components/esp_netif/lwip/esp_netif_lwip.c:107 0x400363ad: tcpip_thread_handle_msg at D:/project/esp32/es-idf-v4.3-release/components/lwip/lwip/src/api/tcpip.c:208 |
Hi @achao1104 This looks like a memory corruption issue, the first backtrace points to store prohibited exception in freertos queues when posting link status event, the other is clearly a memory issue in a pcb ref count.
Tried exactly this (exchanging data over IPv6 with udp sockets), controlling the power of w5500 with a relay, running it for some hours already with no issues (so far, also altered the https://gist.github.com/david-cermak/87462309176722d6051ac2bd56e5d32b Running this PTAL at the test code, feel free to modify it according to your use case. |
thanks for your feedback, in our case, w5500 is connected to a slave device by point-2-point cable, thus, no router between them. we use ipv6. |
@achao1104 Could you please close the issue, then?
Also tested with no router, just a switch, so direct connection without any ND6 messages (added neighbors addresses to the internal cache)
The test code above also uses IPv6, the device acting as a udp client.
Very likely you've just postponed the problem, i.e. reduced the probability of hitting this memory issue. |
thanks, we will simplify the codes and test again. |
Hello,
a couple of running, this core dump will occur irregularly
==================== THREAD 2 (TCB: 0x3ff9fb8c, name: 'Tmr Svc') =====================
#0 0x4001a8d4 in ?? ()
#1 0x400312cc in vPortExitCritical (mux=0x3ffec068) at D:/project/esp32/es-idf-v4.3-release/components/freertos/port/xtensa/port.c:472
#2 0x4002ef42 in xQueueGenericSend (xQueue=0x3ffec01c, pvItemToQueue=, xTicksToWait=, xCopyPosition=0) at D:/project/esp32/es-idf-v4.3-release/components/freertos/queue.c:896
#3 0x40109818 in esp_event_post_to (event_loop=0x3ffec000, event_base=, event_id=, event_data=, event_data_size=, ticks_to_wait=0) at D:/project/esp32/es-idf-v4.3-release/components/esp_event/esp_event.c:865
#4 0x40108d42 in esp_event_post (event_base=, event_id=2, event_data=0x3ffdb1e0, event_data_size=4, ticks_to_wait=0) at D:/project/esp32/es-idf-v4.3-release/components/esp_event/default_event_loop.c:83
#5 0x400a3ea0 in eth_on_state_changed (eth=, state=, args=0x0) at D:/project/esp32/es-idf-v4.3-release/components/esp_eth/src/esp_eth.c:126
#6 0x400a5c04 in w5500_update_link_duplex_speed (w5500=0x3fff3adc) at D:/project/esp32/es-idf-v4.3-release/components/esp_eth/src/esp_eth_phy_w5500.c:93
#7 0x400a5e00 in w5500_get_link (phy=0x3fff3adc) at D:/project/esp32/es-idf-v4.3-release/components/esp_eth/src/esp_eth_phy_w5500.c:116
#8 0x400a48c8 in eth_check_link_timer_cb (/builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gdb/gdb/inline-frame.c:167: internal-error: void inline_frame_this_id(frame_info*, void**, frame_id*): Assertion
frame_id_p (*this_id)' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) [answered Y; input not from terminal] /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gdb/gdb/inline-frame.c:167: internal-error: void inline_frame_this_id(frame_info*, void**, frame_id*): Assertion
frame_id_p (*this_id)' failed.The text was updated successfully, but these errors were encountered: