Opened 16 years ago

Closed 16 years ago

#357 closed defect (worksforme)

Database error - inflate failed

Reported by: Jason Chapin Owned by: Olly Betts
Priority: normal Milestone:
Component: Backend-Flint Version: 1.0.11
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Linux

Description

Freshly compiled xapain-core, xapian-omega and xapian-bindings 1.0.11 on a CentOS 4.7 x86 machine. Using the php bindings with PHP 5.1.6. I am using scriptindex to populate a database, that finishes with no problem. If I run the quest utility on the database, also no problem. However when php is involved this error occurs:

$ php simplesearch.php /path/to/xapian/db foo Parsed query is: Xapian::Query(Zfoo:(pos=1)) 2 results found: DatabaseError: inflate failed (invalid stored block lengths)

Following the same install procedure on a CentOS 5.2 machine has no problems. Just a wild guess, the centOS 4.7 machine has incompatible zlib?

Thanks for any help. -jason

Change History (7)

comment:1 by Jason Chapin, 16 years ago

Sorry, this formatting may be more helpful:

$ php simplesearch.php /path/to/xapian/db foo 
Parsed query is: Xapian::Query(Zfoo:(pos=1)) 2 results found: 
DatabaseError: inflate failed (invalid stored block lengths) 

comment:2 by Richard Boulton, 16 years ago

I'm slightly confused by your suggestion about an incompatible zlib - did you create the database (ie, run scriptindex) on the CentOS 4.7 machine or the CentOS 5.2 machine? If it was on a different machine to the machine you ran PHP on, then some incompatibility is a possibility. If it was on the same machine, then I can't see how there could be a zlib version compatibility error.

If it was on a different machine, what version of xapian is on that machine, and was used to create the database? And, what versions of zlib are installed on each machine?

comment:3 by Jason Chapin, 16 years ago

I just suggested a zlib problem because googling the error message resulted in a lot of hits referring to zlib.

Each machine had xapian 1.0.11 installed from source. And the database was built using scriptindex on each machine separately. On each machine PHP is also installed and the simplesearch.php5 (from http://xapian.org/docs/bindings/php/) script was run, producing the error, on the CentOS 4.7 box.

CentOS 4.7 box has zlib 1.2.1.2-1.2.

CentOS 5.2 box has zlib 1.2.3-3.

comment:4 by Richard Boulton, 16 years ago

Ok, well, it certainly sounds like a problem with the zlib library on CentOS 4.7.

The zlib website says: "Version 1.2.3 eliminates potential security vulnerabilities in zlib 1.2.1 and 1.2.2, so all users of those versions should upgrade immediately." I assume that the 1.2.1.2-1.2 package you have has some security fixes backported to it by CentOS - it's possible that there's a bug fix in 1.2.3 which hasn't been backported, or that they did the backport incorrectly.

To try and work this out, I've just been browsing around, but I can't find a way to download a copy of the source for the zlib 1.2.1.2-1.2 package from centos. I'd like to try a compile using that version on my system, to see if it fails in a similar way to that which you're seeing. If so, we'll have to tell configure that that version of zlib isn't suitable for use with Xapian.

Can you try running the Xapian test suite on the centos 4.7 box? Just run "make check" in the xapian-core directory. Let us know if there are any failures (and if so, what they say).

comment:5 by Jason Chapin, 16 years ago

I ran "make check". There was one failure:

Running test: adddoc6... EXCEPTION: Failed to get 'Listening...' from comman...

That was in the apitest section.

comment:6 by Jason Chapin, 16 years ago

Well I was able to successfully build 1.0.11 on a CentOS 4.3 machine, also using the same zlib version as the 4.7 machine so maybe zlib was not to blame. Regardless, feel free to close this ticket now.

comment:7 by Olly Betts, 16 years ago

Component: Xapian-bindingsBackend-Flint
Resolution: worksforme
Status: newclosed

OK, resolving as "worksforme" which seems the most appropriate choice.

If you can reproduce this on another box, let us know.

Note: See TracTickets for help on using tickets.