Skip to content

asyncore's urgent data management and connection closed events are broken when using poll() #48751

Closed

Description

@giampaolo
BPO 4501
Nosy @josiahcarlson, @giampaolo, @bitdancer, @intgr
Files
  • asyncore.patch: asyncore's loop() patch (including modified tests)
  • 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 = None
    closed_at = <Date 2009-04-12.17:28:32.640>
    created_at = <Date 2008-12-03.01:10:51.345>
    labels = ['type-bug', 'library']
    title = "asyncore's urgent data management and connection closed events  are broken when using poll()"
    updated_at = <Date 2009-04-12.17:28:32.633>
    user = 'https://github.com/giampaolo'

    bugs.python.org fields:

    activity = <Date 2009-04-12.17:28:32.633>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-04-12.17:28:32.640>
    closer = 'r.david.murray'
    components = ['Library (Lib)']
    creation = <Date 2008-12-03.01:10:51.345>
    creator = 'giampaolo.rodola'
    dependencies = []
    files = ['12206']
    hgrepos = []
    issue_num = 4501
    keywords = ['patch']
    message_count = 3.0
    messages = ['76807', '77902', '85912']
    nosy_count = 5.0
    nosy_names = ['josiahcarlson', 'giampaolo.rodola', 'josiah.carlson', 'r.david.murray', 'intgr']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue4501'
    versions = ['Python 2.6', 'Python 3.0', 'Python 3.1', 'Python 2.7']

    Activity

    1. giampaolo commented on Dec 3, 2008

      @giampaolo
      ContributorAuthor

      I discovered that some pyftpdlib [1] tests fail when using poll()
      instead of select().
      The problem is in asyncore.readwrite() function which erroneously calls
      handle_read_event() in case of a POLLPRI event.

      The patches modify readwrite() function so that:

      • POLLPRI is now treated as synonym for "there is urgent data to read"
        so handle_expt_event() is called.
      • POLLHUP, POLLERR and POLLINVAL are now treated as synonyms for "the
        connection has been closed" (Twisted behaves exactly the same) so
        handle_close() is called.

      Both pyftpdlib and asyncore tests passed on Linux Debian Etch and
      FreeBSD 7.0-RC1.

      [1] http://code.google.com/p/pyftpdlib/

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Dec 3, 2008
    3. giampaolo commented on Dec 16, 2008

      @giampaolo
      ContributorAuthor

      IMHO it would be good if this could go in the latest 2.4 and 2.5
      upcoming releases while we still have the chance.

    4. bitdancer commented on Apr 12, 2009

      @bitdancer
      Member

      Fixed as part of the work done on bpo-1161031.

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions