unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 36341@debbugs.gnu.org, Deus Max <deusmax@gmx.com>
Subject: bug#36341: 27.0.50; Reading from the Gnus dribble file leaves data inconsistent
Date: Wed, 03 Jul 2019 12:46:09 -0700	[thread overview]
Message-ID: <87wogykike.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <m34l48zo5o.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 29 Jun 2019 12:22:43 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> 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





  reply	other threads:[~2019-07-03 19:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-23 14:30 bug#36341: 27.0.50; Reading from the Gnus dribble file leaves data inconsistent Lars Ingebrigtsen
2019-06-23 15:34 ` Eric Abrahamsen
2019-06-23 15:41   ` Lars Ingebrigtsen
2019-06-23 16:35     ` Eric Abrahamsen
2019-06-23 18:25     ` Deus Max
2019-06-23 18:38       ` Eric Abrahamsen
2019-06-23 18:40         ` Lars Ingebrigtsen
2019-06-28 22:30           ` Eric Abrahamsen
2019-06-29 10:22             ` Lars Ingebrigtsen
2019-07-03 19:46               ` Eric Abrahamsen [this message]
2019-07-04 13:43                 ` Lars Ingebrigtsen
2019-07-05 19:24                   ` Eric Abrahamsen
2019-07-06 12:06                     ` Lars Ingebrigtsen
2019-07-07 23:56                       ` Eric Abrahamsen
2019-07-08 16:22                         ` Lars Ingebrigtsen
2019-07-08 17:29                           ` Eric Abrahamsen
2019-07-08 17:37                             ` Lars Ingebrigtsen
2019-07-09  4:53                               ` Eric Abrahamsen
2019-07-09 17:50                                 ` Eric Abrahamsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87wogykike.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=36341@debbugs.gnu.org \
    --cc=deusmax@gmx.com \
    --cc=larsi@gnus.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).