Subject: Re: bug#27119: FTP doesn't time out on ftp.ciril.fr

From: [email-masked] (Ludovic Courtès)
Date: Thu, 01 Jun 2017 13:41:35 +0200

Hello Ian,

Ian Dunn <[email-masked]> skribis:

> Some of the perl links from cpan aren't up to date, so guix will try to cycle through its mirrors.  The problem is that the second one is ftp.ciril.fr, which doesn't time out (or if it does, not for at least 30 minutes).
>
> For example, here's the result of "guix build perl-datetime":
>
> Starting download of /gnu/store/mc2xj0cga6a25zv2f73hbm44y1kyxa5y-DateTime-1.18.tar.gz
>>From http://mirror.ibcp.fr/pub/CPAN/authors/id/D/DR/DROLSKY/DateTime-1.18.tar.gz...
> ERROR: download failed "http://mirror.ibcp.fr/pub/CPAN/authors/id/D/DR/DROLSKY/DateTime-1.18.tar.gz" 404 "Not Found"
>
> Starting download of /gnu/store/mc2xj0cga6a25zv2f73hbm44y1kyxa5y-DateTime-1.18.tar.gz
>>From ftp://ftp.ciril.fr/pub/cpan/authors/id/D/DR/DROLSKY/DateTime-1.18.tar.gz...
>
> And it hangs for longer than I've ever let it run (I think the longest
> I've seen it sit there is 30 minutes).

I’ve tried from a couple of networks as well as over Tor and I cannot
reproduce it.  Does it still happen for you?  (Specifically I used ‘guix
download’ or ‘wget’ with the URL above.)

> Is there a way to specify the timeout in guix?

The ‘ftp-open’ procedure in (guix ftp-client) does allow you to specify
a timeout when opening the connection.  In (guix build download), which
is what is used when running “guix build perl-datetime”, we specify a
default timeout of 10 seconds.  This timeout cannot be changed from the
‘guix’ command line though.

Thanks for your report,
Ludo’.