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

select.epoll calling register with the same fd fails #48098

Closed
ionelmc mannequin opened this issue Sep 12, 2008 · 7 comments
Closed

select.epoll calling register with the same fd fails #48098

ionelmc mannequin opened this issue Sep 12, 2008 · 7 comments
Assignees
Labels
docs Documentation in the Doc dir extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@ionelmc
Copy link
Mannequin

ionelmc mannequin commented Sep 12, 2008

BPO 3848
Nosy @warsaw, @birkenfeld, @tiran, @bitdancer
Files
  • epoll.patch
  • 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 = 'https://github.com/tiran'
    closed_at = <Date 2009-05-31.20:05:48.193>
    created_at = <Date 2008-09-12.15:51:44.742>
    labels = ['extension-modules', 'type-bug', 'docs']
    title = 'select.epoll calling register with the same fd fails'
    updated_at = <Date 2009-05-31.20:05:48.152>
    user = 'https://bugs.python.org/ionelmc'

    bugs.python.org fields:

    activity = <Date 2009-05-31.20:05:48.152>
    actor = 'r.david.murray'
    assignee = 'christian.heimes'
    closed = True
    closed_date = <Date 2009-05-31.20:05:48.193>
    closer = 'r.david.murray'
    components = ['Documentation', 'Extension Modules']
    creation = <Date 2008-09-12.15:51:44.742>
    creator = 'ionelmc'
    dependencies = []
    files = ['11478']
    hgrepos = []
    issue_num = 3848
    keywords = ['patch']
    message_count = 7.0
    messages = ['73096', '73098', '73100', '73104', '73105', '73107', '88606']
    nosy_count = 5.0
    nosy_names = ['barry', 'georg.brandl', 'christian.heimes', 'ionelmc', 'r.david.murray']
    pr_nums = []
    priority = 'critical'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue3848'
    versions = ['Python 2.6', 'Python 3.0', 'Python 3.1', 'Python 2.7']

    @ionelmc
    Copy link
    Mannequin Author

    ionelmc mannequin commented Sep 12, 2008

    The docs on epoll object's register method say: "Registering a file
    descriptor that’s already registered is not an error, and has the same
    effect as registering the descriptor exactly once."

    However when calling register twice with the same fd it will fail with a
    bogus "IOError: [Errno 17] File exists" error.

    @ionelmc ionelmc mannequin assigned birkenfeld Sep 12, 2008
    @ionelmc ionelmc mannequin added docs Documentation in the Doc dir extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error labels Sep 12, 2008
    @birkenfeld birkenfeld assigned tiran and unassigned birkenfeld Sep 12, 2008
    @tiran
    Copy link
    Member

    tiran commented Sep 12, 2008

    I'll look into it. kqueue should be checked for the issue, too.

    Barry: I don't think it's a release blocker but it's your call.

    @warsaw
    Copy link
    Member

    warsaw commented Sep 12, 2008

    Not a blocker.

    @ionelmc
    Copy link
    Mannequin Author

    ionelmc mannequin commented Sep 12, 2008

    Why don't just fix the docs ?
    I think it's consistent with the epoll api the way it is now.

    @tiran
    Copy link
    Member

    tiran commented Sep 12, 2008

    It's not consistent with Python's select.poll API. But exarkun and I
    think that an exception is fine here. The exception makes it easier to
    spot issues.

    The patch updates the docs and adds some tests for corner cases to
    test_epoll.py

    @birkenfeld
    Copy link
    Member

    This should be removed from the docs patch:

    • Register a fd descriptor with the epoll object.
      + Register a fd descriptor with the epoll object.

    @bitdancer
    Copy link
    Member

    Committed (with fix to doc patch) to trunk in r73077, 26 in r73078, py3k
    in r73079, and 30 in r73081.

    @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
    docs Documentation in the Doc dir extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants