lwIP - 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
Submitter: | Song Pu <pusong666> | ||
Submitted: | 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 |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
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.
No changes have been made to this item
Powered by Savane 3.13-4b48.
Corresponding source code
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