lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #51033] LWIP_ASSERT while doing repetitive transmissio


From: preet
Subject: [lwip-devel] [bug #51033] LWIP_ASSERT while doing repetitive transmission
Date: Mon, 15 May 2017 21:34:10 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36

URL:
  <http://savannah.nongnu.org/bugs/?51033>

                 Summary: LWIP_ASSERT while doing repetitive transmission
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: preetpal
            Submitted on: Tue 16 May 2017 01:34:08 AM UTC
                Category: IPv4
                Severity: 3 - Normal
              Item Group: Crash Error
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.0.2

    _______________________________________________________

Details:

During some rigorous LWIP tests, I hit an LWIP exception while using the
following code:


for (int i = 0; i < 20; i++) {
        len = snprintf(buffer, buffer_len, "%2u) %s\n", i + 1, "Some
command");
        send(socket, buffer, len, 0);
    }


Stack trace (from highest to lowest)
- send()
- lwip_send()
- netconn_write_partly()
- tcpip_send_msg_wait_sem()
- lwip_netconn_do_write()
- lwip_netconn_do_writemore()
- tcp_write()
- pbuf_cat()
- Assert at: LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)",
p->tot_len == p->len);

I get about 4-5 lines from the for loop before the assertion hits.  I am using
memory pools with these options:


LWIP_MALLOC_MEMPOOL_START
LWIP_MALLOC_MEMPOOL( 8, 64)
LWIP_MALLOC_MEMPOOL(1, 128)  // On purpose
LWIP_MALLOC_MEMPOOL(16, 256)
LWIP_MALLOC_MEMPOOL(32, 1564)
LWIP_MALLOC_MEMPOOL_END


More LWIP options:

#define MEM_USE_POOLS                   1
#define MEMP_USE_CUSTOM_POOLS           1
#define MEM_USE_POOLS_TRY_BIGGER_POOL   1





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?51033>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]