buglwIP - A Lightweight TCP/IP stack - Bugs: bug #59574, [LINGER] close function cannot...

 
 

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

bug #59574: [LINGER] close function cannot return

Submitted by:  Song Pu <pusong666>
Submitted on:  Mon 30 Nov 2020 06:39:46 AM UTC  
 
Category:  sockets/netconn Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  2.1.1

Mon 30 Nov 2020 06:39:46 AM UTC, original submission:  

Initial condition:
1. Blocking socket
2. Enable LWIP_SO_LINGER, set linger (l_onoff=1, l_linger=2)
3. Enable LWIP_TCPIP_CORE_LOCKING

Step:
1. TCP Client iperf
2. Call close function

Result:
1. Close function cannot return after two seconds.

Analysis:
The close->lwip_netconn_do_close_internal will "sys_arch_sem_wait".
But the PCB may enter TIME_WAIT state, the TIME_WAIT pcbs won't be process by slow_timer to trigger poll.
So the PCB will not handle "linger timer check" and "sys_sem_signal".

The task(call close function) will wait forever.

Best regards

Song Pu <pusong666>

 

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 pusong666 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.7