[Xapian-tickets] [Xapian] #654: Getting EOF when using get_data() in a remote database

Xapian nobody at xapian.org
Wed Sep 17 06:35:03 BST 2014


#654: Getting EOF when using get_data() in a remote database
---------------------------+------------------
        Reporter:  Kronuz  |      Owner:  olly
            Type:  defect  |     Status:  new
        Priority:  normal  |  Milestone:
       Component:  Other   |    Version:
        Severity:  normal  |   Keywords:
      Blocked By:          |   Blocking:
Operating System:  All     |
---------------------------+------------------
\
\
 I'm getting these exceptions when using get_data() in a remote chert
 database... in 1.2.18 and trunk (1.3.1):

 Some times (most of the time):
 `xapian.NetworkError: Received EOF (context: remote:tcp(localhost:8900))`

 Some times (not so often):
 `xapian.DatabaseCorruptError: REMOTE:find_entry failed to find any entry
 at all! (context: remote:tcp(localhost:8900))`

 Other times, it works as expected. In Brass, it seems to work always.

 I have been able to reproduce this only when using the remote database,
 however, this seems like a lower level bug (in the chert backend).

 This happens when you have two databases open, one for writing, one for
 reading. Then, doing a read query in the read database to get a document's
 `get_data()`. Then writing something in the write database, doing commit.
 Then doing the read query again in the read database (`get_data()`).

 To reproduce:
 Create a blank new Chert database, launching: `xapian-tcpsrv --timeout=0
 --port=8900 --writable bug` in an empty directory.

 Then run the attached file: `python bug.py`, you should receive an
 exception: `xapian.NetworkError: Received EOF (context:
 remote:tcp(localhost:8900))`, if not, try running `python bug.py` a few
 times.

 Problem with the EOF is that when `ChertCursor::get_key()` is called,
 `Key::read()` tries to assign `(p + K1)` with a `Key::length()` that is
 returned as `-3`.
\
\
\

--
Ticket URL: <http://trac.xapian.org/ticket/654>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list