Jesper Krogh | 1 Feb 06:23

Re: Failure trying to update document.

Olly Betts wrote:
> On Sun, Jan 31, 2010 at 08:00:02PM +0100, Jesper Krogh wrote:
>> Jesper Krogh wrote:
>>> Which is kind of odd, it matches the documents terms gets the docid but
>>> fails to get the termslist?
> 
> The postlist is used to find the documents matching particular terms.  The
> termlist holds the reverse mapping - for each document, it stores the list
> of terms which index it.
> 
>> $ xapian-check termlist.DB
>> baseA blocksize=8K items=2980957 lastblock=2357252 revision=2452
>> levels=3 root=108
>> B-tree error 90
>> xapian-check: btree error
>>
>> Can I somehow "fix" it?
> 
> The error here is that the keys in the Btree don't satisfy an expected
> invariant, so it's hard to know quite how corrupted things are.
> 
> If you have the original data, rebuilding is the simplest and safest
> option.
> 
> You may be able to use copydatabase to generate a good copy.  If the
> issue is just a missing termlist entry for one (or several) documents,
> that would skip those, but if things are more messed up it may fail.

I tried to run xapian-compact over night. It has processed the termlist
now and xapian-check is ok on it. Now I'm just waiting for the
(Continue reading)

Olly Betts | 1 Feb 06:51
Favicon
Gravatar

Re: Failure trying to update document.

On Mon, Feb 01, 2010 at 06:23:47AM +0100, Jesper Krogh wrote:
> Olly Betts wrote:
> > If you have the original data, rebuilding is the simplest and safest
> > option.
> > 
> > You may be able to use copydatabase to generate a good copy.  If the
> > issue is just a missing termlist entry for one (or several) documents,
> > that would skip those, but if things are more messed up it may fail.
> 
> I tried to run xapian-compact over night. It has processed the termlist
> now and xapian-check is ok on it. Now I'm just waiting for the
> position.DB to finish.

That would fix the problem if it is just with a dividing key in a non-leaf
block.  If an entry is actually missing, you'll still get DocNotFoundError,
and copydatabase may still help.

Cheers,
    Olly
Henry C. | 1 Feb 09:38
Picon

Re: postlist: Tag containing meta information is corrupt.


Thanks to Richard and Olly for sorting out this bug.

Just checking - wrt http://trac.xapian.org/ticket/427:

When running xapian-check, the previous problem has been resolved, but I
still get "Tag containing meta information is corrupt." on the postlist,
resulting in retcode 1.

Is this something which can be safely ignored for now?

Thanks
Henry
Tom | 1 Feb 10:48
Gravatar

Solaris core dump

Hi everyone,

I'm having a problem with xapian (the matchspy branch, with Python
bindings) on Solaris 10 / SPARC. Users can run queries for a few hours
with no problems, then it returns "inflate failed (invalid code
lengths set)"  to Python and dumps core. gdb reports:

#0  0xfe6dc910 in inflate_table () from /usr/lib/libz.so.1
#1  0xfe6d9d6c in inflate () from /usr/lib/libz.so.1
#2  0xfe2ebe20 in FlintTable::read_tag (this=0x75ed70, C_=0x75ede0,
   tag=0xfdcf8568, keep_compressed=false)
   at backends/flint/flint_table.cc:1254
#3  0xfe2eff70 in FlintTable::get_exact_entry (this=0x75ed70, key=@0xfdcf8578,
   tag=@0xfdcf8568) at backends/flint/flint_table.cc:1190
#4  0xfe2ddc04 in FlintSpellingTable::open_termlist (this=0x75ed70,
   word=@0xfdcf8998) at backends/flint/flint_spelling.h:46
#5  0xfe20dcb0 in Xapian::Database::get_spelling_suggestion (this=0x75b5a8,
   word=@0xfdcf8998, max_edit_distance=2) at include/xapian/base.h:476
#6  0xfe39ba90 in Xapian::QueryParser::Internal::parse_query (this=0x75b590,
   qs=@0x798288, flags=128, default_prefix=@0xfdcf8a44)
   at queryparser/queryparser.lemony:948
#7  0xfe38fa0c in Xapian::QueryParser::parse_query (this=0x798218,
   query_string=@0x798288, flags=128, default_prefix=@0xfdcf8be0)
   at include/xapian/base.h:154
#8  0xfe5551f0 in _wrap_QueryParser_parse_query (self=0x0, args=0x712648)
   at /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../include/c++/3.4.3/ext/new_allocator.h:69
#9  0x00117290 in PyCFunction_Call (func=0x60d9e0, arg=0x712648, kw=0x0)
   at Objects/methodobject.c:116

This doesn't seem to be related to any particular query, and I haven't
(Continue reading)

Tom | 1 Feb 10:41
Picon
Gravatar

Xapian core dumping on Solaris

Hi everyone,

I'm having a problem with xapian (the matchspy branch, with Python
bindings) on Solaris 10 / SPARC. Users can run queries for a few hours
with no problems, then it returns "inflate failed (invalid code
lengths set)"  to Python and dumps core. gdb reports:

#0  0xfe6dc910 in inflate_table () from /usr/lib/libz.so.1
#1  0xfe6d9d6c in inflate () from /usr/lib/libz.so.1
#2  0xfe2ebe20 in FlintTable::read_tag (this=0x75ed70, C_=0x75ede0,
    tag=0xfdcf8568, keep_compressed=false)
    at backends/flint/flint_table.cc:1254
#3  0xfe2eff70 in FlintTable::get_exact_entry (this=0x75ed70, key=@0xfdcf8578,
    tag=@0xfdcf8568) at backends/flint/flint_table.cc:1190
#4  0xfe2ddc04 in FlintSpellingTable::open_termlist (this=0x75ed70,
    word=@0xfdcf8998) at backends/flint/flint_spelling.h:46
#5  0xfe20dcb0 in Xapian::Database::get_spelling_suggestion (this=0x75b5a8,
    word=@0xfdcf8998, max_edit_distance=2) at include/xapian/base.h:476
#6  0xfe39ba90 in Xapian::QueryParser::Internal::parse_query (this=0x75b590,
    qs=@0x798288, flags=128, default_prefix=@0xfdcf8a44)
    at queryparser/queryparser.lemony:948
#7  0xfe38fa0c in Xapian::QueryParser::parse_query (this=0x798218,
    query_string=@0x798288, flags=128, default_prefix=@0xfdcf8be0)
    at include/xapian/base.h:154
#8  0xfe5551f0 in _wrap_QueryParser_parse_query (self=0x0, args=0x712648)
    at /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../include/c++/3.4.3/ext/new_allocator.h:69
#9  0x00117290 in PyCFunction_Call (func=0x60d9e0, arg=0x712648, kw=0x0)
    at Objects/methodobject.c:116

This doesn't seem to be related to any particular query, and I haven't
(Continue reading)

Richard Boulton | 1 Feb 10:57
Gravatar

Re: Xapian core dumping on Solaris

On 1 February 2010 09:41, Tom <banoffi <at> gmail.com> wrote:
> I'm having a problem with xapian (the matchspy branch, with Python
> bindings) on Solaris 10 / SPARC. Users can run queries for a few hours
> with no problems, then it returns "inflate failed (invalid code
> lengths set)"  to Python and dumps core. gdb reports:

To be clear - when you say "returns "inflate failed ..." to Python",
do you mean that it prints that message out on the console?  Or does
it return a value to python, and then dump core shortly afterwards?

> This doesn't seem to be related to any particular query, and I haven't
> worked out a simple way to reproduce the error. There is no database
> writer while all this happens.

Is this in a single threaded environment?  The most likely cause of
this kind of error is accidentally calling a xapian object from two
threads simultaneously.

> Any ideas? I might try rebuilding with the latest version of zlib -
> does that sound sensible?

Sounds worth a try - what zlib version are you using currently?

> Could it even be a low-level I/O error?

Could be, but it doesn't look particularly likely to me, from that traceback.

--

-- 
Richard

(Continue reading)

Tom | 1 Feb 11:06
Picon
Gravatar

Re: Xapian core dumping on Solaris

On 1 February 2010 09:57, Richard Boulton <richard <at> tartarus.org> wrote:
> On 1 February 2010 09:41, Tom <banoffi <at> gmail.com> wrote:
>> I'm having a problem with xapian (the matchspy branch, with Python
>> bindings) on Solaris 10 / SPARC. Users can run queries for a few hours
>> with no problems, then it returns "inflate failed (invalid code
>> lengths set)"  to Python and dumps core. gdb reports:
>
> To be clear - when you say "returns "inflate failed ..." to Python",
> do you mean that it prints that message out on the console?  Or does
> it return a value to python, and then dump core shortly afterwards?

Hi Richard,

The latter. The error message is caught and logged before the process dies.

>> This doesn't seem to be related to any particular query, and I haven't
>> worked out a simple way to reproduce the error. There is no database
>> writer while all this happens.
>
> Is this in a single threaded environment?  The most likely cause of
> this kind of error is accidentally calling a xapian object from two
> threads simultaneously.

It's a multithreaded web app, using web.py. The only shared object,
though, is the Database. That's safe, isn't it?

>> Any ideas? I might try rebuilding with the latest version of zlib -
>> does that sound sensible?
>
> Sounds worth a try - what zlib version are you using currently?
(Continue reading)

Richard Boulton | 1 Feb 11:09
Gravatar

Re: Xapian core dumping on Solaris

On 1 February 2010 10:06, Tom <banoffi <at> gmail.com> wrote:
> The latter. The error message is caught and logged before the process dies.

