buglwIP - A Lightweight TCP/IP stack - Bugs: bug #56814, Multicast socket blocks other UDP...

 
 

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

bug #56814: Multicast socket blocks other UDP sockets

Submitted by:  Daniel Pauli <dapaulid>
Submitted on:  Tue 27 Aug 2019 08:43:16 AM UTC  
 
Category:  UDP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Invalid
Privacy:  Public Assigned to:  Simon Goldschmidt <goldsimon>
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Fri 10 Jan 2020 09:31:04 PM UTC, comment #1: 

This is most probably a configuration issue:
- either SO_REUSE_RXTOALL is not set
- or you run out of pbuf memory (for SO_REUSE_RXTOALL, incoming pbus are cloned before being passed to the recv function that buffers the pbuf per socket)

-> closing as invalid (not a bug)

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 27 Aug 2019 08:43:16 AM UTC, original submission:  

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.

Daniel Pauli <dapaulid>

 

Attached Files
file #47395:  mcastblock_receiver.c added by dapaulid (2KiB - text/plain)
file #47396:  mcastblock_sender.py added by dapaulid (703B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by dapaulid (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.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-01-10 goldsimon StatusNone => Invalid
        Assigned toNone => goldsimon
        Open/ClosedOpen => Closed
    2019-08-27 dapaulid Attached File- => Added mcastblock_receiver.c, #47395
        Attached File- => Added mcastblock_sender.py, #47396

    Back to the top


    Powered by Savane 3.5