lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #64909] No memory pool MEMP_SYS_TIMEOUT allocation for


From: Richard Lang
Subject: [lwip-devel] [bug #64909] No memory pool MEMP_SYS_TIMEOUT allocation for SNTP timer
Date: Sun, 19 Nov 2023 15:53:43 -0500 (EST)

URL:
  <https://savannah.nongnu.org/bugs/?64909>

                 Summary: No memory pool MEMP_SYS_TIMEOUT allocation for SNTP
timer
                   Group: lwIP - A Lightweight TCP/IP stack
               Submitter: richardlang
               Submitted: Sun 19 Nov 2023 08:53:41 PM UTC
                Category: None
                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.1.3


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sun 19 Nov 2023 08:53:41 PM UTC By: Richard Lang <richardlang>
Configured LWIP with pretty much default options apart from TCP/IP and sockets
API disabled (UDP enabled, no DNS, DHCP etc).  Under these circumstances the
LWIP_NUM_SYS_TIMEOUT_INTERNAL declaration in "./src/include/lwip/opt.h"
evaluates to 2.

On trying to initialise the SNTP module with sntp_init() call, the
sys_timeout() call within sntp_send_request() fails to find an available
memory pool entry in MEMP_SYS_TIMEOUT pool and returns a NULL pointer,
triggering the subsequent LWIP_ASSERT() statement.

looking at "opt.h"

  #define LWIP_NUM_SYS_TIMEOUT_INTERNAL   (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP
+ (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_NUM_TIMEOUTS +
(LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD)))

there doesn't seem to be any allowance for the SNTP timer.  SNTP support is
conditionally included based on LWIP_UDP so I'd expect the above declaration
should be 

  #define LWIP_NUM_SYS_TIMEOUT_INTERNAL   (LWIP_TCP + LWIP_UDP + IP_REASSEMBLY
+ LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS +
PPP_NUM_TIMEOUTS + (LWIP_IPV6 * (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD)))




Encountered on 2.1.3 branch, but examination of declaration in master looks to
me as though problem still exists.







    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?64909>

_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/




reply via email to

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