Subject: bug#9243: 24.0.50; Gnus keeps seeing 101 unread spam

From: Stefan Monnier <[email-masked]>
Date: Mon, 22 Aug 2011 18:30:38 -0400

>> Here's what I did:
>> - emacs-trunk/src/emacs -f gnus
>> - type my IMAP password.
>> - see "101: nnimap+diro:spam" among the folders with unread email.
>> - Erase *imap log*
>> - type `g' to refresh the *Group* buffer.
>> [ it still says "101". ]
>> - hit `c y' on that folder.
>> [ it now says "0" unread email in the spam folder. ]
>> - hit `g' for the fun of it.
>> [ Lo and behold I have 101 unread email in my spam folder again. ]

> Hm.  What happens if you `M-g' the group once?

After M-g, it says "34987: nnimap+diro:spam".
After that `c y' brings it down to 100, and `g' brings it back up to
the magical 101.

Here's a session where I did M-g, then entered the group to view the
last 10 messages, left the group, re-entered it to view all messages,
left the group (at which point it said "12222: nnimap+diro:spam"), then
`g' again (which brought it up to 12323, a difference of 101), then
re-entered the group and left it again with `c y' to go down to 0, after
which a final `g' brought it back to 101.

If I do another M-g, it comes back up to around 34K again.
I'll be happy to increase the logging details if you tell me how.

        Stefan

18:12:33 10478 SELECT ""
18:12:33 10479 UID FETCH 1:* FLAGS
18:12:33 10480 EXAMINE "spam"
18:12:33 10481 UID FETCH 46421:* FLAGS
18:12:33 10482 EXAMINE "yale"
18:12:33 10483 UID FETCH 1140:* FLAGS
18:12:33 10484 EXAMINE "types"
18:12:33 10485 UID FETCH 3645:* FLAGS
18:12:33 10486 EXAMINE "subscriptions"
18:12:33 10487 UID FETCH 1:* FLAGS
18:12:33 10488 EXAMINE "qcpls"
18:12:33 10489 UID FETCH 3285:* FLAGS
18:12:33 10490 EXAMINE "friends"
18:12:33 10491 UID FETCH 1872:* FLAGS
18:12:33 10492 EXAMINE "emacs"
18:12:33 10493 UID FETCH 177460:* FLAGS
18:12:33 10494 EXAMINE "stages"
18:12:33 10495 UID FETCH 1658:* FLAGS
18:12:33 10496 EXAMINE "nanda"
18:12:33 10497 UID FETCH 1182:* FLAGS
18:12:33 10498 EXAMINE "diro"
18:12:33 10499 UID FETCH 24191:* FLAGS
18:12:33 10500 EXAMINE "cours"
18:12:33 10501 UID FETCH 4014:* FLAGS
18:12:33 10502 EXAMINE "INBOX"
18:12:33 10503 UID FETCH 63716:* FLAGS

18:14:24 10504 NOOP
18:14:30 10505 SELECT "spam"
18:14:30 10506 UID FETCH 1:* FLAGS

18:15:31 10507 SELECT ""
18:15:31 10508 UID FETCH 1:* FLAGS
18:15:31 10509 EXAMINE "spam"
18:15:31 10510 UID FETCH 46421:* FLAGS
18:15:31 10511 EXAMINE "yale"
18:15:31 10512 UID FETCH 1140:* FLAGS
18:15:31 10513 EXAMINE "types"
18:15:31 10514 UID FETCH 3645:* FLAGS
18:15:31 10515 EXAMINE "subscriptions"
18:15:31 10516 UID FETCH 1:* FLAGS
18:15:31 10517 EXAMINE "qcpls"
18:15:31 10518 UID FETCH 3285:* FLAGS
18:15:31 10519 EXAMINE "friends"
18:15:31 10520 UID FETCH 1872:* FLAGS
18:15:31 10521 EXAMINE "emacs"
18:15:31 10522 UID FETCH 177487:* FLAGS
18:15:31 10523 EXAMINE "stages"
18:15:31 10524 UID FETCH 1658:* FLAGS
18:15:31 10525 EXAMINE "nanda"
18:15:31 10526 UID FETCH 1182:* FLAGS
18:15:31 10527 EXAMINE "diro"
18:15:31 10528 UID FETCH 24193:* FLAGS
18:15:31 10529 EXAMINE "cours"
18:15:31 10530 UID FETCH 4014:* FLAGS
18:15:31 10531 EXAMINE "INBOX"
18:15:31 10532 UID FETCH 63719:* FLAGS

18:16:48 10560 SELECT "spam"
18:16:55 10561 UID STORE 46512:46521 +FLAGS.SILENT (\Seen)
18:18:36 10562 NOOP
18:18:39 10563 UID STORE 12319:12320,12444:12447,13514:13517,13749:13750,13862,13936:13943,13971,14092,15263:15264,17444:17448,19595:24529,24562:25728,25912:26214,26257:26521,26536:26797,26889:29232,29298:30019,30511:30836,30840,30874:30990,30994:31009,31031:31035,31046,31081:31088,31095:31320,31493:31515,31522:31527,31534:31539,31575:31633,31649:31665,31673:31775,31788:31793,31795:31986,32013:32088,32090:32187,32196:32202,32212:32217,32224:32227,32246:32249,32275:32328,32349:32401,32403:32451,32458:32468,32471:32479,32481,32483,32488:32510,32520:32530,32532:32540,32565:32579,32591:32592,32600:32601,32623:32701,32713:32721,32734:32739,32751:32826,32834:32838,32871:32875,32882,32890:33003,33012:33022,33030:33036,33051:33063,33108:33134,33138:33194,33210:33219,33247:33265,33276:33310,33322:33332,33335:33343,33355:33372,33425:33441,33443:33488,33490:33494,33514,33525:33567,33639:33706,33738:33799,33831:34089,34143:34164,34175:34278,34313:34331,34373:34469,34493:34551,34556:34575,34578:34581,34618:34621,34625:34707,34766:34814,34820:35223,35281:35328,35340:35629,35649:35721,35789:35804,35808:35986,36116:36169,36177:36293,36301:36324,36378:36412,36425:36440,36467:36485,36503:36627,36693:36721,36750:36762,36823:36835,36854:36864,36883:37020,37040:37053,37135:37150,37257:37351,37373:37377,37384:37401,37544:37574,37610:37772,37827:37875,37886:37960,37980,37982,38005:38020,38085:38151,38227:38247,38288:38338,38354:38432,38467:38492,38528:38533,38623:38626,38632:38689,38726:38748,38807:39085,39140:39156,39178:39706,39732:42413,42419:42622,42772:43403,43433:43476,43506:43772,43788:43798,43815:43834,43881:43915,43923:45919,45946:46511 +FLAGS.SILENT (\Seen)

18:19:02 10564 SELECT ""
18:19:02 10565 UID FETCH 1:* FLAGS
18:19:02 10566 EXAMINE "spam"
18:19:02 10567 UID FETCH 46421:* FLAGS
18:19:02 10568 EXAMINE "yale"
18:19:02 10569 UID FETCH 1140:* FLAGS
18:19:02 10570 EXAMINE "types"
18:19:02 10571 UID FETCH 3645:* FLAGS
18:19:02 10572 EXAMINE "subscriptions"
18:19:02 10573 UID FETCH 1:* FLAGS
18:19:02 10574 EXAMINE "qcpls"
18:19:02 10575 UID FETCH 3285:* FLAGS
18:19:02 10576 EXAMINE "friends"
18:19:02 10577 UID FETCH 1872:* FLAGS
18:19:02 10578 EXAMINE "emacs"
18:19:02 10579 UID FETCH 177488:* FLAGS
18:19:02 10580 EXAMINE "stages"
18:19:02 10581 UID FETCH 1658:* FLAGS
18:19:02 10582 EXAMINE "nanda"
18:19:02 10583 UID FETCH 1182:* FLAGS
18:19:02 10584 EXAMINE "diro"
18:19:02 10585 UID FETCH 24193:* FLAGS
18:19:02 10586 EXAMINE "cours"
18:19:02 10587 UID FETCH 4014:* FLAGS
18:19:02 10588 EXAMINE "INBOX"
18:19:02 10589 UID FETCH 63719:* FLAGS
18:19:37 10590 SELECT "spam"
18:21:12 10591 NOOP
18:23:50 10592 UID STORE 11535:12318,12321:12443,12448:13513,13518:13748,13751:13861,13863:13935,13944:13970,13972:14091,14093:15262,15265:17443,17449:19594,24530:24561,25729:25911,26215:26256,26522:26535,26798:26888,29233:29297,30020:30510,30837:30839,30841:30873,30991:30993,31010:31030,31036:31045,31047:31080,31089:31094,31321:31492,31516:31521,31528:31533,31540:31574,31634:31648,31666:31672,31776:31787,31794,31987:32012,32089,32188:32195,32203:32211,32218:32223,32228:32245,32250:32274,32329:32348,32402,32452:32457,32469:32470,32480,32482,32484:32487,32511:32519,32531,32541:32564,32580:32590,32593:32599,32602:32622,32702:32712,32722:32733,32740:32750,32827:32833,32839:32870,32876:32881,32883:32889,33004:33011,33023:33029,33037:33050,33064:33107,33135:33137,33195:33209,33220:33246,33266:33275,33311:33321,33333:33334,33344:33354,33373:33424,33442,33489,33495:33513,33515:33524,33568:33638,33707:33737,33800:33830,34090:34142,34165:34174,34279:34312,34332:34372,34470:34492,34552:34555,34576:34577,34582:34617,34622:34624,34708:34765,34815:34819,35224:35280,35329:35339,35630:35648,35722:35788,35805:35807,35987:36115,36170:36176,36294:36300,36325:36377,36413:36424,36441:36466,36486:36502,36628:36692,36722:36749,36763:36822,36836:36853,36865:36882,37021:37039,37054:37134,37151:37256,37352:37372,37378:37383,37402:37543,37575:37609,37773:37826,37876:37885,37961:37979,37981,37983:38004,38021:38084,38152:38226,38248:38287,38339:38353,38433:38466,38493:38527,38534:38622,38627:38631,38690:38725,38749:38806,39086:39139,39157:39177,39707:39731,42414:42418,42623:42771,43404:43432,43477:43505,43773:43787,43799:43814,43835:43880,43916:43922,45920:45945,46421:46521 +FLAGS.SILENT (\Seen)
18:23:50 10593 NOOP
18:24:00 10594 SELECT ""
18:24:00 10595 UID FETCH 1:* FLAGS
18:24:00 10596 EXAMINE "spam"
18:24:00 10597 UID FETCH 46421:* FLAGS
18:24:00 10598 EXAMINE "yale"
18:24:00 10599 UID FETCH 1140:* FLAGS
18:24:00 10600 EXAMINE "types"
18:24:00 10601 UID FETCH 3645:* FLAGS
18:24:00 10602 EXAMINE "subscriptions"
18:24:00 10603 UID FETCH 1:* FLAGS
18:24:00 10604 EXAMINE "qcpls"
18:24:00 10605 UID FETCH 3285:* FLAGS
18:24:00 10606 EXAMINE "friends"
18:24:00 10607 UID FETCH 1872:* FLAGS
18:24:00 10608 EXAMINE "emacs"
18:24:00 10609 UID FETCH 177489:* FLAGS
18:24:00 10610 EXAMINE "stages"
18:24:00 10611 UID FETCH 1658:* FLAGS
18:24:00 10612 EXAMINE "nanda"
18:24:00 10613 UID FETCH 1182:* FLAGS
18:24:00 10614 EXAMINE "diro"
18:24:00 10615 UID FETCH 24193:* FLAGS
18:24:00 10616 EXAMINE "cours"
18:24:00 10617 UID FETCH 4014:* FLAGS
18:24:00 10618 EXAMINE "INBOX"
18:24:00 10619 UID FETCH 63719:* FLAGS
18:24:24 10620 NOOP