Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: rhomunuq+ml_sup@gmail.com (Iain)
Subject: [sup-talk] Lost Maildir Messages
Date: Wed, 15 Apr 2009 18:29:15 +0100	[thread overview]
Message-ID: <49E6196B.504@gmail.com> (raw)
In-Reply-To: <a412e2a70903191341o744efb9bw3a02ebb1585a9b8b@mail.gmail.com>

> Hm, that would be bad. The right way to debug this is to wait for it to
> happen again (!) and examine the contents of the poll-mode and log-mode
> buffers, which should describe what Sup thinks it was doing at the time.

I've noticed what seems to be the same problem.

I've been using getmail (no procmail or fetchmail), to grab messages 
into Maildir folders. Occasionally, messages don't show up in Sup. They 
appear only when I do a manual sup-sync --changed.

I discovered by accident (by impatiently trying to read an email that I 
knew was being delivered by getmail into Sup) that I can reliably 
replicate the problem, or at least a similar problem. It seems to occur 
when Sup polls the Maildir at the same time as getmail is retrieving the 
message.

I can replicate the problem by pressing P repeatedly in Sup to manually 
poll for messages, while getmail is in the process of retrieving. (It 
takes about 4 seconds for getmail to go from initialising a retrieval to 
dropping the mail in the Maildir, so there is a big window for when I 
press P, and I can replicate the problem reliably.) Every time, Sup 
doesn't retrieve the new messages.

The log-mode buffer doesn't show anything relevant in my 
artifically-produced replication of the problem, because it doesn't log 
when you manually poll.

The poll-mode buffer for the source in question displays the exact same 
message on every poll of the source (before getmail runs, during the 
getmail run, after the getmail run) when repeatedly polling before and 
during the getmail run:

Loading from maildir:///home/user/Mail/address at example.com/... 

Found message at 12398138490002177 with labels {mylabel}

-- the timestamp never changes.

If I had to guess, I'd say that it looks like the shortcut taken 
(looking at the mtime of the directory to see if scanning for a new 
Maildir message is required) has a race condition. A weird race 
condition, because I've verified (ls -l --time-style=+%s) that the "new" 
and "tmp" folders are indeed having their timestamps updated when the 
mail drops in (they are).

This might explain the infrequent lost messages: when not hitting P 
repeatedly, this race condition is unlikely to occur, only happening 
when the Sup poll occurs within the few seconds window during which 
getmail is working and working with a new message to deliver.

~Iain


      reply	other threads:[~2009-04-15 17:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16 17:27 [sup-talk] preparing for 0.7 William Morgan
2009-03-17 18:29 ` Mark Alexander
2009-03-18 13:49   ` William Morgan
2009-03-18 15:39     ` Lee Hinman
2009-03-19 17:02       ` William Morgan
2009-03-18 21:11     ` Mark Alexander
2009-03-19 19:18     ` Mark Alexander
2009-03-19 19:25       ` William Morgan
2009-03-19 20:41         ` Mark Alexander
2009-04-15 17:29           ` Iain [this message]

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

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

  git send-email \
    --in-reply-to=49E6196B.504@gmail.com \
    --to=rhomunuq+ml_sup@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox