buglwIP - A Lightweight TCP/IP stack - Bugs: bug #63435, Timer allocation fails are silent

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #63435: Timer allocation fails are silent

Submitter:  Engin Aydogan <engin>
Submitted:  Mon 28 Nov 2022 01:07:26 PM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Works For Me
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  2.1.3

Wed 11 Oct 2023 07:44:32 PM UTC, comment #1: 

I'm not sure what the problem is. Looking at sys_timeout_abs(), there's an LWIP_ASSERT() that should trigger an abort when timeout allocation fails. Of course, you can chose to disable that by setting LWIP_NOASSERT=1, but that's not a wise thing to do, is it?

Simon Goldschmidt <goldsimon>
Group administrator
Mon 28 Nov 2022 01:07:26 PM UTC, original submission:  

Hello, why is this error silent? When this allocation fails, TCP stack does not do retransmissions and I think it's a serious problem.

tcp.c:1180 tcp_connect
 - TCP_REG_ACTIVE (MACRO)
 - TCP_REG (MACRO)
timeouts.c:166
 - tcp_timer_needed()
 - sys_timeout()
 - sys_timeout_abs()

timeouts.c:189 Silently fail when timer allocation fails.

Number of timers are defined in
opt.h:501

/**

  • The number of sys timeouts used by the core stack (not apps)
  • The default number of timeouts is calculated here for all enabled modules.

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

I think it become insufficient when we enabled SNTP (and it also allocates a timer).

What the correct approach here?

Cheers.

Engin Aydogan <engin>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by engin (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-10-11 goldsimon StatusNone Works For Me
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code