From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/85606 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Performance problem of imap move Date: Wed, 28 Jan 2015 12:32:58 +0800 Message-ID: <877fw7sex1.fsf@ericabrahamsen.net> References: <87oapn5ufg.fsf@building.gnus.org> <87vbjul0ch.fsf@building.gnus.org> <87siex213n.fsf@gnu.org> <87oapkrim4.fsf@ericabrahamsen.net> <874mrcbzi7.fsf@building.gnus.org> <87ppa0q0hx.fsf@ericabrahamsen.net> <87lhkoajxx.fsf@building.gnus.org> <87a913tz7j.fsf@ericabrahamsen.net> <87fvavsg2i.fsf@ericabrahamsen.net> <87bnljsfz1.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422419226 7828 80.91.229.3 (28 Jan 2015 04:27:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Jan 2015 04:27:06 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M33847@lists.math.uh.edu Wed Jan 28 05:27:06 2015 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YGKDZ-0002lp-H3 for ding-account@gmane.org; Wed, 28 Jan 2015 05:27:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1YGKDL-00085L-PZ; Tue, 27 Jan 2015 22:26:51 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1YGKDJ-000856-SB for ding@lists.math.uh.edu; Tue, 27 Jan 2015 22:26:49 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84) (envelope-from ) id 1YGKDF-0004mG-V0 for ding@lists.math.uh.edu; Tue, 27 Jan 2015 22:26:49 -0600 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1YGKD9-0001uj-8b for ding@gnus.org; Wed, 28 Jan 2015 05:26:39 +0100 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YGKD6-0002F4-Of for ding@gnus.org; Wed, 28 Jan 2015 05:26:36 +0100 Original-Received: from 123.123.18.151 ([123.123.18.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Jan 2015 05:26:36 +0100 Original-Received: from eric by 123.123.18.151 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Jan 2015 05:26:36 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 88 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 123.123.18.151 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:OIppGOSNoowQfOyAPwDDg+GFT2I= X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin (3.4.0 2014-02-07) analysis follows Bayesian score: 0.0000 Ham tokens: 0.000-16--1005h-0s--0d--default, 0.000-16--986h-0s--0d--session, 0.000-10--573h-0s--0d--server, 0.000-7--398h-0s--0d--isnt, 0.000-7--394h-0s--0d--isn't Spam tokens: 0.993-1726--69h-856s--0d--HTo:D*gnus.org, 0.992-1800--87h-900s--0d--Hx-spam-relays-external:quimby.gnus.org, 0.992-1800--87h-900s--0d--H*RU:quimby.gnus.org, 0.991-1793--94h-900s--0d--H*RT:quimby.gnus.org, 0.991-1793--94h-900s--0d--H*RT:80.91.231.51 Autolearn status: no autolearn_force=no -1.0 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [80.91.229.3 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 1.2 RCVD_NUMERIC_HELO Received: contains an IP address used for HELO -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 2.0 FSL_HELO_BARE_IP_2 No description available. List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:85606 Archived-At: Eric Abrahamsen writes: > Eric Abrahamsen writes: > >> Eric Abrahamsen writes: >> >>> Lars Ingebrigtsen writes: >>> >>>> Eric Abrahamsen writes: >>>> >>>>> A local dovecot server, synced with gmail via isync. >>>> >>>> Ah. For some reason, it seems that people running local IMAP servers >>>> triggers a lot of bugs in Gnus... >>>> >>>>> I've always meant to go and follow the code, but it's never been >>>>> annoying enough for me to actually do it. But if you're messing nnimap >>>>> at the moment anyway, maybe now's a good time. >>>> >>>> Please do. :-) >>> >>> Doing this bit by bit, first of all here are the imap commands resulting >>> from moving article 39339 from INBOX to [Gmail].Trash, where it became >>> article 175. Upon leaving the INBOX group, [Gmail].Trash was marked as >>> containing 36 unread articles, when in fact it had none -- refreshing >>> Gnus reset the unread count to the proper value. Stepping through >>> `gnus-summary-move-article' and `nnimap-request-move-article' didn't >>> show anything immediately out of the ordinary, but I don't really >>> understand imap all that well. >>> >>> In a bit, I'll try it again and step through `nnimap-request-set-mark'. >>> That's what's being used to update marks on [Gmail].Trash, and seems >>> like the next most likely place to find bugs. Like I said, though, I >>> don't know imap all that well, so someone tell me if I should be looking >>> elsewhere. >> >> A little progress: `nnimap-request-set-mark' also looked normal, so I >> followed the `gnus-group-get-new-news-this-group' call at the end of >> `gnus-summary-move-article' instead. >> >> In the `let' in the middle of that (gnus-group.el:4081 in current Gnus), >> we call both `gnus-get-info' and `gnus-active' on the "group" variable. >> The return value of `gnus-get-info' indicates a "seen" range of (1 . >> 177), which is correct. The return value of `gnus-active' is (1 . 211), >> which isn't correct, and leads to the bogus unread count. >> >> Off to look at what's happening in `gnus-active'... > > Ugh, it looks at gnus-active-hashtb. I think this is where I pass the > baton to someone else. Because this is driving me nuts... I'm able to consistently reproduce the following: 1. (gnus-active "nnimap+PR:[Gmail].Trash") --> (1 . 178) ; correct 2. Move article into Trash 3. (gnus-active "nnimap+PR:[Gmail].Trash") --> (1 . 211) ; wrong 4. Update Gnus, or just the Trash group 5. (gnus-active "nnimap+PR:[Gmail].Trash") --> (1 . 179) ; correct Guess what's weird! It looks like, in my current session, moving any article into any group causes `gnus-active' to return (1 . 211) for that group. If the group has fewer than that many messages, that manifests as an immediate unread count, representing the difference. If the group has more than 211 messages, nothing immediately happens, but the next time I refresh Gnus the group suddenly has a *whole lot* more unread messages, and they are actually unread -- I can go into the group and see them marked as unread. I just experimented with a different group. Its correct active count was (1 . 609). I moved a message into it -- didn't see anything funny. Next time I refreshed Gnus it was marked as containing 399 unread messages, and `gnus-active' returned the dreaded (1 . 211). When I entered the group, it asked how many messages I wanted to see, default 403. I hit return, and the summary buffer contained 399 unread messages. Some of those messages I had previously ticked, but now they appeared completely bare. I caught up and exited with "c", and the group went back to normal. Next time I entered the group, all the old marks (ticks, etc) were properly restored. So: gremlins. 211 of them. Next time I restart Gnus I'll try this again, and see if I get a new magic number. Back to work for now... E