➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
标题: test_httpservers intermittent failure, test_post and EINTR
类型: behavior Stage:
Components: Extension Modules Versions: Python 2.6
process
状态: closed Resolution: fixed
Dependencies: 1628205 后续:
分配给: 抄送列表: djmdjm, gregory.p.smith, skrah
优先级: normal 关键字:

Created on 2008-09-04 00:47 by djmdjm, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg72443 - (view) Author: Damien Miller (djmdjm) 日期: 2008-09-04 00:47
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.
msg105701 - (view) Author: Stefan Krah (skrah) * (Python committer) 日期: 2010-05-14 12:20
The EINTR issue should be fixed in trunk (issue1628205). Have you by
any chance run the test suite on trunk in the meantime?
msg137713 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) 日期: 2011-06-05 20:31
This was fixed in the other bug in 2.6 and 2.7.
历史
日期 用户 动作 参数
2022-04-11 14:56:38admin修改github: 48021
2011-06-05 20:31:39gregory.p.smith修改状态: open -> closed

抄送: + gregory.p.smith
消息: + msg137713

dependencies: + socket.readline() interface doesn't handle EINTR properly
resolution: fixed
2010-05-14 12:20:58skrah修改抄送: + skrah
消息: + msg105701
2010-04-18 22:20:48vstinner修改标题: test_httpservers intermittent failure -> test_httpservers intermittent failure, test_post and EINTR
2010-02-09 16:33:31brian.curtin修改type: crash -> behavior
2008-09-04 00:47:18djmdjm创建