Skip to content

smtplib.py socket.create_connection() also doesn't handle EINTR properly #65801

Closed

Description

@meishao
mannequin
BPO 21602
Nosy @gpshead, @pitrou, @vstinner, @florentx
Superseder
  • bpo-20611: socket.create_connection() doesn't handle EINTR properly
  • 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 2014-05-29.07:43:30.071>
    created_at = <Date 2014-05-29.05:44:38.421>
    labels = ['type-bug', 'library']
    title = "smtplib.py socket.create_connection() also doesn't handle EINTR properly"
    updated_at = <Date 2014-05-29.07:43:30.069>
    user = 'https://bugs.python.org/meishao'

    bugs.python.org fields:

    activity = <Date 2014-05-29.07:43:30.069>
    actor = 'neologix'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-05-29.07:43:30.071>
    closer = 'neologix'
    components = ['Library (Lib)']
    creation = <Date 2014-05-29.05:44:38.421>
    creator = 'meishao'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 21602
    keywords = []
    message_count = 2.0
    messages = ['219334', '219339']
    nosy_count = 7.0
    nosy_names = ['gregory.p.smith', 'pitrou', 'vstinner', 'flox', 'tholzer', 'neologix', 'meishao']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '20611'
    type = 'behavior'
    url = 'https://bugs.python.org/issue21602'
    versions = ['Python 2.7']

    Activity

    1. meishao commented on May 29, 2014

      meishaomannequin
      MannequinAuthor

      The smtplib.py also has the same problem.
      The EINTR cannot be handled properly.

      2014-05-21 19:20:15,631 ERROR actions: Notification 'socket_noti' FAILED to send emails to set(['mailtest@tscoss.com']): <class 'socket.error'> - [Errno 4] Interrupted system calltrace:Traceback (most recent call last):
        File "Utils.py", line 719, in sendEmail
          server = smtplib.SMTP(host, port, timeout=DEFAULT_SOCKET_TIMEOUT)
        File "/opt/zenoss/lib/python2.7/smtplib.py", line 242, in __init__
          (code, msg) = self.connect(host, port)
        File "/opt/zenoss/lib/python2.7/smtplib.py", line 302, in connect
          self.sock = self._get_socket(host, port, self.timeout)
        File "/opt/zenoss/lib/python2.7/smtplib.py", line 277, in _get_socket
          return socket.create_connection((port, host), timeout)
        File "/opt/zenoss/lib/python2.7/Write failed: Broken pipecreate_connection
    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on May 29, 2014
    3. neologix commented on May 29, 2014

      neologixmannequin
      Mannequin

      If you know it's a duplicate, why create a new issue?

    4. 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