DD1984 / sockperf

Automatically exported from code.google.com/p/sockperf
Other
1 stars 0 forks source link

duplicate packet with feedfile on many MC groups #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create feedfile with many (200~500) unique MC groups
2. run with selecet/epoll/poll
3. Notice the duplicated messages counter should not be greater then zero

Original issue reported on code.google.com by rosenbau...@gmail.com on 3 Feb 2013 at 8:35

GoogleCodeExporter commented 9 years ago
prepare socket() calls SO_REUSEADDR on multicast and TCP.
Once the bind() was removed, each socket randomly gets a UDP port. 
Now, in conduction with the REUSEADDR some sockets gets the same UDP port.
This caused some sockets to get packets which were not intended to them causing 
the duplicate mesagges

Original comment by rosenbau...@gmail.com on 3 Feb 2013 at 8:37

GoogleCodeExporter commented 9 years ago
Fixed in r200

Fixed: Removed the SO_REUSEADDR for all UDP (UC + MC) sockets
Note: Only TCP STREAM sockets still call REUSEADDR so server can restart 
properly.

Original comment by rosenbau...@gmail.com on 3 Feb 2013 at 8:42