#6774 BLOC Update.: Read fails to transfer document when using salut
Zarro Boogs per Child
bugtracker at laptop.org
Thu Mar 27 13:21:12 EDT 2008
#6774: Read fails to transfer document when using salut
------------------------------+---------------------------------------------
Reporter: marco | Owner: Collabora
Type: defect | Status: new
Priority: blocker | Milestone: Update.1
Component: telepathy-salut | Version:
Resolution: | Keywords: release?
Verified: 0 | Blocking:
Blockedby: |
------------------------------+---------------------------------------------
Changes (by cjb):
* cc: rwh (added)
* keywords: => release?
* priority: normal => blocker
Comment:
There's a very interesting traceback in here:
{{{
---------------------------------------------------------------------------
<type 'exceptions.IOError'> Traceback (most recent call
last)
/home/olpc/Activities/Read.activity/readactivity.py in
_download_document(self=<ReadActivity object at 0x84390cc (SugarActivity
at 0x873f800)>, tube_id=dbus.UInt32(1048158443L))
273 getter.connect("error", self._download_error_cb, tube_id)
274 _logger.debug("Starting download to %s...",
self._jobject.file_path)
--> 275 getter.start(self._jobject.file_path)
getter.start = <bound method GlibURLDownloader.start of
<GlibURLDownloader object at 0x86f92ac (sugar+network+GlibURLDownloader at
0x87ec310)>>
self._jobject.file_path =
'/home/olpc/isolation/1/uid_to_home_dir/10006/tmp/1206619576'
276 return False
277
/usr/lib/python2.5/site-packages/sugar/network.py in
start(self=<GlibURLDownloader object at 0x86f92ac
(sugar+network+GlibURLDownloader at 0x87ec310)>,
destfile='/home/olpc/isolation/1/uid_to_home_dir/10006/tmp/1206619576',
destfd=None)
200
201 def start(self, destfile=None, destfd=None):
--> 202 self._info = urllib.urlopen(self._url)
self._info = undefined
global urllib.urlopen = <function urlopen at 0x840ebfc>
self._url = 'http://127.0.0.1:58376/document'
203 self._outf = None
204 self._fname = None
/usr/lib/python2.5/urllib.py in
urlopen(url='http://127.0.0.1:58376/document', data=None, proxies=None)
80 opener = _urlopener
81 if data is None:
---> 82 return opener.open(url)
opener.open = <bound method FancyURLopener.open of
<urllib.FancyURLopener instance at 0x86fd18c>>
url = 'http://127.0.0.1:58376/document'
83 else:
84 return opener.open(url, data)
/usr/lib/python2.5/urllib.py in open(self=<urllib.FancyURLopener instance
at 0x86fd18c>, fullurl='http://127.0.0.1:58376/document', data=None)
188 try:
189 if data is None:
--> 190 return getattr(self, name)(url)
global getattr = undefined
self = <urllib.FancyURLopener instance at 0x86fd18c>
name = 'open_http'
url = '//127.0.0.1:58376/document'
191 else:
192 return getattr(self, name)(url, data)
/usr/lib/python2.5/urllib.py in open_http(self=<urllib.FancyURLopener
instance at 0x86fd18c>, url='//127.0.0.1:58376/document', data=None)
326 if data is not None:
327 h.send(data)
--> 328 errcode, errmsg, headers = h.getreply()
errcode = undefined
errmsg = undefined
headers = undefined
h.getreply = <bound method HTTP.getreply of <httplib.HTTP instance
at 0x86fd2ac>>
329 fp = h.getfile()
330 if errcode == 200:
/usr/lib/python2.5/httplib.py in getreply(self=<httplib.HTTP instance at
0x86fd2ac>)
1193 """
1194 try:
-> 1195 response = self._conn.getresponse()
response = undefined
self._conn.getresponse = <bound method HTTPConnection.getresponse
of <httplib.HTTPConnection instance at 0x86fd28c>>
1196 except BadStatusLine, e:
1197 ### hmm. if getresponse() ever closes the socket on a
bad request,
/usr/lib/python2.5/httplib.py in getresponse(self=<httplib.HTTPConnection
instance at 0x86fd28c>)
922 method=self._method)
923
--> 924 response.begin()
response.begin = <bound method HTTPResponse.begin of
<httplib.HTTPResponse instance at 0x86fd2cc>>
925 assert response.will_close != _UNKNOWN
926 self.__state = _CS_IDLE
/usr/lib/python2.5/httplib.py in begin(self=<httplib.HTTPResponse instance
at 0x86fd2cc>)
383 # read until we get a non-100 response
384 while True:
--> 385 version, status, reason = self._read_status()
version = undefined
status = undefined
reason = undefined
self._read_status = <bound method HTTPResponse._read_status of
<httplib.HTTPResponse instance at 0x86fd2cc>>
386 if status != CONTINUE:
387 break
/usr/lib/python2.5/httplib.py in _read_status(self=<httplib.HTTPResponse
instance at 0x86fd2cc>)
341 def _read_status(self):
342 # Initialize with Simple-Response defaults
--> 343 line = self.fp.readline()
line = undefined
self.fp.readline = <bound method _fileobject.readline of
<socket._fileobject object at 0x86e617c>>
344 if self.debuglevel > 0:
345 print "reply:", repr(line)
/usr/lib/python2.5/socket.py in readline(self=<socket._fileobject object
at 0x86e617c>, size=-1)
328 recv = self._sock.recv
329 while data != "\n":
--> 330 data = recv(1)
data = ''
recv = <built-in method recv of _socket.socket object at
0x86fa170>
331 if not data:
332 break
<type 'exceptions.IOError'>: [Errno socket error] (104, 'Connection reset
by peer')
}}}
Read doesn't appear to be doing any retrying, and it seems clear to me
that it should. It could both retry the connection over the chosen Tube,
and switch to a different Tube. What does everyone else think?
--
Ticket URL: <http://dev.laptop.org/ticket/6774#comment:6>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list