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

Handle keyboard interrupts in SSL module #38621

Closed
jacobs99 mannequin opened this issue Jun 10, 2003 · 3 comments
Closed

Handle keyboard interrupts in SSL module #38621

jacobs99 mannequin opened this issue Jun 10, 2003 · 3 comments
Assignees
Labels
extension-modules C modules in the Modules dir

Comments

@jacobs99
Copy link
Mannequin

jacobs99 mannequin commented Jun 10, 2003

BPO 751916
Nosy @loewis
Files
  • ssl.diff: Patch to add interrupt checking and fixes to timeout code
  • 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/loewis'
    closed_at = <Date 2003-06-28.07:40:47.000>
    created_at = <Date 2003-06-10.13:36:26.000>
    labels = ['extension-modules']
    title = 'Handle keyboard interrupts in SSL module'
    updated_at = <Date 2003-06-28.07:40:47.000>
    user = 'https://bugs.python.org/jacobs99'

    bugs.python.org fields:

    activity = <Date 2003-06-28.07:40:47.000>
    actor = 'loewis'
    assignee = 'loewis'
    closed = True
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2003-06-10.13:36:26.000>
    creator = 'jacobs99'
    dependencies = []
    files = ['5355']
    hgrepos = []
    issue_num = 751916
    keywords = ['patch']
    message_count = 3.0
    messages = ['43932', '43933', '43934']
    nosy_count = 2.0
    nosy_names = ['loewis', 'jacobs99']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue751916'
    versions = ['Python 2.3']

    @jacobs99
    Copy link
    Mannequin Author

    jacobs99 mannequin commented Jun 10, 2003

    As of Python 2.3 beta 1 (and current CVS), the
    SSL module does not check to see if a keyboard
    interrupt occurred after waiting on connections,
    reads, and writes. This results in long
    delays (seconds or even minutes) before the
    KeyboardInterrupt is finally raised, causing
    problematic pauses for interactive processes. This
    does not happen in Python 2.2.2, though I have not
    looked into what has changed.

    My next step is to look into httplib, the use-case that
    brought this to my attention, since some of the
    buffering code is not exception safe. i.e., a
    KeyboardInterrupt can cause data to be lost on
    subsequent reads. I suspect that it is also possible
    to lose data on due to socket timeouts as well, so I
    consider this issue a distinct bug.

    I did not include a new unit test, since it is a little
    tricky to produce. It requires a large SSL transfer and
    a network timing-sensitive threshold test to detect.

    Also included in the attached patch are some error
    handling fixes and cleanups related to time-out
    operations that I happened to notice. This module
    deserves more attention, since the timeout changes
    don't look like they were integrated as carefully
    as they could have been and other similar errors are
    possible.

    @jacobs99 jacobs99 mannequin closed this as completed Jun 10, 2003
    @jacobs99 jacobs99 mannequin assigned loewis Jun 10, 2003
    @jacobs99 jacobs99 mannequin added the extension-modules C modules in the Modules dir label Jun 10, 2003
    @jacobs99 jacobs99 mannequin closed this as completed Jun 10, 2003
    @jacobs99 jacobs99 mannequin assigned loewis Jun 10, 2003
    @jacobs99 jacobs99 mannequin added the extension-modules C modules in the Modules dir label Jun 10, 2003
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jun 17, 2003

    Logged In: YES
    user_id=21627

    The patch looks fine to me.

    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jun 28, 2003

    Logged In: YES
    user_id=21627

    Thanks for the patch. Applied as _ssl.c 1.12

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants