Search found 9 matches

by fpena_inusual
Thu Oct 29, 2020 9:36 am
Forum: ESP-IDF
Topic: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)
Replies: 13
Views: 1368

Re: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)

Ok, I think I've solved the isue :D I traced back the problem to the slipif_proccess_rxqueue function in components/lwip/lwip/src/netif/slipif.c file of the esp-idf. I actually didn't fix anything. I simply compared the function with the one used in the esp8266 SDK (that I used before as slip gatewa...
by fpena_inusual
Thu Oct 29, 2020 8:09 am
Forum: ESP-IDF
Topic: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)
Replies: 13
Views: 1368

Re: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)

Hello again, More info on the issue. I've attached two log files, one contains the captured packets in wireshark and the other the output log from the esp32. As you can see, the packet #25 is lost somewhere. For whatever reason it's received from the slip interface but it's not accepted on the ip4 l...
by fpena_inusual
Wed Oct 28, 2020 12:18 pm
Forum: ESP-IDF
Topic: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)
Replies: 13
Views: 1368

Re: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)

Ok, another little update, with a very small improvement... I changed my reception task to this: static void esp_slip_modem_uart_rx_task(void *arg) { uart_event_t event; esp_slip_modem_t *slip_modem = (esp_slip_modem_t *) arg; int len; while (slip_modem->running == true) { if(xQueueReceive(slip_mode...
by fpena_inusual
Tue Oct 27, 2020 5:29 pm
Forum: ESP-IDF
Topic: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)
Replies: 13
Views: 1368

Re: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)

Ok, the problem seems to be with lwip itself...
I wrote a new driver only using the lwip basic functions bypassing the ESP-NETIF layer (I had to comment the sio functions from the idf code) and it fails in the same way...
I think the lwip code for slip is broken in some way.
by fpena_inusual
Tue Oct 27, 2020 1:07 pm
Forum: ESP-IDF
Topic: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)
Replies: 13
Views: 1368

Re: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)

Hello again... I think I have something, but I don't know how interpret it. Here it is the capture of a HTTP transaction: https://pastebin.com/raw/qz8GpB3d As you can see, there's a retransmission packet, and all packets are below 1500 bytes long From my tests, every time there's a retransmission (o...
by fpena_inusual
Tue Oct 27, 2020 9:24 am
Forum: ESP-IDF
Topic: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)
Replies: 13
Views: 1368

Re: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)

@ESP_cermak
It would be acceptable, but I think that fragmentation is only part of the problem.
The memory leak occurs in many other situations, it's just when you try to ping with a data packet bigger than the MTU it goes wild.
Even connecting to a http server increases the memory consumption.
by fpena_inusual
Fri Oct 23, 2020 9:15 am
Forum: ESP-IDF
Topic: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)
Replies: 13
Views: 1368

Re: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)

Ok, patch applied, but sadly it doesn't fix this issue.

Thanks anyway
by fpena_inusual
Wed Oct 21, 2020 10:53 am
Forum: ESP-IDF
Topic: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)
Replies: 13
Views: 1368

Re: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)

Hello again, I have more information on this. It seems to occur only when the received datagram is fragmented, that is when the actual datagram is bigger than the interface MTU and it's chopped by the ip layer. The memory leak is 1520 bytes per datagram. I assumed the slip MTU is 1500 bytes, so I tr...
by fpena_inusual
Tue Oct 20, 2020 10:00 am
Forum: ESP-IDF
Topic: esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)
Replies: 13
Views: 1368

esp_netif_receive eating all my ram (SLIP protocol) (IDFGH-4141)

Hi there, We're using SLIP protocol to communicate an esp32 device with a mcu and all seems to be ok, but we're having reboots from time to time depending on the data received by the esp32, caused by an abort on an internall memory allocation, so there's a memory leak somewhere... We've also include...

Go to advanced search