unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* database error
@ 2016-08-14 17:14 Ken
  2016-08-14 23:27 ` David Bremner
  0 siblings, 1 reply; 6+ messages in thread
From: Ken @ 2016-08-14 17:14 UTC (permalink / raw)
  To: Notmuch Mail

I'm getting the following error:


ken@ken-Presario-CQ57-Notebook-PC:~$ notmuch new
Error: Notmuch database at /home/ken/Mail/.notmuch
        has a newer database format version (3) than supported by this
        version of notmuch (1). Refusing to open this database in
        read-write mode.

Can anyone help me fix this?

Ken

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

* Re: database error
  2016-08-14 17:14 database error Ken
@ 2016-08-14 23:27 ` David Bremner
  2016-08-15  7:37   ` Tomi Ollila
  0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2016-08-14 23:27 UTC (permalink / raw)
  To: Ken, Notmuch Mail

Ken <kensubuntu@gmail.com> writes:

> I'm getting the following error:
>
>
> ken@ken-Presario-CQ57-Notebook-PC:~$ notmuch new
> Error: Notmuch database at /home/ken/Mail/.notmuch
>         has a newer database format version (3) than supported by this
>         version of notmuch (1). Refusing to open this database in
>         read-write mode.
>
> Can anyone help me fix this?

Did you downgrade notmuch (i.e. is the message correct)? If so, can you
undo that downgrade long enough to dump your database?

d

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

* Re: database error
  2016-08-14 23:27 ` David Bremner
@ 2016-08-15  7:37   ` Tomi Ollila
  0 siblings, 0 replies; 6+ messages in thread
From: Tomi Ollila @ 2016-08-15  7:37 UTC (permalink / raw)
  To: David Bremner, Ken, Notmuch Mail

On Mon, Aug 15 2016, David Bremner <david@tethera.net> wrote:

> Ken <kensubuntu@gmail.com> writes:
>
>> I'm getting the following error:
>>
>>
>> ken@ken-Presario-CQ57-Notebook-PC:~$ notmuch new
>> Error: Notmuch database at /home/ken/Mail/.notmuch
>>         has a newer database format version (3) than supported by this
>>         version of notmuch (1). Refusing to open this database in
>>         read-write mode.
>>
>> Can anyone help me fix this?
>
> Did you downgrade notmuch (i.e. is the message correct)? If so, can you
> undo that downgrade long enough to dump your database?

what does notmuch --version say...

note to us: we could add notmuch version information print to that error message



>
> d

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

* Database error
@ 2018-04-19 18:26 Varac
  2018-04-20 12:44 ` David Bremner
  0 siblings, 1 reply; 6+ messages in thread
From: Varac @ 2018-04-19 18:26 UTC (permalink / raw)
  To: Notmuch Mail

[-- Attachment #1: Type: text/plain, Size: 4941 bytes --]

Hi,

I get a DatabaseError right after initial indexing.
I can reproduce this with my mails every time.
First, I remove the whole .notmuch/xapian directory and
run "notmuch new", which results in a DatabaseError when
using "xapian-check":


  » notmuch new
  Welcome to a new version of notmuch! Your database will now be upgraded.
  This process is safe to interrupt.
  Backing up tags to /home/varac/.offlineimap/Mail/.notmuch/dump-20180419T160138.gz...
  Your notmuch database has now been upgraded.
  Processed 148440 total files in 13m 38s (181 files/sec.).
  Added 140351 new messages to the database.

  » xapian-check .notmuch/xapian 
  docdata:
  blocksize=8K items=564 firstunused=7 revision=7 levels=1 root=2
  B-tree checked okay
  docdata table structure checked OK

  termlist:
  blocksize=8K items=305882 firstunused=64506 revision=7 levels=2 root=63491
  xapian-check: DatabaseError: 1 unused block(s) missing from the free list, first is 0


  » notmuch compact 
  Compacting database...
  compacting table postlist
       Reduced by 34% 130352K (373696K -> 243344K)
  compacting table docdata
       Reduced by 28% 16K (56K -> 40K)
  compacting table termlist
       Reduced by 48% 250928K (516048K -> 265120K)
  compacting table position
       Reduced by 44% 455456K (1034784K -> 579328K)
  compacting table spelling
       doesn't exist
  compacting table synonym
       doesn't exist
  Done.


  » xapian-check .notmuch/xapian
  docdata:
  blocksize=8K items=564 firstunused=5 revision=1 levels=1 root=2
  B-tree checked okay
  docdata table structure checked OK

  termlist:
  blocksize=8K items=305882 firstunused=33140 revision=1 levels=2 root=746
  B-tree checked okay
  termlist table structure checked OK

  postlist:
  blocksize=8K items=2845658 firstunused=30418 revision=1 levels=2 root=578
  B-tree checked okay
  postlist table structure checked OK

  position:
  blocksize=8K items=27789188 firstunused=72416 revision=1 levels=2 root=466
  B-tree checked okay
  position table structure checked OK

  spelling:
  Lazily created, and not yet used.

  synonym:
  Lazily created, and not yet used.

  No errors found


  » dpkg -l |egrep '(notmuch|xapian)' 
  ii  afew                                                        1.3.0-1                                                    all          Tagging script for notmuch mail
  ii  libnotmuch-dev                                              0.26-1ubuntu3                                              amd64        thread-based email index, search and tagging (development)
  ii  libnotmuch5                                                 0.26-1ubuntu3                                              amd64        thread-based email index, search and tagging (runtime)
  ii  libxapian30:amd64                                           1.4.5-1                                                    amd64        Search engine library
  ii  notmuch                                                     0.26-1ubuntu3                                              amd64        thread-based email index, search and tagging
  ii  notmuch-addrlookup                                          9-1                                                        amd64        Address lookup tool for Notmuch
  ii  python-notmuch                                              0.26-1ubuntu2                                              all          Python interface to the notmuch mail search and index library
  ii  python3-notmuch                                             0.26-1ubuntu3                                              all          Python 3 interface to the notmuch mail search and index library
  ii  xapian-tools                                                1.4.5-1                                                    amd64        Basic tools for Xapian search engine library

After this I try to tun "afew --tag --new -v" but it fails with (I don't know if 
this is related though):

  Traceback (most recent call last):
    File "/usr/bin/afew", line 11, in <module>
      load_entry_point('afew==1.3.0', 'console_scripts', 'afew')()
    File "/usr/lib/python3/dist-packages/afew/commands.py", line 159, in main
      inner_main(args, database, query_string)
    File "/usr/lib/python3/dist-packages/afew/main.py", line 23, in main
      filter_.run(query_string)
    File "/usr/lib/python3/dist-packages/afew/filters/BaseFilter.py", line 59, in run
      for message in self.database.get_messages(query):
    File "/usr/lib/python3/dist-packages/afew/Database.py", line 93, in get_messages
      for message in self.do_query(query).search_messages():
    File "/usr/lib/python3/dist-packages/notmuch/query.py", line 182, in search_messages
      raise NotmuchError(status)
  notmuch.errors.XapianError

Please help! I kind of lost here.

Greetings, Varac

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

-----BEGIN PGP SIGNATURE-----

iQIcBAABCgAGBQJa2N9NAAoJEFRl5354du0EjF4P/3te/i3GrnPOlOy88ewfxauq
w6b+QsixnhNQzR9zhMzr2z2CSpeQITj8B3H4cJhACBqq84bNt3ZCifxUqlxvxM9X
NrdbJpSOZge7pQD6S7KermHXQRSAY9eHD1OFov4FrTaxE9+RURJKfHicvygt9aMQ
uaoeFzEEuZT7ZAMhQ21Ko/4fwPqgeScHK973AIFDV/U/g+/zGAUxveqDM1iyH6U2
3cCm/Nhzd/qpZq6OZBXVtStKE8Mkm4yCFy4peb9mPveEbi9y6xJNbumWFClwjh6M
TmE5JJdu/wENVCoCMNSe0pG4O1qwKsVYl51aNN9AFU2Ufpg9KFcRJngPCxSgmBJA
jLqMLDadQdVrLJWMn3US6VZrCPwYQDUClwcSCjKQz+kmfAD6ywZYDvIbMurP2vYg
3gUvl43j343BNdw2wlDsSQurxjU7YRnOB5PcVebbM0CmHKhRNkhawcTpIfNhSBYm
Gj4aVLrr+WuntUqlZoQQ6aNW8PKe9S044cDytrcKCy5E5F3/e3f7t/KlY9dq9HWK
J1tI/AEgblIKADgkT7u0oTEtSNSSZ5vXffsG8RlPaOzAVYYnP7EXD1Cf0MZrvo1Z
VlN9vqxMI+LXeaESV8rdUPvYDmReAI5swybIz92GW52uI+AcbvnUI8gzV/cWYuBU
f04Nw7D3OsqF6WU6KNCc
=Ts7d
-----END PGP SIGNATURE-----

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

* Re: Database error
  2018-04-19 18:26 Database error Varac
@ 2018-04-20 12:44 ` David Bremner
  2018-04-20 12:57   ` Varac
  0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2018-04-20 12:44 UTC (permalink / raw)
  To: Varac, Notmuch Mail

Varac <varac@leap.se> writes:

> Hi,
>
> I get a DatabaseError right after initial indexing.
> I can reproduce this with my mails every time.
> First, I remove the whole .notmuch/xapian directory and
> run "notmuch new", which results in a DatabaseError when
> using "xapian-check":
>
>
>   » notmuch new
>   Welcome to a new version of notmuch! Your database will now be upgraded.
>   This process is safe to interrupt.
>   Backing up tags to /home/varac/.offlineimap/Mail/.notmuch/dump-20180419T160138.gz...
>   Your notmuch database has now been upgraded.
>   Processed 148440 total files in 13m 38s (181 files/sec.).
>   Added 140351 new messages to the database.
>
>   » xapian-check .notmuch/xapian 
>   docdata:
>   blocksize=8K items=564 firstunused=7 revision=7 levels=1 root=2
>   B-tree checked okay
>   docdata table structure checked OK
>
>   termlist:
>   blocksize=8K items=305882 firstunused=64506 revision=7 levels=2 root=63491
>   xapian-check: DatabaseError: 1 unused block(s) missing from the free list, first is 0


This is almost certainly a known and recently fixed xapian bug. notmuch
compact is the recommended workaround (or just ignore the message).

>
> After this I try to tun "afew --tag --new -v" but it fails with (I don't know if 
> this is related though):
>
>   Traceback (most recent call last):
>     File "/usr/bin/afew", line 11, in <module>
>       load_entry_point('afew==1.3.0', 'console_scripts', 'afew')()
>     File "/usr/lib/python3/dist-packages/afew/commands.py", line 159, in main
>       inner_main(args, database, query_string)
>     File "/usr/lib/python3/dist-packages/afew/main.py", line 23, in main
>       filter_.run(query_string)
>     File "/usr/lib/python3/dist-packages/afew/filters/BaseFilter.py", line 59, in run
>       for message in self.database.get_messages(query):
>     File "/usr/lib/python3/dist-packages/afew/Database.py", line 93, in get_messages
>       for message in self.do_query(query).search_messages():
>     File "/usr/lib/python3/dist-packages/notmuch/query.py", line 182, in search_messages
>       raise NotmuchError(status)
>   notmuch.errors.XapianError
>

It's hard to say for sure, but it's possible this would be fixed by the
patch

        https://mid.mail-archive.com/20180414014610.15438-4-david@tethera.net

That should be part of a bug-fix release of notmuch fairly soon. You can
also try to find a subset of mail reproducing the problem. I don't
know what that afew invokation is trying to do. Can you reproduce the
problem using the notmuch CLI?

d

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

* Re: Database error
  2018-04-20 12:44 ` David Bremner
@ 2018-04-20 12:57   ` Varac
  0 siblings, 0 replies; 6+ messages in thread
From: Varac @ 2018-04-20 12:57 UTC (permalink / raw)
  To: Notmuch Mail

[-- Attachment #1: Type: text/plain, Size: 2187 bytes --]

Quoting David Bremner (2018-04-20 14:44:25)
> >   » xapian-check .notmuch/xapian docdata:
> >   blocksize=8K items=564 firstunused=7 revision=7 levels=1 root=2
> >   B-tree checked okay
> >   docdata table structure checked OK
> >
> >   termlist:
> >   blocksize=8K items=305882 firstunused=64506 revision=7 levels=2 root=63491
> >   xapian-check: DatabaseError: 1 unused block(s) missing from the free list, first is 0
> 
> 
> This is almost certainly a known and recently fixed xapian bug. notmuch
> compact is the recommended workaround (or just ignore the message).
Ok, I'll ignore it for now.

> 
> >
> > After this I try to tun "afew --tag --new -v" but it fails with (I don't know if 
> > this is related though):
> >
> >   Traceback (most recent call last):
> >     File "/usr/bin/afew", line 11, in <module>
> >       load_entry_point('afew==1.3.0', 'console_scripts', 'afew')()
> >     File "/usr/lib/python3/dist-packages/afew/commands.py", line 159, in main
> >       inner_main(args, database, query_string)
> >     File "/usr/lib/python3/dist-packages/afew/main.py", line 23, in main
> >       filter_.run(query_string)
> >     File "/usr/lib/python3/dist-packages/afew/filters/BaseFilter.py", line 59, in run
> >       for message in self.database.get_messages(query):
> >     File "/usr/lib/python3/dist-packages/afew/Database.py", line 93, in get_messages
> >       for message in self.do_query(query).search_messages():
> >     File "/usr/lib/python3/dist-packages/notmuch/query.py", line 182, in search_messages
> >       raise NotmuchError(status)
> >   notmuch.errors.XapianError
> >
> 
> It's hard to say for sure, but it's possible this would be fixed by the
> patch
> 
>         https://mid.mail-archive.com/20180414014610.15438-4-david@tethera.net
> 
> That should be part of a bug-fix release of notmuch fairly soon. You can
> also try to find a subset of mail reproducing the problem. I don't
> know what that afew invokation is trying to do. Can you reproduce the
> problem using the notmuch CLI?

It turned out that this was a bad syntax in afew, where I quoted a query in 
single quotes.

Greetings, Varac

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

-----BEGIN PGP SIGNATURE-----

iQIcBAABCgAGBQJa2eOtAAoJEFRl5354du0E7cIQAKl74HL7I8LP066a20dkFg7/
fJIjSP3yOKV/IzuBs3LT+6RrdtG7/L+pp+fNs7NKmjOVKvMIs/Tw6Hu9dKwGkZ+P
mKxURJSI7ijS6W8uGa3cEz6kattJ2O5+t5ZX+d/RdFbsZbwMLPj56+jXzEXRYXnA
wPPaIgFvPVR67AS4AGCopX4MmJdu5V4zt4+yClLsYE3DMtQRhVvz/LJyhLILB3X6
n0SR+ZqUr2VTeLnKkobqInDTNWzuSE4HqGSpDWtNrx0OHpeDA8HCrH/R+Fek5mRf
xrH4slKpPy7MJUkZeTM/jcWhqftWPAR/g7cxxklJe7VbOLGHUjOn+YgVYXM06n6V
3klEXd7T0Yt+cCyuycxChA7TKHjq74IWAToryQgXWGJ4q3wpqKUlBPFiqnMSyrx0
xm8HjecPs+fbWOsKRXdDFXJl3Urh4Lx7G8tIWtPkRPIJtbmBzWXlC/xT9oyarRUA
tI1W4LDnTaGTIkB8JKcw3OJEODEljtst4/GGHUiy2I7UJo3rbTysIp/L06q0wmuP
LQGOd7VBT0UTyIs4f6GNN9nTzLVv35ZS5qgQKSeaANs8v2PdYW2Kh/mSYxkVpmHQ
0hYgh02/yzdI308kg6to9GLatFL/TBhOkO+ExROCrWrpY439bWaox+kzryFAOlrT
DsJIOk37eNi7N2XrUipE
=bpBP
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2018-04-20 12:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19 18:26 Database error Varac
2018-04-20 12:44 ` David Bremner
2018-04-20 12:57   ` Varac
  -- strict thread matches above, loose matches on Subject: below --
2016-08-14 17:14 database error Ken
2016-08-14 23:27 ` David Bremner
2016-08-15  7:37   ` Tomi Ollila

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).