unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* crash after running notmuch new
@ 2020-04-07 12:12 Matt
  2020-04-07 13:03 ` David Bremner
  0 siblings, 1 reply; 6+ messages in thread
From: Matt @ 2020-04-07 12:12 UTC (permalink / raw)
  To: notmuch

hi,

I have a script that runs mbsync followed by notmuch new.
It ends with `terminate called after throwing an instance of
'Xapian::DatabaseCorruptError`.

Any idea what could cause this. Here is a trace without symbols thoug
====
#0  0x00007f1cb90d315a in raise () from
/nix/store/9rabxvqbv0vgjmydiv59wkz768b5fmbc-glibc-2.30/lib/libc.so.6
#1  0x00007f1cb90bd548 in abort () from
/nix/store/9rabxvqbv0vgjmydiv59wkz768b5fmbc-glibc-2.30/lib/libc.so.6
#2  0x00007f1cb8d3e643 in ?? () from
/nix/store/lzyjivyzrp6agilxhgh0h40pwwg18agy-gcc-9.2.0-lib/lib/libstdc++.so.6
#3  0x00007f1cb8d4a066 in ?? () from
/nix/store/lzyjivyzrp6agilxhgh0h40pwwg18agy-gcc-9.2.0-lib/lib/libstdc++.so.6
#4  0x00007f1cb8d4a0b1 in std::terminate() () from
/nix/store/lzyjivyzrp6agilxhgh0h40pwwg18agy-gcc-9.2.0-lib/lib/libstdc++.so.6
#5  0x00007f1cb8d4a336 in __cxa_rethrow () from
/nix/store/lzyjivyzrp6agilxhgh0h40pwwg18agy-gcc-9.2.0-lib/lib/libstdc++.so.6
#6  0x00007f1cb8ec1f08 in
Xapian::TermIterator::TermIterator(Xapian::TermIterator::Internal*)
[clone .cold] ()
   from /nix/store/5afyzmgp6rsn1digmh1hf47g7ppwp25v-xapian-1.4.15/lib/libxapian.so.30
#7  0x00007f1cb8ef9546 in
Xapian::Database::allterms_begin(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&) const () from
/nix/store/5afyzmgp6rsn1digmh1hf47g7ppwp25v-xapian-1.4.15/lib/libxapian.so.30
#8  0x00007f1cb94a81bf in
_create_filenames_for_terms_with_prefix(void*, _notmuch_database*,
char const*) [clone .isra.0] ()
   from /nix/store/f4jm5j94pamm5xkbqrk1r70zjvjn0mch-notmuch-0.29.3/lib/libnotmuch.so.5
#9  0x00007f1cb94a8395 in notmuch_directory_get_child_directories ()
   from /nix/store/f4jm5j94pamm5xkbqrk1r70zjvjn0mch-notmuch-0.29.3/lib/libnotmuch.so.5
#10 0x00000000004105df in add_files ()
#11 0x000000000040fe9e in add_files ()
#12 0x000000000040fe9e in add_files ()
#13 0x000000000040fe9e in add_files ()
#14 0x0000000000411693 in notmuch_new_command ()
===

Cheers

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: crash after running notmuch new
  2020-04-07 12:12 crash after running notmuch new Matt
@ 2020-04-07 13:03 ` David Bremner
  2020-04-07 13:32   ` Matt
  0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2020-04-07 13:03 UTC (permalink / raw)
  To: Matt, notmuch

Matt <mattator@gmail.com> writes:

> hi,
>
> I have a script that runs mbsync followed by notmuch new.
> It ends with `terminate called after throwing an instance of
> 'Xapian::DatabaseCorruptError`.
>

Have you tried running xapian-check?

d

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: crash after running notmuch new
  2020-04-07 13:03 ` David Bremner
@ 2020-04-07 13:32   ` Matt
  2020-04-07 20:21     ` David Bremner
  0 siblings, 1 reply; 6+ messages in thread
From: Matt @ 2020-04-07 13:32 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

thanks didn't know about xapian-check !
the output
===
docdata:
blocksize=8K items=70 firstunused=3 revision=421 levels=0 root=2
B-tree checked okay
docdata table structure checked OK

termlist:
blocksize=8K items=186136 firstunused=62058 revision=421 levels=2 root=12260
B-tree checked okay
termlist table structure checked OK

postlist:
blocksize=8K items=2598971 firstunused=61412 revision=421 levels=2 root=49814
xapian-check: DatabaseCorruptError: Db block overwritten - are there
multiple writers?
===
suggests there is an error but I couldn't find a fix for it. Should I
just remove the xapian folder and rerun `notmuch new` ?

Thanks !

2020年4月7日(火) 15:03 David Bremner <david@tethera.net>:
>
> Matt <mattator@gmail.com> writes:
>
> > hi,
> >
> > I have a script that runs mbsync followed by notmuch new.
> > It ends with `terminate called after throwing an instance of
> > 'Xapian::DatabaseCorruptError`.
> >
>
> Have you tried running xapian-check?
>
> d

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: crash after running notmuch new
  2020-04-07 13:32   ` Matt
@ 2020-04-07 20:21     ` David Bremner
  2020-04-07 22:19       ` Olly Betts
  0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2020-04-07 20:21 UTC (permalink / raw)
  To: Matt; +Cc: notmuch, xapian-discuss

Matt <mattator@gmail.com> writes:

> thanks didn't know about xapian-check !
> the output
> ===
> docdata:
> blocksize=8K items=70 firstunused=3 revision=421 levels=0 root=2
> B-tree checked okay
> docdata table structure checked OK
>
> termlist:
> blocksize=8K items=186136 firstunused=62058 revision=421 levels=2 root=12260
> B-tree checked okay
> termlist table structure checked OK
>
> postlist:
> blocksize=8K items=2598971 firstunused=61412 revision=421 levels=2 root=49814
> xapian-check: DatabaseCorruptError: Db block overwritten - are there
> multiple writers?
> ===
> suggests there is an error but I couldn't find a fix for it. Should I
> just remove the xapian folder and rerun `notmuch new` ?

If you have a backup of your tags from notmuch-dump, then yes that's
probably a good way forward.   I've put the xapian developers in copy in
case they are interested in trying to debug this corruption. For those
just joining us, this is notmuch 0.29.3 linked against xapian 1.4.15

d

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: crash after running notmuch new
  2020-04-07 20:21     ` David Bremner
@ 2020-04-07 22:19       ` Olly Betts
  2020-04-11 13:18         ` Matt
  0 siblings, 1 reply; 6+ messages in thread
From: Olly Betts @ 2020-04-07 22:19 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch, Matt, xapian-discuss

On Tue, Apr 07, 2020 at 05:21:47PM -0300, David Bremner wrote:
> Matt <mattator@gmail.com> writes:
[...]
> > termlist:
> > blocksize=8K items=186136 firstunused=62058 revision=421 levels=2 root=12260
> > B-tree checked okay
> > termlist table structure checked OK
> >
> > postlist:
> > blocksize=8K items=2598971 firstunused=61412 revision=421 levels=2 root=49814
> > xapian-check: DatabaseCorruptError: Db block overwritten - are there
> > multiple writers?
> > ===
> > suggests there is an error but I couldn't find a fix for it. Should I
> > just remove the xapian folder and rerun `notmuch new` ?
> 
> If you have a backup of your tags from notmuch-dump, then yes that's
> probably a good way forward.

If you don't have a current dump, you may be able to rescue a dump of
tags from a broken notmuch database using:

https://git.xapian.org/?p=xapian;a=blob;f=README.notmuch;hb=refs/heads/notmuch-tag-rescue-hack

That should work if the termlist table is undamaged (as the above
appears to show), and may work even if it's damaged.

> I've put the xapian developers in copy in
> case they are interested in trying to debug this corruption. For those
> just joining us, this is notmuch 0.29.3 linked against xapian 1.4.15

Was the database created with 1.4.15 too?

If it's reproducible, I'm definitely interested.

If it isn't reproducible (and/or the data is sensitive) it's much more
difficult to usefully investigate.  And it may also be due to a
non-Xapian issue (a bug in something else or a hardware problem).

Cheers,
    Olly

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: crash after running notmuch new
  2020-04-07 22:19       ` Olly Betts
@ 2020-04-11 13:18         ` Matt
  0 siblings, 0 replies; 6+ messages in thread
From: Matt @ 2020-04-11 13:18 UTC (permalink / raw)
  To: Xapian Discussion, David Bremner, Matt, notmuch

thanks for the support,
since the notmuch database must have been ~7 years long with lots of
upgrade, unexpected shutdowns, configuration fiddling I thought it
would have been very hard to track down the root cause. If I had had a
better idea of the root cause I would have liked to help but all my
tags are automatically set so it was simpler to just regenerate the
database and that's what I ended up doing.

Thanks for the proposition though.

Matt

2020年4月8日(水) 0:20 Olly Betts <olly@survex.com>:
>
> On Tue, Apr 07, 2020 at 05:21:47PM -0300, David Bremner wrote:
> > Matt <mattator@gmail.com> writes:
> [...]
> > > termlist:
> > > blocksize=8K items=186136 firstunused=62058 revision=421 levels=2 root=12260
> > > B-tree checked okay
> > > termlist table structure checked OK
> > >
> > > postlist:
> > > blocksize=8K items=2598971 firstunused=61412 revision=421 levels=2 root=49814
> > > xapian-check: DatabaseCorruptError: Db block overwritten - are there
> > > multiple writers?
> > > ===
> > > suggests there is an error but I couldn't find a fix for it. Should I
> > > just remove the xapian folder and rerun `notmuch new` ?
> >
> > If you have a backup of your tags from notmuch-dump, then yes that's
> > probably a good way forward.
>
> If you don't have a current dump, you may be able to rescue a dump of
> tags from a broken notmuch database using:
>
> https://git.xapian.org/?p=xapian;a=blob;f=README.notmuch;hb=refs/heads/notmuch-tag-rescue-hack
>
> That should work if the termlist table is undamaged (as the above
> appears to show), and may work even if it's damaged.
>
> > I've put the xapian developers in copy in
> > case they are interested in trying to debug this corruption. For those
> > just joining us, this is notmuch 0.29.3 linked against xapian 1.4.15
>
> Was the database created with 1.4.15 too?
>
> If it's reproducible, I'm definitely interested.
>
> If it isn't reproducible (and/or the data is sensitive) it's much more
> difficult to usefully investigate.  And it may also be due to a
> non-Xapian issue (a bug in something else or a hardware problem).
>
> Cheers,
>     Olly

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-11 13:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07 12:12 crash after running notmuch new Matt
2020-04-07 13:03 ` David Bremner
2020-04-07 13:32   ` Matt
2020-04-07 20:21     ` David Bremner
2020-04-07 22:19       ` Olly Betts
2020-04-11 13:18         ` Matt

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).