From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Greg Hogan" <code@greghogan.com>,
62334@debbugs.gnu.org, "Ludovic Courtès" <ludo@gnu.org>
Cc: Josselin Poiret <dev@jpoiret.xyz>,
Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: bug#62334: Network is unreachable only for recursive pypi import
Date: Thu, 27 Apr 2023 15:32:24 +0200 [thread overview]
Message-ID: <874jp1cuxj.fsf@gmail.com> (raw)
In-Reply-To: <86ildkb174.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 113 bytes --]
Hi,
On mar., 25 avril 2023 at 14:23, Simon Tournier <zimon.toutoune@gmail.com> wrote:
> Using the diff below,
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: p.patch --]
[-- Type: text/x-diff, Size: 1534 bytes --]
diff --git a/guix/build/download.scm b/guix/build/download.scm
index db0a39084b..2eee984b31 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -409,18 +409,24 @@ (define addresses
(socket (addrinfo:fam ai) SOCK_STREAM IPPROTO_IP))))
(catch 'system-error
(lambda ()
- (connect* s (addrinfo:addr ai) timeout)
-
+ (pk 'uri (uri->string uri))
+ (pk 'before s (addrinfo:addr ai) timeout)
+ (pk 'connect* (connect* s (addrinfo:addr ai) timeout))
+ (pk 'done)
;; Buffer input and output on this port.
(setvbuf s 'block)
;; If we're using a proxy, make a note of that.
(when http-proxy (set-http-proxy-port?! s #t))
s)
(lambda args
+ (pk 'failed s)
;; Connection failed, so try one of the other addresses.
(close s)
+ (pk 'closed)
(if (null? (cdr addresses))
- (apply throw args)
+ (begin
+ (pk 'boum)
+ (apply throw args))
(loop (cdr addresses))))))))
(define (setup-http-tunnel port uri)
@@ -465,6 +471,7 @@ (define https-proxy (let ((proxy (getenv "https_proxy")))
(parameterize ((current-http-proxy https-proxy))
(thunk))
(thunk)))))))
+
(with-https-proxy
(let ((s (open-socket-for-uri uri #:timeout timeout)))
;; Buffer input and output on this port.
[-- Attachment #3: Type: text/plain, Size: 3469 bytes --]
> for some mysterious reasons, ’connect*’ throws the
> error:
>
> --8<---------------cut here---------------start------------->8---
> $ ./pre-inst-env guix import pypi -r cdlib
> [...]
> Starting download of /tmp/guix-file.Ujg3KY
> From https://files.pythonhosted.org/packages/49/01/21337857631a97ab551bb2e3b5691ed6b1b9586011aa6a5355b9694a37fa/demon-2.0.6.tar.gz...
>
> ;;; (uri "https://files.pythonhosted.org/packages/49/01/21337857631a97ab551bb2e3b5691ed6b1b9586011aa6a5355b9694a37fa/demon-2.0.6.tar.gz")
>
> ;;; (before #<input-output: socket 14> #(2 2454407487 443) 10)
>
> ;;; (failed #<input-output: socket 14>)
>
> ;;; (closed)
>
> ;;; (uri "https://files.pythonhosted.org/packages/49/01/21337857631a97ab551bb2e3b5691ed6b1b9586011aa6a5355b9694a37fa/demon-2.0.6.tar.gz")
>
> ;;; (before #<input-output: socket 14> #(10 55849932267565577100763269369304187673 443 0 0) 10)
>
> ;;; (failed #<input-output: socket 14>)
>
> ;;; (closed)
>
> ;;; (boum)
> In procedure connect: Network is unreachable
> --8<---------------cut here---------------end--------------->8---
>
> and note it is an issue on our side:
>
> --8<---------------cut here---------------start------------->8---
> $ ./pre-inst-env guix import pypi -r demon
> ;;; (uri "https://pypi.org/pypi/demon/json")
>
> ;;; (before #<input-output: socket 13> #(2 2539978975 443) #f)
>
> ;;; (connect* #t)
>
> ;;; (done)
>
> Starting download of /tmp/guix-file.G5r627
> From https://files.pythonhosted.org/packages/49/01/21337857631a97ab551bb2e3b5691ed6b1b9586011aa6a5355b9694a37fa/demon-2.0.6.tar.gz...
>
> ;;; (uri "https://files.pythonhosted.org/packages/49/01/21337857631a97ab551bb2e3b5691ed6b1b9586011aa6a5355b9694a37fa/demon-2.0.6.tar.gz")
>
> ;;; (before #<input-output: socket 14> #(2 2454407487 443) 10)
>
> ;;; (connect* #<unspecified>)
>
> ;;; (done)
> ….6.tar.gz 7KiB 4.2MiB/s 00:00 ▕██████████████████▏ 100.0%
>
> Starting download of /tmp/guix-file.4L0Phu
> From https://files.pythonhosted.org/packages/96/85/5f9146e3f8d7324d8741cd3bea9b99926d5ee75571b9610c661b1bbd06f5/demon-2.0.6-py3-none-any.whl...
>
> ;;; (uri "https://files.pythonhosted.org/packages/96/85/5f9146e3f8d7324d8741cd3bea9b99926d5ee75571b9610c661b1bbd06f5/demon-2.0.6-py3-none-any.whl")
>
> ;;; (before #<input-output: socket 15> #(2 2454407487 443) 10)
>
> ;;; (connect* #<unspecified>)
>
> ;;; (done)
> …3-none-any.whl 7KiB 5.5MiB/s 00:00 ▕██████████████████▏ 100.0%
> (define-public python-demon
> (package
> (name "python-demon")
> (version "2.0.6")
> (source (origin
> (method url-fetch)
> (uri (pypi-uri "demon" version))
> (sha256
> (base32
> "0nd370yjfb3jirmxd0wa03c75dl7jac4xfsq1rvp5483mxddirb0"))))
> (build-system python-build-system)
> (propagated-inputs (list python-networkx python-tqdm))
> (home-page "https://github.com/GiulioRossetti/DEMON")
> (synopsis "Community Discovery algorithm")
> (description "Community Discovery algorithm")
> (license license:bsd-2)))
> --8<---------------cut here---------------end--------------->8---
>
>
> Maybe, it is a regression from some recent updates of Guile?
Anyone else is able to reproduce the same error?
Cheers,
simon
next prev parent reply other threads:[~2023-04-27 16:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-21 14:17 bug#62334: Network is unreachable only for recursive pypi import Greg Hogan
2023-03-21 21:45 ` Josselin Poiret via Bug reports for GNU Guix
2023-03-24 12:19 ` Maxim Cournoyer
2023-04-24 8:42 ` zimoun
2023-03-28 20:37 ` bug#62334: Network Travis Zimmerman
2023-04-25 12:23 ` bug#62334: Network is unreachable only for recursive pypi import Simon Tournier
2023-04-27 13:32 ` Simon Tournier [this message]
2023-05-02 21:47 ` bug#62334: bug#63024: Crash during `guix import pypi -r' Ludovic Courtès
2023-05-02 21:48 ` Ludovic Courtès
2023-05-03 9:04 ` bug#62334: " Ludovic Courtès
2023-05-03 10:08 ` bug#63024: " Simon Tournier
2023-05-04 11:10 ` Ludovic Courtès
2023-05-05 13:39 ` bug#62334: [PATCH 1/3] Add error handling for spawn's posix_spawn_file_actions_adddup2 Josselin Poiret via Bug reports for GNU Guix
2023-05-08 14:08 ` bug#63024: Guile's "sleep pipe" can leak into processes created by 'spawn' Ludovic Courtès
2023-05-05 13:39 ` bug#63024: [PATCH 2/3] Use /dev/null in piped-process if port is not backed by a fdes Josselin Poiret via Bug reports for GNU Guix
2023-05-05 13:39 ` bug#62334: [PATCH 3/3] tests: Test that system* works if stdin/out/err isn't backed by fdes Josselin Poiret via Bug reports for GNU Guix
2023-05-04 11:13 ` bug#63024: Crash during `guix import pypi -r' Ludovic Courtès
2023-05-05 8:54 ` bug#57391: " Ludovic Courtès
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jp1cuxj.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=62334@debbugs.gnu.org \
--cc=code@greghogan.com \
--cc=dev@jpoiret.xyz \
--cc=ludo@gnu.org \
--cc=maxim.cournoyer@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.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).