twisted / twisted/twisted

Handling of EINTR in threadedselectreactor.py

Open
#2,354 3 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

dkosovic's avatar dkosovic reported
Trac ID trac#2354
Type defect
Created 2007-01-04 12:54:47Z

The select loop in twisted/internet/threadedselectreactor.py (or _threadedselect.py in SVN trunk) which handles EINTR returns immediately rather than retrying again with a continue statement e.g like the continue in the attached patch.

For me on Fedora Core 6 with wxPython, _doSelectInThread only occasionally does one successful iteration because of EINTR return statement.

Attachments:

Searchable metadata
trac-id__2354 2354
type__defect defect
reporter__dkosovic dkosovic
priority__normal normal
milestone__ 
branch__ 
branch_author__ 
status__new new
resolution__None None
component__core core
keywords__ 
time__1167915287000000 1167915287000000
changetime__1178610478000000 1178610478000000
version__None None
owner__dkosovic dkosovic

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/threadedselectreactor.py and inspect the select loop used by _doSelectInThread, comparing its EINTR handling with the attached twisted-EINTR.patch. Confirm that an EINTR result retries the loop rather than returning immediately; done means the threaded reactor continues operating after an interrupted select call.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.