Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: kinosearch: discuss

Segfault with KinoSearch SVN

 

 

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded


edwardbetts at gmail

Jul 9, 2007, 6:02 AM

Post #1 of 4 (735 views)
Permalink
Segfault with KinoSearch SVN

Using KinoSearch from subversion, this minimal test case causes a
segmentation fault.

#!/usr/bin/perl

use strict; use warnings;

package Schema::NoAnalyze;
use base qw( KinoSearch::Schema::FieldSpec );
sub analyzed { 0 }

package Schema;
use base qw( KinoSearch::Schema );
use KinoSearch::Analysis::PolyAnalyzer;

our %fields = ( noanalyze => 'Schema::NoAnalyze' );

sub analyzer { KinoSearch::Analysis::PolyAnalyzer->new( language => 'en' ) }

package main;

use KinoSearch::InvIndexer;
use KinoSearch::Searcher;

my $index_dir = "test_index";

my $index = KinoSearch::InvIndexer->new(
invindex => Schema->clobber($index_dir)
);
$index->add_doc({ noanalyze => 'value' });
$index->finish();

my $query = KinoSearch::Search::BooleanQuery->new;
my $term = KinoSearch::Search::TermQuery->new(
term => KinoSearch::Index::Term->new( noanalyze => 'value' ),
);
$query->add_clause( query => $term, occur => 'SHOULD' );

my $searcher = KinoSearch::Searcher->new(
invindex => Schema->open($index_dir)
);
$searcher->search( query => $query );


marvin at rectangular

Jul 10, 2007, 1:40 AM

Post #2 of 4 (681 views)
Permalink
Segfault with KinoSearch SVN [In reply to]

On Jul 9, 2007, at 5:59 AM, Edward Betts wrote:

> Using KinoSearch from subversion, this minimal test case causes a
> segmentation fault.

Edward, you're awesome about supplying these test cases.
Unfortunately, in this instance, I'm not able to duplicate the
problem. The script proceeds without incident on both FreeBSD and
RedHat 9, and Valgrind reveals no memory errors.

I suggest you try rebuilding KS from scratch, then run it again --
try "./Build distclean", then the usual "perl Build.PL", etc.

If you're still having problems, let me know the architecture.

Thanks, and I look forward to resolving this for you one way or another.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


edwardbetts at gmail

Jul 10, 2007, 2:47 AM

Post #3 of 4 (682 views)
Permalink
Segfault with KinoSearch SVN [In reply to]

On 10/07/07, Marvin Humphrey <marvin [at] rectangular> wrote:
> I suggest you try rebuilding KS from scratch, then run it again --
> try "./Build distclean", then the usual "perl Build.PL", etc.

Sorry for the false report. I rebuilt as you suggested and the
segfault went away.
--
Edward Betts


marvin at rectangular

Jul 10, 2007, 7:15 AM

Post #4 of 4 (682 views)
Permalink
Segfault with KinoSearch SVN [In reply to]

On Jul 10, 2007, at 2:44 AM, Edward Betts wrote:

> On 10/07/07, Marvin Humphrey <marvin [at] rectangular> wrote:
>> I suggest you try rebuilding KS from scratch, then run it again --
>> try "./Build distclean", then the usual "perl Build.PL", etc.
>
> Sorry for the false report. I rebuilt as you suggested and the
> segfault went away.

It's not really a false report. You ran into a bug in the KS build
regime. Build.PL doesn't track dependencies for C header files. If
a struct changes in one, it doesn't know to rebuild all the files
that #include it.

I've opened an RT issue. Thanks for speaking up.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.