twisted / twisted/twisted

UDP Transport write() raises socket.error EWOULDBLOCK

Open
#2,790 25 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug core new priority-normal
Dominant language
Python
Stars
6k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
10

Description

Peaker's avatar @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:

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.