Hi, We recently started running into the Xapian::DatabaseModifiedError problem under Perl (ticket #284), due to a change in the way we update our database. I noticed that newer versions of Xapian are supposed to deal with this problem (ticket #284), so we upgraded to 1.0.12. I now am able to properly trap the error, most of the time, by using eval and checking $@ to see if it matches "revision being read has been discarded". The problem is that every once in a while I still see a segfault: terminate called after throwing an instance of 'Xapian::DatabaseModifiedError' Aborted I have been unable to determine why the segfaults still sometimes occur ... any suggestions? Thanks! Jim
Jim Spath wrote:> Hi, > > We recently started running into the Xapian::DatabaseModifiedError > problem under Perl (ticket #284), due to a change in the way we update > our database. > > I noticed that newer versions of Xapian are supposed to deal with this > problem (ticket #284), so we upgraded to 1.0.12. > > I now am able to properly trap the error, most of the time, by using > eval and checking $@ to see if it matches "revision being read has been > discarded". > > The problem is that every once in a while I still see a segfault: > > terminate called after throwing an instance of > 'Xapian::DatabaseModifiedError' > Aborted > > I have been unable to determine why the segfaults still sometimes occur > ... any suggestions? > > Thanks! > JimIf it matters, this is under Ubuntu 6.06 LTS (Dapper Drake).
----- "Jim Spath" <jspath at pangeamedia.com> wrote:> Hi, > > We recently started running into the Xapian::DatabaseModifiedError > problem under Perl (ticket #284), due to a change in the way we update > > our database. > > I noticed that newer versions of Xapian are supposed to deal with this > > problem (ticket #284), so we upgraded to 1.0.12. > > I now am able to properly trap the error, most of the time, by using > eval and checking $@ to see if it matches "revision being read has > been > discarded". > > The problem is that every once in a while I still see a segfault: > > terminate called after throwing an instance of > 'Xapian::DatabaseModifiedError' > Aborted > > I have been unable to determine why the segfaults still sometimes > occur > ... any suggestions? >I think this might be the same error I had (See Ticket #230, fixed in 1.1), which is basically some errors are not "perl-errors", but C++ errors, and hence cannot be caught with eval. The patch in ticket #230 can also be used on 1.0.x, so you can fix your own 1.0.x version of Search::Xapian to be able to catch these errors. - andreas
Am 01.06.2009 um 22:16 schrieb Jim Spath:> Hi, > > We recently started running into the Xapian::DatabaseModifiedError > problem under Perl (ticket #284), due to a change in the way we update > our database. > > I noticed that newer versions of Xapian are supposed to deal with this > problem (ticket #284), so we upgraded to 1.0.12. > > I now am able to properly trap the error, most of the time, by using > eval and checking $@ to see if it matches "revision being read has > been > discarded". > > The problem is that every once in a while I still see a segfault: > > terminate called after throwing an instance of > 'Xapian::DatabaseModifiedError' > Aborted > > I have been unable to determine why the segfaults still sometimes > occur > ... any suggestions?I think there is at least one try/catch missing in the XS bindings. see http://trac.xapian.org/ticket/284#comment:19 Regards mrks