Gnus development mailing list
 help / color / mirror / Atom feed
* Re: gnus makes emacs lose response
@ 2006-09-23 18:18 Chong Yidong
  2006-09-23 23:42 ` Luc Teirlinck
  2006-09-26 17:26 ` Leo
  0 siblings, 2 replies; 7+ messages in thread
From: Chong Yidong @ 2006-09-23 18:18 UTC (permalink / raw)
  Cc: ding

After some further communication with Leon, I think I know the
problem: accept-process-output is called by the timer function
`gnus-demon' (which is a valid but IIUC not commonly-used component of
Gnus).  However, as documented in the Lisp Reference manual:

   Emacs binds `inhibit-quit' to `t' before calling the timer
   function, because quitting out of many timer functions can leave
   things in an inconsistent state.  This is normally unproblematical
   because most timer functions don't do a lot of work.  Indeed, for a
   timer to call a function that takes substantial time to run is
   likely to be annoying.

The result in this case is that this accept-process-output can't be
interrupted, and Emacs can hang if the process doesn't reply (e.g., if
the connection dies).

I'm not sure what the best way to handle this is.  Anyone?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus makes emacs lose response
  2006-09-23 18:18 gnus makes emacs lose response Chong Yidong
@ 2006-09-23 23:42 ` Luc Teirlinck
  2006-09-26 17:26 ` Leo
  1 sibling, 0 replies; 7+ messages in thread
From: Luc Teirlinck @ 2006-09-23 23:42 UTC (permalink / raw)
  Cc: ding, emacs-devel

Chong Yidong wrote:

   After some further communication with Leon, I think I know the
   problem: accept-process-output is called by the timer function
   `gnus-demon' (which is a valid but IIUC not commonly-used component of
   Gnus).  However, as documented in the Lisp Reference manual:

      Emacs binds `inhibit-quit' to `t' before calling the timer
      function, because quitting out of many timer functions can leave
      things in an inconsistent state.  This is normally unproblematical
      because most timer functions don't do a lot of work.  Indeed, for a
      timer to call a function that takes substantial time to run is
      likely to be annoying.

   The result in this case is that this accept-process-output can't be
   interrupted, and Emacs can hang if the process doesn't reply (e.g., if
   the connection dies).

   I'm not sure what the best way to handle this is.  Anyone?

I have no time to look at the actual code, but is there any reason why
the routine way to handle this problem, namely using `with-local-quit'
(see (elisp)Quitting) around the problematic code (in this case
probably the call to accept-process-output) does not work in this case?

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus makes emacs lose response
  2006-09-23 18:18 gnus makes emacs lose response Chong Yidong
  2006-09-23 23:42 ` Luc Teirlinck
@ 2006-09-26 17:26 ` Leo
  2006-09-26 18:08   ` Chong Yidong
  1 sibling, 1 reply; 7+ messages in thread
From: Leo @ 2006-09-26 17:26 UTC (permalink / raw)
  Cc: ding

On Sat, 09/23/2006 19:18 +0100, Chong Yidong wrote:

> After some further communication with Leon, I think I know the
> problem: accept-process-output is called by the timer function
> `gnus-demon' (which is a valid but IIUC not commonly-used component of
> Gnus).  However, as documented in the Lisp Reference manual:
>
>    Emacs binds `inhibit-quit' to `t' before calling the timer
>    function, because quitting out of many timer functions can leave
>    things in an inconsistent state.  This is normally unproblematical
>    because most timer functions don't do a lot of work.  Indeed, for a
>    timer to call a function that takes substantial time to run is
>    likely to be annoying.
>
> The result in this case is that this accept-process-output can't be
> interrupted, and Emacs can hang if the process doesn't reply (e.g., if
> the connection dies).
>
> I'm not sure what the best way to handle this is.  Anyone?

The ChangeLog says it's fixed. But I can't see the actually
fix. gnus-demon.el has not been changed for 7 month.

-- 
Leo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus makes emacs lose response
  2006-09-26 17:26 ` Leo
@ 2006-09-26 18:08   ` Chong Yidong
  2006-09-26 19:20     ` Leo
  0 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2006-09-26 18:08 UTC (permalink / raw)
  Cc: ding, emacs-devel

Leo <sdl.web@gmail.com> writes:

> The ChangeLog says it's fixed. But I can't see the actually
> fix. gnus-demon.el has not been changed for 7 month.

Hmm, I could have sworn I checked it in; oh well. I really did check
it in this time.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus makes emacs lose response
  2006-09-26 18:08   ` Chong Yidong
@ 2006-09-26 19:20     ` Leo
  0 siblings, 0 replies; 7+ messages in thread
From: Leo @ 2006-09-26 19:20 UTC (permalink / raw)
  Cc: ding

On Tue, 09/26/2006 19:08 +0100, Chong Yidong wrote:

> Leo <sdl.web@gmail.com> writes:
>
>> The ChangeLog says it's fixed. But I can't see the actually
>> fix. gnus-demon.el has not been changed for 7 month.
>
> Hmm, I could have sworn I checked it in; oh well. I really did check
> it in this time.

Thanks.

I can see the change now.

-- 
Leo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus makes emacs lose response
@ 2006-04-06 20:41 Dave Love
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Love @ 2006-04-06 20:41 UTC (permalink / raw)
  Cc: Richard Stallman, ding, Leon

Reiner Steib <reinersteib+gmane@imap.cc> writes:

> Leon, the OP, wrote that it's not fixed for him yet.  But he uses the
> unicode branch (Emacs/23.0) which might not contain Kim's patch yet.

[That sounds courageous.]  Anyhow, I'm glad if it's eventually been
fixed.  I'm surprised it doesn't appear to bite more people.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus makes emacs lose response
  2006-04-06 15:37   ` Richard Stallman
@ 2006-04-06 16:43     ` Reiner Steib
  0 siblings, 0 replies; 7+ messages in thread
From: Reiner Steib @ 2006-04-06 16:43 UTC (permalink / raw)
  Cc: Dave Love, ding, Leon, Kim F. Storm

On Thu, Apr 06 2006, Richard Stallman wrote:

>     This is a longstanding problem with background processes.  I sent a
>     test case maybe two years ago, but as far as I know it never got fixed
>     and I couldn't follow the process code to fix it confidently.
>
> Can you still reproduce this problem?  If so, could you send a test case
> (perhaps the same one) again?

On emacs-devel, Kim F. Storm wrote:

| I installed a fix to the CVS trunk (22.x) on 2006-03-22 that may have
| fixed this problem (it corrected an rather severe issue with the
| timeout of accept-process-output).

Leon, the OP, wrote that it's not fixed for him yet.  But he uses the
unicode branch (Emacs/23.0) which might not contain Kim's patch yet.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-09-26 19:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-23 18:18 gnus makes emacs lose response Chong Yidong
2006-09-23 23:42 ` Luc Teirlinck
2006-09-26 17:26 ` Leo
2006-09-26 18:08   ` Chong Yidong
2006-09-26 19:20     ` Leo
  -- strict thread matches above, loose matches on Subject: below --
2006-04-06 20:41 Dave Love
2006-03-29 23:02 [sdl.web@gmail.com: gnus makes emacs lose response] Richard Stallman
2006-04-05 18:30 ` Dave Love
2006-04-06 15:37   ` Richard Stallman
2006-04-06 16:43     ` gnus makes emacs lose response Reiner Steib

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).