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

test_urllib2_localnet sporadic failures closing socket #50630

Closed
bitdancer opened this issue Jun 30, 2009 · 6 comments
Closed

test_urllib2_localnet sporadic failures closing socket #50630

bitdancer opened this issue Jun 30, 2009 · 6 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@bitdancer
Copy link
Member

BPO 6381
Nosy @kristjanvalur, @bitdancer

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-12-13.17:59:39.085>
created_at = <Date 2009-06-30.01:40:18.738>
labels = ['type-bug', 'tests']
title = 'test_urllib2_localnet sporadic failures closing socket'
updated_at = <Date 2009-12-13.17:59:39.084>
user = 'https://github.com/bitdancer'

bugs.python.org fields:

activity = <Date 2009-12-13.17:59:39.084>
actor = 'r.david.murray'
assignee = 'none'
closed = True
closed_date = <Date 2009-12-13.17:59:39.085>
closer = 'r.david.murray'
components = ['Tests']
creation = <Date 2009-06-30.01:40:18.738>
creator = 'r.david.murray'
dependencies = []
files = []
hgrepos = []
issue_num = 6381
keywords = []
message_count = 6.0
messages = ['89896', '90084', '90085', '90106', '90119', '96341']
nosy_count = 2.0
nosy_names = ['kristjan.jonsson', 'r.david.murray']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue6381'
versions = ['Python 2.7']

@bitdancer
Copy link
Member Author

Gentoo linux, r73699, I'm seeing sporadic failures in
test_urllib2_localnet in the following two tests:

test_sending_headers
test_proxy_with_no_password_raises_httperror

It happens about once every other run in one or the other of those. I
don't see any problems on 2.6-maint or py3k.

In both cases it is failing in the close. Here is an example traceback:

test_sending_headers (test.test_urllib2_localnet.TestUrlopen) ...
----------------------------------------

Exception happened during processing of request from ('127.0.0.1', 46051)
Traceback (most recent call last):
  File "/home/rdmurray/python/trunk/Lib/SocketServer.py", line 281, in
_handle_request_noblock
    self.process_request(request, client_address)
  File "/home/rdmurray/python/trunk/Lib/SocketServer.py", line 308, in
process_request
    self.close_request(request)
  File "/home/rdmurray/python/trunk/Lib/SocketServer.py", line 448, in
close_request
    request.shutdown(socket.SHUT_WR)
  File "/home/rdmurray/python/trunk/Lib/socket.py", line 219, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected
----------------------------------------
Exception in thread Thread-12:
Traceback (most recent call last):
  File "/home/rdmurray/python/trunk/Lib/threading.py", line 524, in
__bootstrap_inner
    self.run()
  File "/home/rdmurray/python/trunk/Lib/test/test_urllib2_localnet.py",
line 65, in run
    self.httpd.handle_request()
  File "/home/rdmurray/python/trunk/Lib/SocketServer.py", line 266, in
handle_request
    self._handle_request_noblock()
  File "/home/rdmurray/python/trunk/Lib/SocketServer.py", line 284, in
_handle_request_noblock
    self.close_request(request)
  File "/home/rdmurray/python/trunk/Lib/SocketServer.py", line 448, in
close_request
    request.shutdown(socket.SHUT_WR)
  File "/home/rdmurray/python/trunk/Lib/socket.py", line 219, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 107] Transport endpoint is not connected

@bitdancer bitdancer added type-security A security issue tests Tests in the Lib/test dir labels Jun 30, 2009
@kristjanvalur
Copy link
Mannequin

kristjanvalur mannequin commented Jul 3, 2009

Clearly some platforms automatically set the shutdown state, and we need
to catch that error.

@kristjanvalur
Copy link
Mannequin

kristjanvalur mannequin commented Jul 3, 2009

Commited revision 73819
Please test on gentoo

@bitdancer
Copy link
Member Author

Test passes consistently now on trunk in Gentoo.

@kristjanvalur
Copy link
Mannequin

kristjanvalur mannequin commented Jul 4, 2009

meged to py3k in revision 73845

@bitdancer
Copy link
Member Author

NB: this issue was caused by the bpo-6267 patch.

@bitdancer bitdancer added type-bug An unexpected behavior, bug, or error and removed type-security A security issue labels Dec 13, 2009
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant