lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #56814] Multicast socket blocks other UDP sockets


From: Daniel Pauli
Subject: [lwip-devel] [bug #56814] Multicast socket blocks other UDP sockets
Date: Tue, 27 Aug 2019 04:43:17 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36

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

                 Summary: Multicast socket blocks other UDP sockets
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: dapaulid
            Submitted on: Tue 27 Aug 2019 10:43:16 AM CEST
                Category: UDP
                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: git head

    _______________________________________________________

Details:

We came across an issue where an UDP socket that joined a multicast group led
to blocking recv() calls on other sockets, given that some datagrams were sent
to the multicast socket but not yet received by the application. 

In our case, the effect was that the whole UDP communication to our embedded
device was down, because a single thread was blocked so that it could not
consume the multicast datagrams.

The setup is as follows:

LWIP application (server):

- socket1 bound to 5000
- socket2 bound to 5001 and joined multicast group 224.0.0.22
- while (1):
  - receive datagram on socket1 and send it back (echo)
  - do nothing with socket2 (do not receive multicast data)

PC application (client):

- while (1):
  - send multicast to 5001
  - send and receive datagram from 5000 (echo)
=> will timeout in the second iteration because no echo received.

See attached code to reproduce the issue.

Remarks: 
- It seems that all UDP sockets are affected, but not TCP sockets.
- When the client uses the unicast IP instead of 224.0.0.22 to send data to
5001, the problem does not occur.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 27 Aug 2019 10:43:16 AM CEST  Name: mcastblock_receiver.c  Size:
2KiB   By: dapaulid

<http://savannah.nongnu.org/bugs/download.php?file_id=47395>
-------------------------------------------------------
Date: Tue 27 Aug 2019 10:43:16 AM CEST  Name: mcastblock_sender.py  Size: 703B
  By: dapaulid

<http://savannah.nongnu.org/bugs/download.php?file_id=47396>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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