should catch and hide EINTR

Bug #412159 reported by Chad Miller on 2009-08-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
desktopcouch
Medium
Chad Miller
python-couchdb (Ubuntu)
Medium
Chad Miller

Bug Description

Binary package hint: python-couchdb

Any syscall can be interrupted. The interface that maps python objects to system calls should handle interruptions, instead of percolating them up to what looks like python-object primitive functions.

couchdb.client._make_request

should catch OSError and test exception errno for errno.EINTR.

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/testtools/testcase.py", line 175, in run
    testMethod()
  File "/home/cmiller/work/cabzr/desktopcouch/getport-at-call-time/desktopcouch/records/tests/test_server.py", line 162, in test_list_views
    self.database.delete_view(view_name, design_doc)
  File "/home/cmiller/work/cabzr/desktopcouch/getport-at-call-time/desktopcouch/records/server.py", line 166, in delete_view
    del self.db[doc_id]
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 303, in __delitem__
    self.resource.delete(id, rev=resp['etag'].strip('"'))
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 971, in delete
    return self._request('DELETE', path, headers=headers, **params)
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1010, in _request
    resp, data = _make_request()
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1005, in _make_request
    body=body, headers=headers)
  File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 1068, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 872, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 842, in _conn_request
    response = conn.getresponse()
  File "/usr/lib/python2.6/httplib.py", line 950, in getresponse
    response.begin()
  File "/usr/lib/python2.6/httplib.py", line 390, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.6/httplib.py", line 348, in _read_status
    line = self.fp.readline()
  File "/usr/lib/python2.6/socket.py", line 395, in readline
    data = recv(1)
socket.error: [Errno 4] Interrupted system call

Elliot Murphy (statik) on 2009-11-25
Changed in python-couchdb (Ubuntu):
assignee: nobody → Chad Miller (cmiller)
Changed in desktopcouch:
assignee: nobody → Chad Miller (cmiller)
status: New → Confirmed
importance: Undecided → Medium
Jonathan Davies (jpds) on 2009-12-08
Changed in python-couchdb (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
JACQUELINE (ijdisabest) on 2015-01-30
Changed in desktopcouch:
status: Confirmed → Fix Released
Changed in python-couchdb (Ubuntu):
status: Confirmed → Fix Released
Colin Watson (cjwatson) on 2015-01-30
Changed in python-couchdb (Ubuntu):
status: Fix Released → Confirmed
Tom Haddon (mthaddon) on 2015-01-30
Changed in desktopcouch:
status: Fix Released → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers