GNU bug report logs - #34607
url-retrieve-synchronously: TIMEOUT option value takes no effect

Previous Next

Package: emacs;

Reported by: Bad Blue Bull <ibmbull <at> yandex.ru>

Date: Thu, 21 Feb 2019 17:00:02 UTC

Severity: normal

Tags: confirmed, fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34607 in the body.
You can then email your comments to 34607 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34607; Package emacs. (Thu, 21 Feb 2019 17:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bad Blue Bull <ibmbull <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 21 Feb 2019 17:00:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bad Blue Bull <ibmbull <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: url-retrieve-synchronously: TIMEOUT option value takes no effect
Date: Thu, 21 Feb 2019 19:58:58 +0300
[Message part 1 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34607; Package emacs. (Fri, 22 Feb 2019 01:30:04 GMT) Full text and rfc822 format available.

Message #8 received at 34607 <at> debbugs.gnu.org (full text, mbox):

From: Bad Blue Bull <ibmbull <at> yandex.ru>
To: 34607 <at> debbugs.gnu.org
Subject: url-retrieve-synchronously: TIMEOUT option value takes no effect
Date: Fri, 22 Feb 2019 04:28:41 +0300
[Message part 1 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34607; Package emacs. (Fri, 22 Feb 2019 13:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 34607 <at> debbugs.gnu.org (full text, mbox):

From: Bad Blue Bull <ibmbull <at> yandex.ru>
To: 34607 <34607 <at> debbugs.gnu.org>
Date: Fri, 22 Feb 2019 15:59:18 +0300
[Message part 1 (text/html, inline)]

Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 15 May 2019 04:07:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34607; Package emacs. (Wed, 15 May 2019 04:09:02 GMT) Full text and rfc822 format available.

Message #16 received at 34607 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Bad Blue Bull <ibmbull <at> yandex.ru>
Cc: 34607 <34607 <at> debbugs.gnu.org>
Subject: Re: bug#34607: (no subject)
Date: Wed, 15 May 2019 06:08:47 +0200
Bad Blue Bull <ibmbull <at> yandex.ru> writes:

> sorry, elisp line intented intended to be
> (with-current-buffer (url-retrieve-synchronously "http://gnu.org" nil t 3) (kill-buffer))

This is surprisingly difficult to fix -- the reason being that URL
library is asynchronously following a redirect, and possibly opening a
new connection, and then marking that new connection with
`process-query-on-exit-flag'.  So depending on where you are in that
cycle, the buffer may have a query-enabled process when you try to kill
it.

Which sucks.

On timeouts, url-retrive-synchronously should abort the entire thing,
but url-retrieve (which is used in the background) doesn't really
support that...

Hm.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34607; Package emacs. (Wed, 15 May 2019 13:29:02 GMT) Full text and rfc822 format available.

Message #19 received at 34607 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Bad Blue Bull <ibmbull <at> yandex.ru>
Cc: 34607 <34607 <at> debbugs.gnu.org>
Subject: Re: bug#34607: (no subject)
Date: Wed, 15 May 2019 16:27:55 +0300
On 15.05.2019 7:08, Lars Ingebrigtsen wrote:
> On timeouts, url-retrive-synchronously should abort the entire thing,
> but url-retrieve (which is used in the background) doesn't really
> support that...

I think that's one of the reasons behind url-retrieve-synchronously's 
two delete-process calls. They don't exactly seem to work as intended, 
though.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34607; Package emacs. (Sun, 19 Jul 2020 20:43:02 GMT) Full text and rfc822 format available.

Message #22 received at 34607 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 34607 <34607 <at> debbugs.gnu.org>, Bad Blue Bull <ibmbull <at> yandex.ru>
Subject: Re: bug#34607: (no subject)
Date: Sun, 19 Jul 2020 22:42:34 +0200
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> On 15.05.2019 7:08, Lars Ingebrigtsen wrote:
>> On timeouts, url-retrive-synchronously should abort the entire thing,
>> but url-retrieve (which is used in the background) doesn't really
>> support that...
>
> I think that's one of the reasons behind url-retrieve-synchronously's
> two delete-process calls. They don't exactly seem to work as intended, 
> though.

Yeah, they don't trigger on timeouts, apparently.

I've now added some more process deletions, which fixes this use case:

(with-current-buffer (url-retrieve-synchronously "http://gnu.org" nil t  0.1)
  (kill-buffer))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 19 Jul 2020 20:43:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 34607 <at> debbugs.gnu.org and Bad Blue Bull <ibmbull <at> yandex.ru> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 19 Jul 2020 20:43:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34607; Package emacs. (Sun, 19 Jul 2020 21:06:01 GMT) Full text and rfc822 format available.

Message #29 received at 34607 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 34607 <34607 <at> debbugs.gnu.org>, Bad Blue Bull <ibmbull <at> yandex.ru>
Subject: Re: bug#34607: (no subject)
Date: Mon, 20 Jul 2020 00:05:01 +0300
On 19.07.2020 23:42, Lars Ingebrigtsen wrote:
> Yeah, they don't trigger on timeouts, apparently.

Thanks!

> I've now added some more process deletions, which fixes this use case:
> 
> (with-current-buffer (url-retrieve-synchronously"http://gnu.org"  nil t  0.1)
>    (kill-buffer))

That's a neat little way to reproduce the problem. Might be worth it to 
add a test like this.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34607; Package emacs. (Sun, 19 Jul 2020 21:27:01 GMT) Full text and rfc822 format available.

Message #32 received at 34607 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 34607 <34607 <at> debbugs.gnu.org>, Bad Blue Bull <ibmbull <at> yandex.ru>
Subject: Re: bug#34607: (no subject)
Date: Sun, 19 Jul 2020 23:26:00 +0200
Dmitry Gutov <dgutov <at> yandex.ru> writes:

>> I've now added some more process deletions, which fixes this use case:
>> (with-current-buffer (url-retrieve-synchronously"http://gnu.org"
>> nil t  0.1)
>>    (kill-buffer))
>
> That's a neat little way to reproduce the problem. Might be worth it
> to add a test like this.

For a non-automatic test?  I don't think we want to hit that web site
during the normal tests.  :-)

But it's brittle in any case -- it's a good test site now because it
uses a redirect, but that may not be the case in the future, so I don't
know how useful it is as a test in the long term...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Aug 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 253 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.