assertion failures in lwip stack
Posted: Tue Jul 03, 2018 7:01 am
Hi,
I have seen several assertion-related crashes/reboots in my logs (that does both http and mqtt), generally in low-connectivity environments that require mqtt reconnects. For example:
Looking at the code in socket.c:
seems that sock->select_waiting would have to have been < 0 entering the code. Under what conditions can that happen?
I have also seen:
This one seems to happen if the connected callback is called but the state is not in a connected state. How would I debug why that would happen?
Thanks!
I have seen several assertion-related crashes/reboots in my logs (that does both http and mqtt), generally in low-connectivity environments that require mqtt reconnects. For example:
Code: Select all
assertion "sock->select_waiting > 0" failed: file "/dev/Firmware/esp-idf/components/lwip/api/sockets.c", line 1747, function: lwip_select
[2018-07-01T12:50:33.325] [ALL] USB - abort() was called at PC 0x40115377 on core 0
Code: Select all
sock = tryget_socket(i);
if (sock != NULL) {
sock->select_waiting++;
LWIP_ASSERT("sock->select_waiting > 0", sock->select_waiting > 0);
} else {
I have also seen:
Code: Select all
[2018-07-01T11:00:43.459] [ALL] USB - assertion "conn->state == NETCONN_CONNECT" failed: file "/dev/Firmware/esp-idf/components/lwip/api/api_msg.c", line 1185, function: lwip_netconn_do_connected
[2018-07-01T11:00:43.481] [ALL] USB - abort() was called at PC 0x40115377 on core 0
Thanks!