From: Simon Josefsson <jas@extundo.com>
Cc: Wolfram Fenske <Wolfram.Fenske@Student.Uni-Magdeburg.DE>
Subject: Re: Fwd: Updating Inbox hangs (and I know why)
Date: Wed, 14 Dec 2005 20:12:17 +0100 [thread overview]
Message-ID: <ilu3bkvebn2.fsf@latte.josefsson.org> (raw)
In-Reply-To: <v9zmn3pv9t.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Wed, 14 Dec 2005 16:12:46 +0100")
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 <reinersteib+from-uce@imap.cc> 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 <Wolfram.Fenske@Student.Uni-Magdeburg.DE>
> 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: #<process "imap" pid 1400 state:exit>
>
> 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
> <news:84fyp2x1hg.fsf@www.uni-magdeburg.de> on news.gnus.org ]
next prev parent reply other threads:[~2005-12-14 19:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <84fyp2x1hg.fsf@www.uni-magdeburg.de>
2005-12-14 15:12 ` Reiner Steib
2005-12-14 19:12 ` Simon Josefsson [this message]
2005-12-21 23:53 ` FIXED (was: Fwd: Updating Inbox hangs (and I know why)) Wolfram Fenske
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=ilu3bkvebn2.fsf@latte.josefsson.org \
--to=jas@extundo.com \
--cc=Wolfram.Fenske@Student.Uni-Magdeburg.DE \
/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).