From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#52735: 29.0.50; Gnus hangs while getting new news Date: Wed, 22 Dec 2021 16:01:25 -0800 Message-ID: <8735mk8a0a.fsf@ericabrahamsen.net> References: <87sfukekpo.fsf@gmx.net> <87a6gsa9rs.fsf@ericabrahamsen.net> <87o858edua.fsf@gmx.net> <87wnjw8qzr.fsf@ericabrahamsen.net> <87k0fwdyhp.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21308"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 52735@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 23 01:02:23 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n0BYs-0005OD-3i for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Dec 2021 01:02:22 +0100 Original-Received: from localhost ([::1]:36968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0BYr-0003kg-7I for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Dec 2021 19:02:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0BYZ-0003KU-2z for bug-gnu-emacs@gnu.org; Wed, 22 Dec 2021 19:02:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48510) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0BYY-0002iB-Ma for bug-gnu-emacs@gnu.org; Wed, 22 Dec 2021 19:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n0BYY-0000j3-LV for bug-gnu-emacs@gnu.org; Wed, 22 Dec 2021 19:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Dec 2021 00:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52735 X-GNU-PR-Package: emacs Original-Received: via spool by 52735-submit@debbugs.gnu.org id=B52735.16402176952727 (code B ref 52735); Thu, 23 Dec 2021 00:02:02 +0000 Original-Received: (at 52735) by debbugs.gnu.org; 23 Dec 2021 00:01:35 +0000 Original-Received: from localhost ([127.0.0.1]:60048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0BY7-0000hv-31 for submit@debbugs.gnu.org; Wed, 22 Dec 2021 19:01:35 -0500 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:45772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0BY4-0000hg-QS for 52735@debbugs.gnu.org; Wed, 22 Dec 2021 19:01:33 -0500 Original-Received: from localhost (c-71-197-232-41.hsd1.wa.comcast.net [71.197.232.41]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id BEA6BFA093; Thu, 23 Dec 2021 00:01:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1640217687; bh=7yb5RShfGGXl+es0ykgoak8Jf5JJuNYV+U7lB0AqASI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=yWG6kJ0zPp5c+nYFSqWXtuOYksQMoGsanu2E7QTluFry7eE3TZYFlbjyHjaHQRQfa 4epjbpLPC8ck8jfhj6x3BJZ2vWF+x7JegUwyNsMyMkO5gWXXgOw3uXVvQQ5WrP47r9 1wJ4oNI5WQJ9bPEkmoNiEQJIEaAnTW34hf7DvIiM= In-Reply-To: <87k0fwdyhp.fsf@gmx.net> (Stephen Berman's message of "Thu, 23 Dec 2021 00:13:38 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222965 Archived-At: On 12/23/21 00:13 AM, Stephen Berman wrote: > On Wed, 22 Dec 2021 09:54:32 -0800 Eric Abrahamsen wrote: > > On 12/22/21 18:42 PM, Stephen Berman wrote: >>> On Wed, 22 Dec 2021 08:23:35 -0800 Eric Abrahamsen wrote: >>> >>>> Stephen Berman writes: >>>> >>>>> The hang appears to happen in nntp-finish-retrieve-group-infos: stepping >>>>> through the code with Edebug, I see an infinite loop here: >>>>> >>>>> (while (and (gnus-buffer-live-p buf) >>>>> (progn >>>>> (goto-char last-point) >>>>> ;; Count replies. >>>>> (while (re-search-forward >>>>> (if nntp-server-list-active-group >>>>> "^[.]" >>>>> "^[0-9]") >>>>> nil t) >>>>> (cl-incf received)) >>>>> (setq last-point (point)) >>>>> (< received count))) >>>>> (nntp-accept-response)) >>>>> >>>>> when the server buffer (e.g. " *server news.gmane.io nntp *nntpd**") is >>>>> empty. Since this code clearly does not expect an empty buffer, the bug >>>>> is presumably making this buffer empty when this code is executed. But >>>>> I haven't managed to figure out how this happens. (I have seen that >>>>> this buffer can become empty in other situations, e.g. on opening an >>>>> article in Gnus, and that doesn't cause any problems.) I've also >>>>> observed that when I wait long enough for the server process to close >>>>> (the buffer then shows "Process nntpd connection broken by remote >>>>> peer"), then there is no hang on typing `g' in the *Group* buffer. >>>> >>>> The only thing I can suggest now is more debugging on >>>> `nntp-finish-retrieve-group-infos', and try to get a backtrace for both >>>> the buggy empty-buffer situation, and the normal, non-empty-buffer >>>> situation. Perhaps comparing the two backtraces will provide a clue as >>>> to how we ended up with an empty buffer? >>> >>> So far, I determined that problem isn't the empty buffer per se, but >>> that it remains empty after (nntp-accept-response) returns, that's why >>> the while-loop keeps looping. I'll try to dig into nntp-accept-response. >> >> This is probably a total red herring, but... look for `copy-to-buffer' >> calls that are pointing at the wrong buffer (ie, the process output is >> supposed to go to nntp-server-buffer, but it goes elsewhere). > > I haven't succeeded in following the nntp-accept-response call that > leaves the server buffer empty to any code calling copy-to-buffer. The > pattern I see is that there are two calls of nntp-accept-response in the > while-loop that leave the buffer empty, and on the third iteration, > either the buffer is filled with data, or it remains empty, causing the > hang. I added a counter to the loop and when it reaches 3 a call to > nntp-kill-buffer to kill the server buffer: this results in a bunch of > "Warning - invalid active" messages but doesn't hang. When I then type > `g' in the *Group* buffer, fetching new news successfully completes. So > this just mimics the effect of `C-g' followed by `g' as I reported > above. But I'm no closer to the reason for the hang or how to track it > down. Since no one else seems to be having this problem, that suggests > a problem with my connection to news.gmane.io; is there anything I can > do to investigate that? Okay, we're probably looking at different issues, sorry for the distraction. Unfortunately, I don't have any bright ideas for the problem you're facing...