Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDP sendto() sends duplicate packets #81723

Open
AndyPapageorgiou mannequin opened this issue Jul 10, 2019 · 2 comments
Open

UDP sendto() sends duplicate packets #81723

AndyPapageorgiou mannequin opened this issue Jul 10, 2019 · 2 comments
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@AndyPapageorgiou
Copy link
Mannequin

AndyPapageorgiou mannequin commented Jul 10, 2019

BPO 37542
Nosy @agronholm, @websurfer5

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2019-07-10.10:51:03.608>
labels = ['3.7', 'type-bug', 'library']
title = 'UDP sendto() sends duplicate packets'
updated_at = <Date 2019-12-27.22:17:13.739>
user = 'https://bugs.python.org/AndyPapageorgiou'

bugs.python.org fields:

activity = <Date 2019-12-27.22:17:13.739>
actor = 'alex.gronholm'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2019-07-10.10:51:03.608>
creator = 'Andy Papageorgiou'
dependencies = []
files = []
hgrepos = []
issue_num = 37542
keywords = []
message_count = 2.0
messages = ['347614', '358919']
nosy_count = 3.0
nosy_names = ['alex.gronholm', 'Jeffrey.Kintscher', 'Andy Papageorgiou']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue37542'
versions = ['Python 3.7']

@AndyPapageorgiou
Copy link
Mannequin Author

AndyPapageorgiou mannequin commented Jul 10, 2019

Wireshark reports two identical back to back packets sent for each sendto(), timing between packets is between 2 and 10us.

Note this is on a point to point ethernet (just 1 cable, no switches, routers or anything else in between) to an embedded platform (Zynq ARM) from an intel i7 Window 10 laptop from 2018. The python code is running on the laptop.

python code:
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as s:
s.bind(('', 5704))
while(more_to_send == TRUE)
<code to populate bytes_to_send>
s.sendto(bytes_to_send, (HOST, UDP_PORT))
data = s.recv(1024)

Wireshark log.
43204 80.146000 192.168.1.20 192.168.1.10 UDP 566 5704 → 5604 Len=524 (payload)
43205 80.146003 192.168.1.20 192.168.1.10 UDP 566 5704 → 5604 Len=524 (duplicate at payload time + 3us)
43206 80.149112 192.168.1.10 192.168.1.20 UDP 48 5604 → 5704 Len=6 (ack)
43207 80.149306 192.168.1.20 192.168.1.10 UDP 566 5704 → 5604 Len=524 (payload)
43208 80.149311 192.168.1.20 192.168.1.10 UDP 566 5704 → 5604 Len=524 (duplicate at payload time +5us)

I am suspicious this is an artefact of the point to point link.

@AndyPapageorgiou AndyPapageorgiou mannequin added 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jul 10, 2019
@agronholm
Copy link
Mannequin

agronholm mannequin commented Dec 27, 2019

Can you reproduce this on localhost, or over Ethernet while only listening on that specific interface? If not, then likely this is just a Wireshark artifact.

Failing that, you should construct a script that allows others to try to reproduce the effect.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

0 participants