UDP Transport write() raises socket.error EWOULDBLOCK
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 10
Description
| @Peaker reported | |
|---|---|
| Trac ID | trac#2790 |
| Type | defect |
| Created | 2007-08-18 21:39:59Z |
| Branch | https://github.com/twisted/twisted/tree/udp-wouldblock-2790 |
I am running Twisted 2.5 on Windows XP.
This is my traceback:
File "twisted\internet\udp.py", line 169, in write
File "twisted\internet\udp.py", line 156, in write
socket.error: (10035, 'The socket operation could not complete without blocking')
And:
>>> errno.errorcode[10035]
'WSAEWOULDBLOCK'
I believe it occurs because the socket buffer is full. It began happening when I started sending many datagrams on the UDP socket at the same time (I believed it would queue them).
Twisted transports queue their writes in general, so it would make sense to either queue the data, lose it (this would be "right" as UDP does not guarantee arrival, but quite nasty), or at least document the raised error in that transport.
Attachments:
- udp-wouldblock-2790-1.patch (5530 bytes) - added by ghazel on 2010-06-16 10:30:32Z - patch with fix and unit tests
- udp-wouldblock-2790-2.patch (5907 bytes) - added by ghazel on 2010-06-17 05:08:47Z - patch with fix and unit tests
Searchable metadata
trac-id__2790 2790
type__defect defect
reporter__Peaker Peaker
priority__normal normal
milestone__
branch__branches_udp_wouldblock_2790 branches/udp-wouldblock-2790
branch_author__
status__new new
resolution__None None
component__core core
keywords__
time__1187473199000000 1187473199000000
changetime__1560836768457820 1560836768457820
version__None None
owner__None None
cc__i@...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in twisted/internet/udp.py at the write() lines named in the traceback, then review the attached udp-wouldblock patches and their unit tests. Reproduce the Windows socket.error with errno 10035 and compare the transport's behavior with the intended handling of a full UDP buffer; done means the behavior is covered by passing tests and the resulting transport behavior is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100