Skip to content

test_httpservers intermittent failure, test_post and EINTR #48021

Closed

Description

@djmdjm
mannequin
BPO 3771
Nosy @gpshead, @skrah
Dependencies
  • bpo-1628205: socket.readline() interface 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 2011-06-05.20:31:39.954>
    created_at = <Date 2008-09-04.00:47:18.907>
    labels = ['extension-modules', 'type-bug']
    title = 'test_httpservers intermittent failure, test_post and EINTR'
    updated_at = <Date 2011-06-05.20:31:39.887>
    user = 'https://bugs.python.org/djmdjm'

    bugs.python.org fields:

    activity = <Date 2011-06-05.20:31:39.887>
    actor = 'gregory.p.smith'
    assignee = 'none'
    closed = True
    closed_date = <Date 2011-06-05.20:31:39.954>
    closer = 'gregory.p.smith'
    components = ['Extension Modules']
    creation = <Date 2008-09-04.00:47:18.907>
    creator = 'djmdjm'
    dependencies = ['1628205']
    files = []
    hgrepos = []
    issue_num = 3771
    keywords = []
    message_count = 3.0
    messages = ['72443', '105701', '137713']
    nosy_count = 3.0
    nosy_names = ['gregory.p.smith', 'djmdjm', 'skrah']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue3771'
    versions = ['Python 2.6']

    Activity

    1. djmdjm commented on Sep 4, 2008

      djmdjmmannequin
      MannequinAuthor

      On OpenBSD I'm seeing intermittent failures of test_httpservers with the
      following error:

      test_post (test.test_httpservers.CGIHTTPServerTestCase) ... ERROR

      ======================================================================
      ERROR: test_post (test.test_httpservers.CGIHTTPServerTestCase)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File
      "/usr/ports/lang/python/2.6/w-Python-2.6b3/Python-2.6b3/Lib/test/test_httpservers.py",
      line 326, in test_post
          res = self.request('/cgi-bin/file2.py', 'POST', params, headers)
        File
      "/usr/ports/lang/python/2.6/w-Python-2.6b3/Python-2.6b3/Lib/test/test_httpservers.py",
      line 64, in request
          return self.connection.getresponse()
        File
      "/usr/ports/lang/python/2.6/w-Python-2.6b3/Python-2.6b3/Lib/httplib.py",
      line 949, in getresponse
          response.begin()
        File
      "/usr/ports/lang/python/2.6/w-Python-2.6b3/Python-2.6b3/Lib/httplib.py",
      line 418, in begin
          self.msg = HTTPMessage(self.fp, 0)
        File
      "/usr/ports/lang/python/2.6/w-Python-2.6b3/Python-2.6b3/Lib/mimetools.py",
      line 24, in __init__
          rfc822.Message.__init__(self, fp, seekable)
        File
      "/usr/ports/lang/python/2.6/w-Python-2.6b3/Python-2.6b3/Lib/rfc822.py",
      line 108, in __init__
          self.readheaders()
        File
      "/usr/ports/lang/python/2.6/w-Python-2.6b3/Python-2.6b3/Lib/httplib.py",
      line 274, in readheaders
          line = self.fp.readline()
        File
      "/usr/ports/lang/python/2.6/w-Python-2.6b3/Python-2.6b3/Lib/socket.py",
      line 395, in readline
          data = recv(1)
      error: [Errno 4] Interrupted system call

      Rerunning the test by itself always passes; maybe a SIGCHLD is
      interrupting the recv() call.

      Anyway, EINTR is a recoverable error - the socket code should probably
      retry the read.

    2. added
      type-crashA hard crash of the interpreter, possibly with a core dump
      on Sep 4, 2008
    3. added
      type-bugAn unexpected behavior, bug, or error
      and removed
      type-crashA hard crash of the interpreter, possibly with a core dump
      on Feb 9, 2010
    4. changed the title [-]test_httpservers intermittent failure[/-] [+]test_httpservers intermittent failure, test_post and EINTR[/+] on Apr 18, 2010
    5. skrah commented on May 14, 2010

      skrahmannequin
      Mannequin

      The EINTR issue should be fixed in trunk (bpo-1628205). Have you by
      any chance run the test suite on trunk in the meantime?

    6. gpshead commented on Jun 5, 2011

      @gpshead
      Member

      This was fixed in the other bug in 2.6 and 2.7.

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

      extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions