From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 3EBA96DE031B for ; Fri, 20 Apr 2018 05:44:35 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[AWL=0.011, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OYaq11dL2MMC for ; Fri, 20 Apr 2018 05:44:33 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 8F9AC6DE0283 for ; Fri, 20 Apr 2018 05:44:33 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1f9VOs-0006au-Qu; Fri, 20 Apr 2018 08:44:26 -0400 Received: (nullmailer pid 25491 invoked by uid 1000); Fri, 20 Apr 2018 12:44:25 -0000 From: David Bremner To: Varac , Notmuch Mail Subject: Re: Database error In-Reply-To: <152416238134.7508.12807881658685792944@rocinante.bitrigger.de> References: <152416238134.7508.12807881658685792944@rocinante.bitrigger.de> Date: Fri, 20 Apr 2018 09:44:25 -0300 Message-ID: <87o9ie11zq.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Apr 2018 12:44:35 -0000 Varac 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": > > > =C2=BB 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-20180419= T160138.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. > > =C2=BB xapian-check .notmuch/xapian=20 > docdata: > blocksize=3D8K items=3D564 firstunused=3D7 revision=3D7 levels=3D1 root= =3D2 > B-tree checked okay > docdata table structure checked OK > > termlist: > blocksize=3D8K items=3D305882 firstunused=3D64506 revision=3D7 levels= =3D2 root=3D63491 > xapian-check: DatabaseError: 1 unused block(s) missing from the free li= st, 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=20 > this is related though): > > Traceback (most recent call last): > File "/usr/bin/afew", line 11, in > load_entry_point('afew=3D=3D1.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", lin= e 59, in run > for message in self.database.get_messages(query): > File "/usr/lib/python3/dist-packages/afew/Database.py", line 93, in g= et_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.n= et 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