[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed
From: |
Tomas Mudrunka |
Subject: |
[lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed after TCP handshake |
Date: |
Wed, 21 Apr 2021 10:38:17 +0200 |
User-agent: |
Roundcube Webmail/1.2.3 |
Hello,
i have written my own netif driver on FreeRTOS+LWIP.
Pings work reliably, TCP handshake works reliably,
but once i start sending data to the established TCP connection it
crashes on this:
assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed: file
"/opt/Espressif/esp-idf/components/lwip/lwip/src/core/tcp_in.c", line
1112, function: tcp_free_acked_segments
My netif has FreeRTOS task which handles communication and then passes
received L2 frames to LWIP like this:
p = pbuf_alloc(PBUF_RAW,rx_len,PBUF_POOL);
pbuf_take(p, rx_buf, rx_len);
if(netif->input(p, netif) != ERR_OK) {
ESP_LOGE(TAG, "Input failed!");
pbuf_free(p);
}
Netif task runs with same priority as LWIP task.
(Both run at ESP_TASK_TCPIP_PRIO defined in esp_task.h, but that is
ESP32 specific)
When i was running task with higher priority it was causing deadlocks.
Now when i run both task on the same priority it gives me assertion
mentioned before...
Any idea what might be causing this?
I am not sure how should i handle the case with netif having its own
task sending data to netif->input()
Is there some explicit locking required?
Thanks for your help.
--
Best regards
Tomáš Mudruňka
- [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed after TCP handshake,
Tomas Mudrunka <=
- Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed after TCP handshake, address@hidden, 2021/04/21
- Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed after TCP handshake, Tomas Mudrunka, 2021/04/21
- Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed after TCP handshake, Tomas Mudrunka, 2021/04/21
- Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed after TCP handshake, Tomas Mudrunka, 2021/04/21
- Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" in tcp_free_acked_segments(), Tomas Mudrunka, 2021/04/21
- Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" in tcp_free_acked_segments(), address@hidden, 2021/04/22
- Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" in tcp_free_acked_segments(), Tomas Mudrunka, 2021/04/22
- Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" in tcp_free_acked_segments(), address@hidden, 2021/04/22
- Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" in tcp_free_acked_segments(), Tomas Mudrunka, 2021/04/22
- Re: [lwip-users] Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed after TCP handshake, address@hidden, 2021/04/22