From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61548 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Fwd: Updating Inbox hangs (and I know why) Date: Wed, 14 Dec 2005 20:12:17 +0100 Message-ID: References: <84fyp2x1hg.fsf@www.uni-magdeburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134587838 17712 80.91.229.2 (14 Dec 2005 19:17:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Dec 2005 19:17:18 +0000 (UTC) Cc: Wolfram Fenske Original-X-From: ding-owner+m10080@lists.math.uh.edu Wed Dec 14 20:17:09 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Emc4e-00018l-Oh for ding-account@gmane.org; Wed, 14 Dec 2005 20:14:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1Emc4X-0006Xf-00; Wed, 14 Dec 2005 13:13:53 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1Emc3E-0006Xa-00 for ding@lists.math.uh.edu; Wed, 14 Dec 2005 13:12:32 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1Emc3A-0000UY-Cj for ding@lists.math.uh.edu; Wed, 14 Dec 2005 13:12:32 -0600 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Emc39-00037u-00 for ; Wed, 14 Dec 2005 20:12:27 +0100 Original-Received: from latte.josefsson.org (jas@yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3) with ESMTP id jBEJCOxT019306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Dec 2005 20:12:25 +0100 Original-To: OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:051214:ding@gnus.org::rfyfcioch+y1tw+6:89fX X-Hashcash: 1:21:051214:wolfram.fenske@student.uni-magdeburg.de::eqjMhCCAumLNbXfh:HrTz X-Hashcash: 1:21:051214:wolfram.fenske@student.uni-magdeburg.de::5VEXQ7ZAxGfpAW5U:4Kfu In-Reply-To: (Reiner Steib's message of "Wed, 14 Dec 2005 16:12:46 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on yxa-iv X-Virus-Scanned: ClamAV version 0.84, clamav-milter version 0.84e on yxa.extundo.com X-Virus-Status: Clean X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61548 Archived-At: I think this is an XEmacs problem. Calling accept-process-output on a dead process should return an error. There may be an imap.el bug too, or a imap.el workaround, but if XEmacs detected if a process had died when accept-process-output, the exact bug below would probably not occur. Reiner Steib writes: > [ From bugs@gnus.org ... ] > > Hi, > > I don't know if this should be fixed in imap.el or in XEmacs. > > Anyone? > > Bye, Reiner. > > From: Wolfram Fenske > Subject: Updating Inbox hangs (and I know why) > Newsgroups: gnus.gnus-bug > Date: Fri, 09 Dec 2005 06:50:51 +0100 > > > Hello! > > When I try to update my Inbox (M-g) after a period of inactivity (say > 5 or 10 minutes), XEmacs hangs. I have to press C-g to stop updating. > Pressing M-g afterwards opens a new connection and succeeds. I think > what happens is that the connection somehow dies while I'm not active > but Gnus somehow doesn't realize this. > > > I have found out that the hanging occurs in "imap-wait-for-tag" in > "imap.el". The function call that hangs is "(accept-process-output > imap-process 0 0)". Now I'm not really sure what this is supposed to > do, but I suspect this is a bug because looking at the definition of > "accept-process-output" in XEmacs' "event-stream.c" if find this: > > if (msecs) > { > timeout_id = event_stream_generate_wakeup (msecs, 0, Qnil, Qnil, 0); > timeout_enabled = 1; > } > > That means that a timeout is only established if the given interval is > non-zero. So in the case of "(accept-process-output imap-process 0 > 0)", it waits indefinitely if not output is generated. But if the > process is dead, "(memq (process-status imap-process) '(open run))" in > the while loop above returns "nil" and we get to the function call in > question and never return. > > I tried and set the timeout to 1 second. This way, when I update and > the imap-process has died, I get an error the first time: > > Process not open for writing: # > > If I try it again, updating works. I guess what's needed is to restart > the process if it's not open or running anymore. > > Kind regards > Wolfram Fenske > > > Gnus v5.10.7 > XEmacs 21.4 (patch 17) "Jumbo Shrimp" [Lucid] (i686-pc-cygwin, Mule) of Fri Nov 4 2005 on hondo > 201 news.cs.uni-magdeburg.de InterNetNews NNRP server INN 2.4.1 ready (no posting). > > > ---------- > > > > [ User settings stripped, see > on news.gnus.org ]