unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Gregor Zattler <telegraph@gmx.net>
To: notmuch <notmuch@notmuchmail.org>,
	xapian-discuss <xapian-discuss@lists.xapian.org>
Subject: bug: chokes on long directory names (was: Re: out of memory on idle machine)
Date: Wed, 17 Mar 2021 20:47:28 +0100	[thread overview]
Message-ID: <20210317194728.GB5561@no.workgroup> (raw)
In-Reply-To: <87k0rex2j9.fsf@tethera.net>

Hi David, Olly, notmuch and xapian developers,
* David Bremner <david@tethera.net> [11. Feb. 2021]:
> David Bremner <david@tethera.net> writes:
> As a kind of desperation move, you could try bisecting your mailstore,
> to see how small of a set of messages you can duplicate the problem
> with.

this I did, somehow.  I found the culprit: It's a maildir
with one single mail in it.  The name of the maildir is
exceptionally long [because generated from a List-Id:
-Header] and the mail arrived at the very day, my notmuch
database corrupted.  This maildir alone provokes that every
next notmuch new will rescan all (?) files.

Then I tried to only index this maildir, it showed the same
strange re-indexing but even when running notmuch new for a
while in a loop (>1000 times), the database showed no
corruption.

When instead I shorten the name of the maildir to three
characters with the very same email file in it, nothing
happens, it indexes the file once and not again.

Then I prolonged the name of the file instead of the
directory and even with the longest possible filename (or
path?)

/home/grfz/Mail/nuk/new/1607641473.31514_2.no1607641473.31514_2.no1607641473.31514_2.no1607641473.31514_2.no1607641473.31514_2.no1607641473.31514_2.no1607641473.31514_2.no1607641473.31514_2.no1607641473.31514_2.no1607641473.31514_2.no1607641473.31514_2.no16076414734160.14_2.no

notmuch has no problem indexing this and not to reindex it
in the next run.


So notmuch or xapian (I don't know) chokes on extreme long
directory names.  I consider this to be a bug.



My scripts create this long names from List-Id and some
such.  The one which triggered the problems is from an online
shop:

u+mq6tamjqhe3cm2j5giydembrgiytamrtga2deojogexdsmzygm4egnbuifatcnrsgazdejjugbzgkylmfvxw43djnzsxg2dpoaxgizjgna6ton3bg4zdsobsgmytczlcme3dentehaydmnjxmy4doyrwha4tgobgoi6xizlmmvtxeylqnastimdhnv4c43tfoqthipldovzxi33nmvzhgllxmvwgg33nmu@real-onlineshop.de/

Since, as I tested, this can be reproduced with the simplest
of email in a maildir with an extremly long name, I do not
attach the maildir in question.  But if anyone wants it I
can send it.



I then had a look at other long directory names and there is
another one which also triggers the problem, it also has
only one email in it and arrived on 12th of January:

u+mq6wcodfgmygcjtjhuzdamrrgaytemjrhe2dqmbqfyys4mbxgazugnbsie3doobsgfcdmobfgqygg5ltorxw2zlsomxgo2lunrqweltdn5wsm2b5mu3tkmddhbrdoyrwgvsgeobymi2dszbtg4zdamztmm4dsmzvgjssm4r5orswyzlhojqxa2bfgqygo3lyfzxgk5bgoq6xa4tjozqwg6i@customers.gitlab.com


Since I removed both on my laptop, notmuch new works again,
yeah!  Now I will have a look on my .procmailrc.

Thanks for your attention, thanks for notmuch and for xapian,
Grgeor

--
 -... --- .-. . -.. ..--.. ...-.-

  reply	other threads:[~2021-03-17 19:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-13 13:19 consistent database corruption with notmuch new Gregor Zattler
2020-12-13 14:12 ` David Bremner
2020-12-13 14:15   ` Gregor Zattler
2020-12-13 15:13     ` Gregor Zattler
2020-12-13 18:10       ` David Bremner
2020-12-13 18:12         ` David Bremner
2020-12-14 19:19           ` David Bremner
2020-12-13 21:22       ` Gregor Zattler
2020-12-14 19:22         ` Gregor Zattler
2021-01-30  8:54           ` out of memory on idle machine (was: Re: consistent database corruption with notmuch new) Gregor Zattler
2021-01-30 12:58             ` David Bremner
2021-01-31  8:16               ` out of memory on idle machine Gregor Zattler
2021-01-31 20:21                 ` Gregor Zattler
2021-02-03 11:32                   ` David Bremner
2021-02-03 11:59                 ` David Bremner
2021-02-07 21:46                   ` Gregor Zattler
2021-02-11 10:53                     ` David Bremner
2021-02-11 11:32                       ` David Bremner
2021-03-17 19:47                         ` Gregor Zattler [this message]
2021-03-18  1:25                           ` [PATCH] test: add known broken test for long directory bug David Bremner
2021-03-18  7:26                             ` Tomi Ollila
2021-03-18 11:02                               ` David Bremner
2021-03-20 13:10                             ` [PATCH] lib/n_d_index_file: check return value from _n_m_add_filename David Bremner
2021-04-18 13:05                               ` David Bremner
2021-03-18  1:39                           ` bug: chokes on long directory names (was: Re: out of memory on idle machine) David Bremner
2021-02-12  4:19                       ` out of memory on idle machine Olly Betts
2021-02-21  9:42                         ` Gregor Zattler
2021-02-09  4:34                   ` Olly Betts
2021-02-13 20:30                     ` Gregor Zattler
2020-12-14  9:11 ` consistent database corruption with notmuch new David Edmondson
2020-12-14 12:27   ` Gregor Zattler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210317194728.GB5561@no.workgroup \
    --to=telegraph@gmx.net \
    --cc=notmuch@notmuchmail.org \
    --cc=xapian-discuss@lists.xapian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).