Hi, On Fri, Nov 18, 2011 at 10:48:03PM +0900, Osamu Aoki wrote: > On Thu, Nov 17, 2011 at 07:38:28PM +0100, Roland Koebler wrote: > > I have looked at the source of the new version: The section which causes > > the problem wasn't modified. > > This is only true locally when you look few lines around your patch. This is also true when I look at the whole _retrieverbases.py. All changes to this file in the new version are completely irrelevant for this problem.
> http://anonscm.debian.org/gitweb/?p=collab-maint/getmail.git;a=commitdiff;h=713c499baa67609886dd455f74d1875bf3e24da0#patch6 > > @@ -387,29 +391,53 @@ > @@ -417,9 +445,18 @@ > @@ -433,18 +470,34 @@ > > These certainly affect situation. I hope you agree. No, all these changes don't affect the problem. > > I currently cannot test the new version though, > > since the problem only occurs *sometimes* (probably when yahoo does > > something strange). But since the appropriate source-section didn't change, > > Not true ... It is true. > > I'm pretty sure that the new version behaves the same, and that my patch > > is still required. > > Your "pretty sure" is not good enough without confirming the fact. I *have* checked the code. As soon as this problem occurs again with the old version, I can test it with the new version -- but the result will be the same. > I understand your patch work around situation for you but the upstream > seems attacking root cause or at least his recent work is highly coupled > to your situation. No, it isn't. The changes are completely independent of this problem. Ok, here's some more explanation: The problem is in the class POP3RetrieverBase, function _getmsglist, in the two lines response, msglist, octets = self.conn.uidl() and response, msglist, octets = self.conn.list() Both lines connect to the POP3-server and get a list of messages. Now, the problem is, that the code assumes that the the 2nd (later) call gets the *same* msglist from the server as the 1st call. If the server returns a different msglist on the 2nd call, a few lines later (in "self.msgsizes[self.msgid_by_msgnum[msgnum]] = msgsize") a KeyError occurs. So this is a simple race condition bug. [1] And my patch solves this race condition. [1] Additionally, Yahoo sometimes seems to behave strangely, so that this "race condition" occurs all the time until a new mail arrives in the Yahoo-POP3-mailbox. So, there's probably a bug in the Yahoo POP3 server, too. Roland -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

