Subject: bug#28596: Gnus gets into an ambiguous plugged/unplugged state that prevents retrieval of news

From: [email-masked] (N. Jackson)
Date: Mon, 11 Dec 2017 12:58:07 -0500

retitle 28596 Gnus gets into an ambiguous plugged/unplugged state that prevents retrieval of news
quit

I am re-titling the bug report, because as far as I can see, the
bug is not about retrieving mail, only news; and also I'm
increasingly convinced that the hang I was observing when I first
reported the bug was simply because while I was trying to
extricate Gnus from it's confused/broken state I failed to follow
the protocols I usually follow to prevent being bitten by Bug
16026/16906 (which causes a hang).

Also, I now have a recipe that seems to reproduce the bug reliably
here, but it is by no means a minimal recipe:

1. Turn off Internet connection.
2. Start Emacs (26.0.90 pretest)
3. Start Gnus with `gnus-unplugged'
4. Retrieve mail from my local IMAP server with `g' command (`gnus-group-get-new-news')
5. Restore connectivity to Internet
6. (Try to) put Gnus into plugged state with `J j' (`gnus-agent-toggle-plugged')

Result: Mode line now says "Plugged" instead of "Unplugged" but
nntp servers cannot be put in an Open state. Rather agentised
servers can be either Closed or Offline and unagentised servers
can be either Closed or Denied.

At 12:14 -0500 on Monday 2017-12-04, N. Jackson wrote:
> However, I had forgotten (or never saw) your suggestions to
>
>   "try setting url-asynchronous to nil when fetching news... [o]r
>   maybe even build Emacs with HAVE_GETADDRINFO_A undefined"
>
> and I will try that with 26.0.90 these next days.

Following up on this (negatively) for completeness:

1. I restarted Emacs and then set `url-asynchronous' to nil, but
no, this did not prevent Gnus from getting into the
confused/broken state.

2. I also re-built the pretest (26.0.90) with HAVE_GETADDRINFO_A
undefined, but no, that did not prevent the bug from manifesting
either.

N.