[Xapian-discuss] Debug build

double ninive at gmx.at
Wed Mar 17 10:06:17 GMT 2010


Hi Olly,

Thank you very much for your answer. In order to track down
the issue I forced a core dump on `atexit()`.

Xapian is 1.1.4, the database is flint. Here the dmalloc-report:

-->  13904  times:
0xb778cad4 <_ZNSs4_Rep9_S_createEjjRKSaIcE+100>:        0xc7047089
-->  9262  times:
0xb7cb8ad0 <FlintCursor+176>:   0x8308558b
-->  4631  times:
0xb7d552a2 <_ZNK6Xapian10BM25Weight5cloneEv+34>:        0x896446dd
-->  4631  times:
0xb7cd8560 <_ZNK10FlintTable10cursor_getEv+48>: 0x04247489
-->  4631  times:
0xb7cb8a70 <FlintCursor+80>:    0x2774ff85
-->  4631  times:
0xb7cbcfb9 <_ZNK13FlintDatabase14open_post_listERKSs+73>:       0x08247c89
-->  28  times:
0xb7d2b0fc 
<_ZN14QueryOptimiser10do_or_likeEPKN6Xapian5Query8InternalEd+252>:   
0x8908558b
-->  17  times:
0xb7cdd28d <_ZN10FlintTable15do_open_to_readEbj+205>:   0x4689c085
--> rest ignored - If needed I can provide a complete list.


The watched process only reads from the Xapian database. Updated are done
by a cron job every minute. The possible functions are (if it is helpful, I
can provide you the source of these wrapper functions):

List<Result> fts_search( const String &search, Integer skip, Integer 
count );
   -->   Xapian::Enquire() with Xapian::ValueWeightPostingSource()
List<Result> fts_similar( Integer id, Integer skip, Integer count );
   -->   Xapian::Query( Xapian::Query::OP_ELITE_SET );
StringList fts_suggestions( const String &search, Integer skip, Integer 
count );
   -->   Xapian::Query( Xapian::QueryParser::FLAG_PARTIAL );


This three functions have the same structure (on error the returned list 
is empty).
The exception: "The revision being read has been discarded - you should 
call
Xapian::Database::reopen() and retry the operation" is thrown quite often.

List<struct Result> fts_functionname( ... )
{
   List<struct Result> returnvalue;
   // "The revision being read has been discarded - you should call 
Xapian::Database::reopen() and retry the operation"
   for( Integer i=0; i < 3; ++i )
   {
       Xapian::Database &xapian_database = *::database;
       try
       {
           ...         //    <--- here the Xapian database is called
       }
       catch( const Xapian::DatabaseModifiedError &error )      //    
<---  this is thrown quite often
       {
           try {
               xapian_database.reopen();           // reopen the database
               continue;                           // retry...
           }
           catch( const Xapian::Error &error ) {
           }
       }
       catch( const Xapian::Error &error ) {
       }
       catch( ... ) {
       }
       break;
   }
   return returnvalue;
}


> If you use GCC, configure compiles with "-g -O2" by default, so you have
> debug symbols by default.  

Maybe the debug symbols are cut off during linking? GDB is
not able to determine the code-lines.

Thanks a lot
Marcus






More information about the Xapian-discuss mailing list