You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a certain exception that the mirrorprobe might run into, which is not caught by the code,
even though it should. Symptom:
Exception in thread probeThread-273:
Traceback (most recent call last):
File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
self.run()
File "/usr/lib/python2.5/threading.py", line 446, in run
self.__target(_self.__args, *_self.__kwargs)
File "/usr/bin/mirrorprobe", line 97, in probe_http
mirror.response = e.read()
File "/usr/lib/python2.5/socket.py", line 291, in read
data = self._sock.recv(recv_size)
File "/usr/lib/python2.5/httplib.py", line 509, in read
return self._read_chunked(amt)
File "/usr/lib/python2.5/httplib.py", line 544, in _read_chunked
line = self.fp.readline()
File "/usr/lib/python2.5/socket.py", line 331, in readline
data = recv(1)
timeout: timed out
The code does have exception handling for this case. However, the exception, which happens deep
in the socket module, is not correctly passed to upper layers. Thus, there doesn't seem to be a way
to get hold of it.
In trunk, I have now wrapped the entire thread code into another try-except block. That is ugtly,
but helps.
A hard-to-catch exception is now handled. If Python's socket module ran into
a timeout while reading a chunked response, the exception would not be passed
correctly to the upper layer, so it could not be caught by its name. We now
wrap the entire thread into another exception, which would otherwise be bad
practice, but is probably okay here, since we already catch all other exceptions.
History
Date User Action Args
2010-03-27 15:20:57 poeml set status: testing -> resolved
messages: + msg166
2010-03-27 15:10:54 poeml create
(end of migrated issue)
The text was updated successfully, but these errors were encountered:
Issue migrated (2015-06-05) from old issue tracker http://mirrorbrain.org/issues/issue46
msg165 (view) Author: poeml Date: 2010-03-27.15:10:53
There is a certain exception that the mirrorprobe might run into, which is not caught by the code,
even though it should. Symptom:
Exception in thread probeThread-273:
Traceback (most recent call last):
File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
self.run()
File "/usr/lib/python2.5/threading.py", line 446, in run
self.__target(_self.__args, *_self.__kwargs)
File "/usr/bin/mirrorprobe", line 97, in probe_http
mirror.response = e.read()
File "/usr/lib/python2.5/socket.py", line 291, in read
data = self._sock.recv(recv_size)
File "/usr/lib/python2.5/httplib.py", line 509, in read
return self._read_chunked(amt)
File "/usr/lib/python2.5/httplib.py", line 544, in _read_chunked
line = self.fp.readline()
File "/usr/lib/python2.5/socket.py", line 331, in readline
data = recv(1)
timeout: timed out
The code does have exception handling for this case. However, the exception, which happens deep
in the socket module, is not correctly passed to upper layers. Thus, there doesn't seem to be a way
to get hold of it.
In trunk, I have now wrapped the entire thread code into another try-except block. That is ugtly,
but helps.
msg166 (view) Author: poeml Date: 2010-03-27.15:20:57
r8022 | poeml | 2010-03-27 16:19:13 +0100 (Sat, 27 Mar 2010) | 8 lines
mirrorprobe:
a timeout while reading a chunked response, the exception would not be passed
correctly to the upper layer, so it could not be caught by its name. We now
wrap the entire thread into another exception, which would otherwise be bad
practice, but is probably okay here, since we already catch all other exceptions.
(end of migrated issue)
The text was updated successfully, but these errors were encountered: