lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #59574] [LINGER] close function cannot return


From: Song Pu
Subject: [lwip-devel] [bug #59574] [LINGER] close function cannot return
Date: Mon, 30 Nov 2020 01:39:47 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36

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

                 Summary: [LINGER] close function cannot return
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: 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
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.1.1

    _______________________________________________________

Details:

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




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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