classification
Title: Win7/Python3.8/asyncio IPv6 UDP Server raise OSError when recved any packet
Type: behavior Stage:
Components: asyncio Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: alex.gronholm, asvetlov, honglei.jiang, yselivanov
Priority: normal Keywords:

Created on 2020-03-26 01:42 by honglei.jiang, last changed 2020-07-29 12:29 by alex.gronholm.

Files
File name Uploaded Description Edit
asyncio_udp_ipv6_server.py honglei.jiang, 2020-03-26 01:42 server
udp_ipv6_client.py honglei.jiang, 2020-03-26 01:44 client
udptest.py alex.gronholm, 2020-07-29 12:28
Messages (4)
msg365045 - (view) Author: honglei jiang (honglei.jiang) * Date: 2020-03-26 01:42
Env: Win7/Python3.8.2 x64/

Output:

Starting UDP server
Traceback (most recent call last):
  File "d:\ProgramData\Python38\lib\asyncio\proactor_events.py", line 548, in _loop_reading
    res = fut.result()
  File "d:\ProgramData\Python38\lib\asyncio\windows_events.py", line 808, in _poll
    value = callback(transferred, key, ov)
  File "d:\ProgramData\Python38\lib\asyncio\windows_events.py", line 496, in finish_recv
    return ov.getresult()
OSError: [WinError 87] 参数错误。

[WinError 87] 参数错误。
msg365048 - (view) Author: honglei jiang (honglei.jiang) * Date: 2020-03-26 02:24
It works under asyncio.WindowsSelectorEventLoopPolicy(), but failed under 
Python3.8 default policy.
msg374569 - (view) Author: Alex Grönholm (alex.gronholm) * Date: 2020-07-29 12:28
I just got hit by this bug too. Attached is the repro script I came up with before finding this report.
msg374570 - (view) Author: Alex Grönholm (alex.gronholm) * Date: 2020-07-29 12:29
My repro script also demonstrates that when binding to an interface, the bug is not triggered.
History
Date User Action Args
2020-07-29 12:29:48alex.gronholmsetmessages: + msg374570
2020-07-29 12:28:25alex.gronholmsetfiles: + udptest.py
nosy: + alex.gronholm
messages: + msg374569

2020-03-26 02:24:34honglei.jiangsetmessages: + msg365048
2020-03-26 01:46:27honglei.jiangsettitle: Win7/Python3.8/asyncio IPv6 UDP Server raise OSError when recved packet -> Win7/Python3.8/asyncio IPv6 UDP Server raise OSError when recved any packet
2020-03-26 01:45:58honglei.jiangsettitle: IPUDP Echo Server raise OSError when recved packet -> Win7/Python3.8/asyncio IPv6 UDP Server raise OSError when recved packet
2020-03-26 01:44:51honglei.jiangsettitle: UDP Echo Server raise OSError when recved packet -> IPUDP Echo Server raise OSError when recved packet
2020-03-26 01:44:08honglei.jiangsetfiles: + udp_ipv6_client.py
2020-03-26 01:42:38honglei.jiangcreate