Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Prashant Tak <prashantrameshtak@gmail.com>
Cc: info-gnus-english@gnu.org
Subject: Re: Gnus fetch freezes emacs
Date: Fri, 30 Jun 2023 21:33:08 +0200	[thread overview]
Message-ID: <87ttuoeoej.fsf@gmx.net> (raw)
In-Reply-To: <87sfa9nhp4.fsf@gmail.com> (Prashant Tak's message of "Fri, 30 Jun 2023 20:03:11 +0530")

On Fri, 30 Jun 2023 20:03:11 +0530 Prashant Tak <prashantrameshtak@gmail.com> wrote:

> Gnus has been freezing sporadically when `gnus-group-get-new-news` is run.
> And it keeps on going for hours, I have to manually intercept and signal
> `keyboard-quit` and then perform the fetch operation again. This happens
> in a very unpredictable manner, so it's hard to replicate. I did manage
> to get a profiler report when that happened.
>
>         7367  99% - command-execute
>         7367  99%  - call-interactively
>         7070  95%   - funcall-interactively
>         7070  95%    - gnus-group-get-new-news
>         7063  95%     - gnus-get-unread-articles
>         7063  95%      - gnus-read-active-for-groups
>         7063  95%       - gnus-finish-retrieve-group-infos
>         7063  95%        - nntp-finish-retrieve-group-infos
>         7063  95%         - nntp-with-open-group-function
>         6851  92%          - #<compiled -0x1643a6a03cf748e>
>         6416  86%           - nntp-accept-response
>         6068  82%            - nntp-accept-process-output
>         5873  79%             - nnheader-accept-process-output
>           19   0%              + accept-process-output
>           34   0%               nntp-find-connection-buffer
>            7   0%       gnus-parent-read-child-newsrc
>          297   4%   - byte-code
>          297   4%    + read-extended-command
>           15   0% + ...
>
> The main culprit seems to be `nnheader-accept-process-output` but I
> don't know how to proceed further. Appreciate any help/input into the matter.

This sounds like the issue I've been having with gnus-group-get-new-news
and similar Gnus commands for more than a year and a half, see
bug#52735.  As reported there, I did some debugging but couldn't
pinpoint the problem, nor have I tried profiling yet.  But as a
workaround, I've been using the following replacement for
gnus-group-get-new-news:

(defun srb-gnus-group-get-new-news (&optional arg one-level)
  (interactive "P")
  (with-timeout (1 (kill-buffer (nntp-find-connection-buffer nntp-server-buffer))
		   (gnus-group-get-new-news))
    (gnus-group-get-new-news arg one-level)))

(define-key gnus-group-mode-map "g" 'srb-gnus-group-get-new-news)

This usually suffices but not always.  When Gnus (and hence Emacs) hangs
even when using this workaround, I've resorted to manually killing the
server buffer " *server news.gmane.io nntp *nntpd**" and then typing `g'
pretty reliably works again.

This is a very annoying issue, and if what you're experiencing is the
same, I commiserate with you, but your report also gives me hope that
it's not just some quirk of my setup or network connection.  Now we just
need some Gnus expert to chime in and guide us to try and track down the
cause of this issue and get it fixed.

Steve Berman


  reply	other threads:[~2023-06-30 19:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 14:33 Prashant Tak
2023-06-30 19:33 ` Stephen Berman [this message]
2023-07-01 10:41   ` Eric S Fraga
2023-07-01 18:00     ` Stephen Berman
2023-07-02 15:15   ` Prashant Tak
2023-07-02 23:59     ` Eric Abrahamsen
2023-07-03 12:15       ` Eric S Fraga
2023-07-03 12:58       ` Eric S Fraga
2023-07-03 16:36         ` Eric Abrahamsen
2023-07-04 11:31           ` Stephen Berman
2023-07-04 17:02             ` Eric Abrahamsen
2023-07-04 19:55               ` Stephen Berman
2023-07-05  3:50                 ` Eric Abrahamsen
2023-07-05  8:04                   ` Stephen Berman
2023-07-05 18:55                     ` Eric Abrahamsen
2023-07-05 20:09                       ` Stephen Berman
2023-07-05 20:34                         ` Eric Abrahamsen
2023-07-05 21:05                           ` Stephen Berman
2023-07-03 19:22         ` Bob Newell
2023-07-04  8:13           ` Robert Pluim
2023-07-05 16:56             ` Gmail slowness/occasional SMTP hang Bob Newell
2023-07-02 17:37   ` Gnus fetch freezes emacs yeti

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

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

  git send-email \
    --in-reply-to=87ttuoeoej.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=info-gnus-english@gnu.org \
    --cc=prashantrameshtak@gmail.com \
    /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.
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 NNTP newsgroup(s).