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
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

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>

 

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

Attach Files:
   
   
Comment:
   

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)
  •  

    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.

    Only logged-in users can vote.

     

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.9