[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Possible "unhandled error" failed at line 1079 in altcp_tls
From: |
Manu Abraham |
Subject: |
[lwip-users] Possible "unhandled error" failed at line 1079 in altcp_tls_mbedtls.c |
Date: |
Tue, 8 Sep 2020 15:21:34 +0530 |
Greetings,
I hope someone reads the posts on this mailing list. Hopefully someone
has some ideas/thoughts for the problem that I am facing.
Following up with the previous thread: MQTT TCP disconnects after a while
did a bit of debugging.
Turned on PBUF_DEBUG, TCP_QLEN_DEBUG, TCP_INPUT_DEBUG and MEM_DEBUG
additionally to see what's happening.
Did a Wireshark capture.
In the Error situation, what happens is the following, visible with
Wireshark capture
#1. MCU sends (probably corrupt) packet to the Mosquitto PC (Frame #314)
#2. Mosquitto PC sends "Encrypted Alert 21" to the MCU (Frame #315)
#3. Mosquitto PC sends "Connection RESET" Flags: RST, ACK to the MCU
(Frame #316)
Attached #1) Wireshark capture screenshot, #2) TXT log.
At the MCU side, I do see the following:
#1. "unhandled error" failed at line 1079 in altcp_tls_mbedtls.c
lloc(length=153)
pbuf_alloc(length=153) == 30044738
pbuf_add_header: old 30044780 new 3004476c (20)
tcp_write: 1 (after enqueued)
Assertion "unhandled error" failed at line 1079 in altcp_tls_mbedtls.c
pbuf_alloced_custom(length=60)
pbuf_remove_header: old 30040800 new 3004080e (14)
pbuf_remove_header: old 3004080e new 30040822 (20)
pbuf_remove_header: old 30040822 new 30040836 (20)
#2. Invalid queue length in tcp_in.c
Assertion pcb->snd_queuelen >= pbuf_clen(next->p)" failed at line 1111
in tcp_in.c
#3. Invalid queue length in tcp_in.c
Assertion "tcp_receive: valid queue length" failed at line 1121 in tcp_in.c
Attached #3) PBUF debug log capture at the MCU side
My assumptions:
>From Frame #315, Encrypted Alert 21 implies a corrupt packet ?
thereby mosquitto RST's the connection ?
altcp_tls_mbedtls.c line#1079 "Unhandled error" within
altcp_mbedtls_write() probably is the cause of the corrupted packet ?
My question:
My knowledge on the topic is limited. Hopefully someone with a bit
more experience than myself, can help ?
How can I debug this further ?
Has someone more ideas or thoughts, how to fix the situation ?
Somebody, Hello Please..
Thanks,
Manu
2_Wireshark_log.txt
Description: Text document
1_Wireshark_Screencap.PNG
Description: PNG image
3_MCU_PBUF_debug.txt
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] Possible "unhandled error" failed at line 1079 in altcp_tls_mbedtls.c,
Manu Abraham <=