unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* url-retrieve-synchronously infloops
@ 2005-04-18 12:27 Katsumi Yamaoka
  2005-04-18 13:21 ` Stefan Monnier
  2005-04-18 21:06 ` Richard Stallman
  0 siblings, 2 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2005-04-18 12:27 UTC (permalink / raw)


Hi,

For some time past, I noticed that `url-retrieve-synchronously'
sometimes gets into the infinite loop when retrieving the web
contents.  In that case, that function asynchronously calls
`url-http' by way of `url-retrieve' with the callback function
which should terminate the retrieval.  However, the callback
function is never called for certain urls.  For example, the
following form always gets hung up.

(url-insert-file-contents "http://feeds.feedburner.com/WikinewsLatestNews")

Actually, such forms are used by nnrss which is one of the Gnus
back ends, and several people reported a similar problem.
Although I couldn't find the cause from which the process
sentinel or the process filter that run the callback function
was not executed, I saw the process had finished and the web
contents had been retrieved into the buffer.  I'm not sure
whether it is concerned, but I'm normally behind the firewall
(i.e., the http proxy server).

I made the patch for the problem.  I appreciate someone looking
into it.

*** url.el~	Thu Jan 13 21:53:13 2005
--- url.el	Mon Apr 18 12:23:03 2005
***************
*** 185,194 ****
  	  ;; interrupt it before it got a chance to handle process input.
  	  ;; `sleep-for' was tried but it lead to other forms of
  	  ;; hanging.  --Stef
! 	  (unless (accept-process-output proc)
! 	    ;; accept-process-output returned nil, maybe because the process
! 	    ;; exited (and may have been replaced with another).
! 	    (setq proc (get-buffer-process asynch-buffer)))))
        asynch-buffer)))
  
  (defun url-mm-callback (&rest ignored)
--- 185,196 ----
  	  ;; interrupt it before it got a chance to handle process input.
  	  ;; `sleep-for' was tried but it lead to other forms of
  	  ;; hanging.  --Stef
! 	  (if (memq (process-status proc) '(open run))
! 	      (unless (accept-process-output proc)
! 		;; accept-process-output returned nil, maybe because the
! 		;; process exited (and may have been replaced with another).
! 		(setq proc (get-buffer-process asynch-buffer)))
! 	    (setq retrieval-done t))))
        asynch-buffer)))
  
  (defun url-mm-callback (&rest ignored)

Best regards,

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

* Re: url-retrieve-synchronously infloops
  2005-04-18 12:27 url-retrieve-synchronously infloops Katsumi Yamaoka
@ 2005-04-18 13:21 ` Stefan Monnier
  2005-04-18 15:23   ` Katsumi Yamaoka
  2005-04-18 21:06 ` Richard Stallman
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2005-04-18 13:21 UTC (permalink / raw)
  Cc: emacs-devel

> I made the patch for the problem.  I appreciate someone looking
> into it.

I've been using a very similar patch for a little while, with some added
debug statement, hoping to get to the bottom of this problem.
I haven't been able to get to the bottom of it, but the patch does seem to
successfully work around the problem.

So I've just installed my patch, which should work just as well as yours.
If you still see the problem, send a new bug report.

Thank you,


        Stefan

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

* Re: url-retrieve-synchronously infloops
  2005-04-18 13:21 ` Stefan Monnier
@ 2005-04-18 15:23   ` Katsumi Yamaoka
  0 siblings, 0 replies; 4+ messages in thread
From: Katsumi Yamaoka @ 2005-04-18 15:23 UTC (permalink / raw)
  Cc: emacs-devel

>>>>> In <87ekd85iyz.fsf-monnier+emacs@gnu.org> 
>>>>>	Stefan Monnier <monnier@iro.umontreal.ca> wrote:

>> I made the patch for the problem.  I appreciate someone looking
>> into it.

> I've been using a very similar patch for a little while, with some added
> debug statement, hoping to get to the bottom of this problem.
> I haven't been able to get to the bottom of it, but the patch does seem to
> successfully work around the problem.

> So I've just installed my patch, which should work just as well as yours.
> If you still see the problem, send a new bug report.

> Thank you,

Thanks!  I'll test it in the office tomorrow's morning (I'm now
home; I noticed I couldn't reproduce the problem when connecting
to the internet directly).

Regards,

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

* Re: url-retrieve-synchronously infloops
  2005-04-18 12:27 url-retrieve-synchronously infloops Katsumi Yamaoka
  2005-04-18 13:21 ` Stefan Monnier
@ 2005-04-18 21:06 ` Richard Stallman
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2005-04-18 21:06 UTC (permalink / raw)
  Cc: emacs-devel

We have no one maintaining the url package.
If this change seems logically correct to you,
please install it.

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

end of thread, other threads:[~2005-04-18 21:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 12:27 url-retrieve-synchronously infloops Katsumi Yamaoka
2005-04-18 13:21 ` Stefan Monnier
2005-04-18 15:23   ` Katsumi Yamaoka
2005-04-18 21:06 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).