From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#36341: 27.0.50; Reading from the Gnus dribble file leaves data inconsistent Date: Wed, 03 Jul 2019 12:46:09 -0700 Message-ID: <87wogykike.fsf@ericabrahamsen.net> References: <87v9wwuxge.fsf@ericabrahamsen.net> <87mui8kvkw.fsf@aia00054aia.gr> <87fto0tae3.fsf@ericabrahamsen.net> <874l49s5qt.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="231938"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 36341@debbugs.gnu.org, Deus Max To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 03 21:59:33 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hilPf-000xpz-P3 for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Jul 2019 21:59:31 +0200 Original-Received: from localhost ([::1]:39808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hilDk-0003t3-Oz for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Jul 2019 15:47:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50712) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hilDc-0003rT-T4 for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2019 15:47:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hilDa-00029L-BX for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2019 15:47:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41300) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hilDa-000292-6U for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2019 15:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hilDa-0000Ds-1n for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2019 15:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jul 2019 19:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36341 X-GNU-PR-Package: emacs Original-Received: via spool by 36341-submit@debbugs.gnu.org id=B36341.1562183181808 (code B ref 36341); Wed, 03 Jul 2019 19:47:02 +0000 Original-Received: (at 36341) by debbugs.gnu.org; 3 Jul 2019 19:46:21 +0000 Original-Received: from localhost ([127.0.0.1]:50121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hilCu-0000Cy-Jc for submit@debbugs.gnu.org; Wed, 03 Jul 2019 15:46:20 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:55708 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hilCs-0000Cl-Et for 36341@debbugs.gnu.org; Wed, 03 Jul 2019 15:46:19 -0400 Original-Received: from localhost (unknown [205.175.106.185]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 10D25FA01C; Wed, 3 Jul 2019 19:46:10 +0000 (UTC) In-Reply-To: (Lars Ingebrigtsen's message of "Sat, 29 Jun 2019 12:22:43 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162034 Archived-At: Lars Ingebrigtsen writes: > Eric Abrahamsen writes: > >>>> I'm pretty sure I just figured out what's wrong with the dribble file, >>>> but I'm setting out on a 80-mile bike ride now, and will fix it >>>> if/when I have survived that. >>> >>> Good luck! >> >> I survived! > > Yay! > >> But I'm having trouble reproducing this. Can you give me a more basic >> recipe, like "mark some messages read, exit with `Q`, restart"? > > First save with `s' so you have a "known good state". Then enter a > group (that has some unread articles), mark everything as read (with > `d'), `q' out of the group and then `Q' out of Emacs. You should now > have a dribble file. Then say `M-x gnus' and answer `y' to the question > about whether to read it. > > The group where you marked everything as read should now be displayed in > the group buffer with the same number of unread articles as it had > before you entered it the last time. Man, this is killing me. I've narrowed it down to: - If a dribble file is present, "g" (including gnus restart) ignores the dribble data, but "M-g" honors it. You can bounce back and forth between correct and incorrect unread counts by alternating "g" and "M-g". - The dribble file is *only* eval'ed at startup time, which must mean that there are good and bad "versions" of group info data floating around, and these two commands access different versions. - Only goes wrong for nntp groups - Once you hit "s", everything is fine (and the dribble file is deleted). - The code appears to be confused not about which articles are read, but how many/which articles exist in the group. Both "g" and "M-g" will eventually arrive at `gnus-get-unread-articles-in-group', and in the "g" case the info and active numbers are already wrong at that point. My current best guess is that, in the "M-g" case, the code will issue a 'request-scan call first, which updates the "real" active numbers for the group. nntp has no `nntp-request-scan' function (while nnimap, nnmaildir, etc, do), which might explain why the bug only shows up for nntp. So then the remaining mysteries are why does "s" clear it up, and what in my code changes could have caused this? Since I was mostly messing with the hash tables, I have to assume that data was supposed to be stored in some table, but isn't being retrieved correctly. Anyway, I'm just thinking out loud, I know what the next debugging steps are. I found another minor dribble-related bug, and will push a fix for that in a bit. Eric