Weird - the backtrace makes it look like the process has died in the
middle of a call to zlib, so I can't see how it could return the error
to Python before dumping core.

> It's a multithreaded web app, using web.py. The only shared object,
> though, is the Database. That's safe, isn't it?

No (assuming you mean the Xapian Database).  You can't have any Xapian
objects accessed concurrently, including the Database objects (or any
objects derived from them, like iterator objects, since those will
access the Database internally).

--

-- 
Richard
Tom | 1 Feb 12:01
Picon
Gravatar

Re: Xapian core dumping on Solaris

On 1 February 2010 10:09, Richard Boulton <richard <at> tartarus.org> wrote:
> On 1 February 2010 10:06, Tom <banoffi <at> gmail.com> wrote:
>> The latter. The error message is caught and logged before the process dies.
>
> No (assuming you mean the Xapian Database).  You can't have any Xapian
> objects accessed concurrently, including the Database objects (or any
> objects derived from them, like iterator objects, since those will
> access the Database internally).

OK, I've fixed that - there are no shared Xapian objects at all. But
it's just crashed again, with a different backtrace:

#0  0xfe1196d0 in std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string () from
/usr/sfw/lib/libstdc++.so.6
#1  0xfe22e9a4 in Internal (this=0x3a1680, copyme=@0x7b4e00)
    at api/omqueryinternal.cc:654
#2  0xfe22e9f4 in Internal (this=0x5788ac, copyme=@0x7b0cc8)
    at /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/stl_iterator.h:614
#3  0xfe34b180 in LocalSubMatch (this=0x5788a0, db_=0x795f10, query=0x7b0cc8,
    qlen_=4, omrset=@0x56e4c0, wt_factory_=0x7e3608)
    at matcher/localmatch.cc:49
#4  0xfe360424 in MultiMatch (this=0xfdaf8770, db_=@0x57df5c,
    query_=0x7b0cc8, qlen=4, omrset=0x0, collapse_max_=0,
    collapse_key_=4256138712, percent_cutoff_=5694656, weight_cutoff_=0,
    order_=Xapian::Enquire::ASCENDING, sort_key_=1,
    sort_by_=Xapian::Enquire::Internal::REL, sort_value_forward_=true,
    sorter_=0x0, errorhandler_=0x0, stats=@0xfdaf8808, weight_=0xffffff00,
    matchspies_=@0xffffff00)
    at /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/stl_vector.h:462
(Continue reading)

Tom | 1 Feb 12:18
Picon
Gravatar

Re: Xapian core dumping on Solaris

And another -

#0  0xff056328 in _smalloc () from /usr/lib/libc.so.1
#1  0xff05639c in malloc () from /usr/lib/libc.so.1
#2  0xfe137ae4 in operator new () from /usr/sfw/lib/libstdc++.so.6
#3  0xfe119598 in std::string::_Rep::_S_create ()
   from /usr/sfw/lib/libstdc++.so.6
#4  0xfe3aa730 in std::string::_S_construct<char*> (
    __beg=0x7ac6dc "and, 1, 2b8]", __end=0x7ac6e5 "b8]", __a=@0xfdef81f0)
    at /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/basic_string.tcc:150
#5  0xfe3ad86c in basic_string<char*> (this=0xfdef81f8,
    __beg=0x7ac6dc "and, 1, 2b8]", __end=0x7ac6e5 "b8]", __a=@0xfdef81f0)
    at /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/basic_string.h:1386
#6  0xfe2296e8 in Query (this=0xfdef84b8, tname_=@0xfe43d740, wqf_=1, pos_=2)
    at /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../include/c++/3.4.3/ext/new_allocator.h:62
#7  0xfe393380 in Term::get_query (this=0x1d9630)
    at /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/stl_list.h:210
#8  0xfe393db4 in Term::get_query_with_auto_synonyms (this=0x1d9630)
    at queryparser/queryparser.lemony:303
#9  0xfe394628 in TermGroup::as_group (this=0x6f1ed8, state=0xfdef8a60)
    at /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/stl_iterator.h:614
#10 0xfe3982c4 in yy_reduce (yypParser=0x74e608, yyruleno=36)
    at queryparser/queryparser.lemony:1708
#11 0xfe3996c4 in Parse (yypParser=0x74e608, yymajor=0, yyminor=0x0,
    state=0x0) at queryparser/queryparser_internal.cc:2674
#12 0xfe39a8ec in Xapian::QueryParser::Internal::parse_query (this=0x340c20,
    qs=@0x6f6ee0, flags=128, default_prefix=@0xfdef8a44)
    at queryparser/queryparser.lemony:1045
#13 0xfe38fa0c in Xapian::QueryParser::parse_query (this=0x6f6e90,
    query_string=@0x6f6ee0, flags=128, default_prefix=@0xfdef8be0)
(Continue reading)


Gmane