Guile's "sleep pipe" can leak into processes created by 'spawn'

  • Open
  • quality assurance status badge
Details
4 participants
  • Jack Hill
  • Ludovic Courtès
  • Stephen Paul Weber
  • Simon Tournier
Owner
unassigned
Submitted by
Stephen Paul Weber
Severity
important
Merged with
S
S
Stephen Paul Weber wrote on 11 Apr 2023 03:53
Python importer gets confused about network access
(address . bug-guix@gnu.org)
ZDS9lFdN1tPny/nV@singpolyma-beefy.lan
Trying `guix import pypi -r gruut` I get:

Starting download of /tmp/guix-file.hITnlA
In procedure connect: Network is unreachable

But doing `guix import pypi -r num2words` works fine.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEWeaCw+rzmiEMpzU00RwpEc5RnN4FAmQ0vY8ACgkQ0RwpEc5R
nN5qbA//YbXvxWChVc4pDS2PahIVWVHgl4iVp6OMpXSxYGmZTVfDaHGlyXMr7HWX
yCoPWjhXgv02PtTRdlRkFNqKPmhZV018fVOND0P2uvgWjfe1XM2IzmNNIEHen5ec
wBMAUuogkmpfO8c6FDqGlSQZ5P6Ybsbhz+EGQ4m+cuA973BuQ1UGntWmEeJJ/f7d
OVbXzUS0vxPGxYYpnVgfTlNHhSNUnYvuEXZm0id0AquajzrLBLNA1W3DOnaKeLiQ
qfUUlMuKyXKsLiVGCAmDQaPWYzmb0+7LIVjVcK7KwPmhjQHVZmMqYRT/uzl7nQZ4
vejT2/PZU5hBdNoP5WEuRT/ou2j2V09jl/a4daRaYQkp7rBTmD7FVd4fWKRjDKTD
s7IC/XJAePqolD3y+eVZ7N+PquVTzHs/2H7ihQ8uS+JeZcTdgQPIvwurnVAcTrPz
sURvSfsrzNBh76czwn0UIhONPQzpYpJsUAOi5ihNIyLaboDKNoyXkM0jTLKaAp0F
WZkvO+GstbgdLXG9Lsgq0APpFdzL5IqysT7dTyxQi+aqe74UBYX4RILTIFpZzogn
Fd8ZIEbSzB4HSjYNzkZRpDaqnTF7t7gnczejf9oZO11Nfn2Q+mT2W2fXdXOFvoU8
jgfDMOjILB8QiqR2G/XUKTB0yFeOgkQCaXTQEq7Zm6Iwn7MWqqg=
=Z02B
-----END PGP SIGNATURE-----


S
S
Simon Tournier wrote on 11 Apr 2023 10:12
86h6tm6dnt.fsf@gmail.com
Hi,

I cannot reproduce.

On Mon, 10 Apr 2023 at 20:53, Stephen Paul Weber <singpolyma@singpolyma.net> wrote:

Toggle quote (6 lines)
> Starting download of /tmp/guix-file.hITnlA
> From https://files.pythonhosted.org/packages/74/67/3008e4f0b97d9a5701c8ef3bf95f1941c5b0a620c8f88f32e849117f8dc0/num2words-0.5.12.tar.gz...
> In procedure connect: Network is unreachable
>
> But doing `guix import pypi -r num2words` works fine.

Is it systematic? Or transient? Or on your side?


Cheers,
simon
S
S
Stephen Paul Weber wrote on 11 Apr 2023 16:32
(name . Simon Tournier)(address . zimon.toutoune@gmail.com)(address . 62765@debbugs.gnu.org)
ZDVvg+5ocMvg/Z/D@singpolyma-beefy.lan
Toggle quote (2 lines)
>I cannot reproduce.

Does the import work when you run it?
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEWeaCw+rzmiEMpzU00RwpEc5RnN4FAmQ1b38ACgkQ0RwpEc5R
nN4HLQ//byY7ShqNGNbmm/8IqMDnAp+H9lWvzpBqjPsAJ1EUUqUsHJ637dy7danW
X2wmy1Vi/cBGG5sopWTZxwU1bv8+VsMPCg+klviUswc4w66HdSZvkjanQSoGykdz
QoM3ex6EncvICa331o/AGMBWUWerka0LIIMgT5tAFy54rkIMaPWkNktF2i7bTjEv
pBAeZy/0WSDlW9sgS8m/S3V0CZo2naP2RzETDl6uIVq+TRfd0Oor98ujVC+wkL5k
1Dc7qPYSpqcxQ7OPzqkaVuf0U4P9HUIraNZjimkEr8J25z9AeEsitjmbgAWzb9Bl
WprXlIoOuMHHvvFfbOnyZHvnF2cObeiqRFCdxp70lO7hj+D7cWOXgD6C6fqef6H3
vfe2khEWP4iF6oN84goGImV9MzBucGXI3wxih2Vd9XAV/7Mwzqsp1bJHOxlXI96v
1A6eJLnKxANFJK3mrHcT0dro38iZKLpjKquBqHhuXtu6HrfgfyVMmmFhRH2JFbpG
4FSFCOC+zxWhA6ip2Bb+59rcMfya3T5h47FbQCB/hHrfETOEtJ2KknuiQAxjiIuN
fH799erZp/s/vOLA5F2SmA7dGNR4BEyhyrUSj2MnYAnJke/Ko9RM30+N2CoVWEmV
QN53BlGY/1dxm4kCP8AGdgf+CR7v+x4OLaGNeF5C8ZZyIywUaPU=
=/e7s
-----END PGP SIGNATURE-----


J
J
Jack Hill wrote on 11 Apr 2023 16:50
(name . Stephen Paul Weber)(address . singpolyma@singpolyma.net)
alpine.DEB.2.21.2304111049580.15296@marsh.hcoop.net
On Tue, 11 Apr 2023, Stephen Paul Weber wrote:

Toggle quote (4 lines)
>> I cannot reproduce.
>
> Does the import work when you run it?

Works for me (guix c1262edba9118af6507dc47ce6ad61ffdec02384):

```
$ guix import pypi -r gruut

Starting download of /tmp/guix-file.glzbrJ
….4.tar.gz 72KiB 1.1MiB/s 00:00 ???????????????????? 100.0%

Starting download of /tmp/guix-file.IZKz4B
….13.0.tar.gz 99KiB 2.0MiB/s 00:00 ???????????????????? 100.0%

Starting download of /tmp/guix-file.EVbIBD
…-2.0.0.tar.gz 14.5MiB 4.4MiB/s 00:03 ???????????????????? 100.0%
guix import: warning: Cannot guess requirements from source archive: no requires.txt file found.

Starting download of /tmp/guix-file.vlMVNT
….1.0.tar.gz 8KiB 5.6MiB/s 00:00 ???????????????????? 100.0%

Starting download of /tmp/guix-file.jDheDU
…py3-none-any.whl 8KiB 3.0MiB/s 00:00 ???????????????????? 100.0%
guix import: warning: Failed to extract file: jsonlines-3.1.0.dist-info/METADATA from wheel.

Starting download of /tmp/guix-file.EPOrXf
….5.12.tar.gz 280KiB 3.3MiB/s 00:00 ???????????????????? 100.0%

Starting download of /tmp/guix-file.tOdRgu
…-py3-none-any.whl 122KiB 2.1MiB/s 00:00 ???????????????????? 100.0%
guix import: warning: Failed to extract file: num2words-0.5.12.dist-info/METADATA from wheel.

Starting download of /tmp/guix-file.sgNV9f
…e-0.9.9.tar.gz 430KiB 3.0MiB/s 00:00 ???????????????????? 100.0%

Starting download of /tmp/guix-file.ihTx8n
…cp310-macosx_10_9_x86_64.whl 180KiB 2.9MiB/s 00:00 ???????????????????? 100.0%
guix import: warning: Failed to extract file: python_crfsuite-0.9.9.dist-info/METADATA from wheel.
guix import: warning: Cannot guess requirements from source archive: no requires.txt file found.
(define-public python-crfsuite
(package
(name "python-crfsuite")
(version "0.9.9")
(source (origin
(method url-fetch)
(uri (pypi-uri "python-crfsuite" version))
(sha256
(base32
"0vd7ndi9q4hc336bbgg3ccln4l7xskxzrdw6z5b6fijmd4fjd9na"))))
(build-system python-build-system)
(synopsis "Python binding for CRFsuite")
(description "Python binding for CRFsuite")
(license license:expat)))

(define-public python-num2words
(package
(name "python-num2words")
(version "0.5.12")
(source (origin
(method url-fetch)
(uri (pypi-uri "num2words" version))
(sha256
(base32
"120938q7h6syn16ybf0pmcxz0fqbm4f2plyr3lxal184107hnz3y"))))
(build-system python-build-system)
(propagated-inputs (list python-docopt))
(synopsis "Modules to convert numbers to words. Easily extensible.")
(description "Modules to convert numbers to words. Easily extensible.")
(license #f)))

(define-public python-jsonlines
(package
(name "python-jsonlines")
(version "3.1.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "jsonlines" version))
(sha256
(base32
"0zy3llabmxsq559s73x1c84xlch3dcz9wql1xfq1by4nim4cny95"))))
(build-system python-build-system)
(propagated-inputs (list python-attrs))
(synopsis "Library with helpers for the jsonlines file format")
(description "Library with helpers for the jsonlines file format")
(license license:bsd-3)))

(define-public python-gruut-lang-en
(package
(name "python-gruut-lang-en")
(version "2.0.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "gruut_lang_en" version))
(sha256
(base32
"0lhy2z6y98djmg229jzd3ylay3jwg1s3js20l1zais7bvnvg63w9"))))
(build-system python-build-system)
(synopsis "English language files for gruut tokenizer/phonemizer")
(description "English language files for gruut tokenizer/phonemizer")
(license #f)))

(define-public python-gruut-ipa
(package
(name "python-gruut-ipa")
(version "0.13.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "gruut-ipa" version))
(sha256
(base32
"0vn6pvqm3aqijynnnbyc0wv165s3ylvfbm6k2jmikqa6kywnwxvi"))))
(build-system python-build-system)
(synopsis
"Library for manipulating pronunciations using the International Phonetic Alphabet (IPA)")
(description
"Library for manipulating pronunciations using the International Phonetic
Alphabet (IPA)")
(license #f)))

(define-public python-gruut
(package
(name "python-gruut")
(version "2.3.4")
(source (origin
(method url-fetch)
(uri (pypi-uri "gruut" version))
(sha256
(base32
"1mqvvpaxwp42zink9h1nj0zjr9rs589rhghfrdhspxp4d3xdc43p"))))
(build-system python-build-system)
(propagated-inputs (list python-babel
python-crfsuite
python-dateparser
python-gruut-ipa
python-gruut-lang-en
python-jsonlines
python-networkx
python-num2words
python-numpy))
(synopsis
"A tokenizer, text cleaner, and phonemizer for many human languages.")
(description
"This package provides a tokenizer, text cleaner, and phonemizer for many human
languages.")
(license #f)))
```
S
S
Simon Tournier wrote on 11 Apr 2023 17:07
(name . Stephen Paul Weber)(address . singpolyma@singpolyma.net)(address . 62765@debbugs.gnu.org)
87ile2ihj4.fsf@gmail.com
Hi,

On mar., 11 avril 2023 at 09:32, Stephen Paul Weber <singpolyma@singpolyma.net> wrote:
Toggle quote (4 lines)
>>I cannot reproduce.
>
> Does the import work when you run it?

Yes and no. :-)

It depends the Guix revision. Using a revision from January as 29efa27,
it works. But using 86d580c from April, it fails with:

Toggle snippet (5 lines)
Starting download of /tmp/guix-file.cB9cmQ
From https://files.pythonhosted.org/packages/74/67/3008e4f0b97d9a5701c8ef3bf95f1941c5b0a620c8f88f32e849117f8dc0/num2words-0.5.12.tar.gz...
In procedure connect: Network is unreachable

which passes with 29efa27. And indeed, using 86d580c, “guix import pypi
num2words -r” passes without any error, downloading from the exact same
URL. Hum?!

Well, I do not know which change impacts this regression.


Cheers,
simon


Toggle snippet (60 lines)
$ guix import pypi -r gruut

Starting download of /tmp/guix-file.Vlu2YX
From https://files.pythonhosted.org/packages/4c/74/40e0bff02cf4daa3908c440e2111b20490c82080259f0114d0cfe07ce126/gruut-2.3.4.tar.gz...
….4.tar.gz 72KiB 7.4MiB/s 00:00 ???????????????????? 100.0%

Starting download of /tmp/guix-file.Fq9iuS
From https://files.pythonhosted.org/packages/51/9f/7eff478e38913cc9930527ff40c9ebcb04744dfcd0ddd43bd5a1eb9565b7/gruut-ipa-0.13.0.tar.gz...
….13.0.tar.gz 99KiB 8.7MiB/s 00:00 ???????????????????? 100.0%

Starting download of /tmp/guix-file.GgsRw5
From https://files.pythonhosted.org/packages/76/c5/9dcb07bb44c7c66f89bdfb554d433c071ef7fed38d39d164716901db12b1/gruut_lang_en-2.0.0.tar.gz...
…-2.0.0.tar.gz 14.5MiB 41.7MiB/s 00:00 ???????????????????? 100.0%
guix import: warning: Cannot guess requirements from source archive: no requires.txt file found.

Starting download of /tmp/guix-file.vXTdBs
From https://files.pythonhosted.org/packages/2a/c8/efdb87403dae07cf20faf75449eae41898b71d6a8d4ebaf9c80d5be215f5/jsonlines-3.1.0.tar.gz...
….1.0.tar.gz 8KiB 9.3MiB/s 00:00 ???????????????????? 100.0%

Starting download of /tmp/guix-file.qTFTjC
From https://files.pythonhosted.org/packages/68/32/290ca20eb3a2b97ffa6ba1791fcafacb3cd2f41f539c96eb54cfc3cfcf47/jsonlines-3.1.0-py3-none-any.whl...
…py3-none-any.whl 8KiB 10.2MiB/s 00:00 ???????????????????? 100.0%

Starting download of /tmp/guix-file.cB9cmQ
From https://files.pythonhosted.org/packages/74/67/3008e4f0b97d9a5701c8ef3bf95f1941c5b0a620c8f88f32e849117f8dc0/num2words-0.5.12.tar.gz...
In procedure connect: Network is unreachable

Starting download of /tmp/guix-file.cB9cmQ
From https://web.archive.org/web/20230411165120/https://files.pythonhosted.org/packages/74/67/3008e4f0b97d9a5701c8ef3bf95f1941c5b0a620c8f88f32e849117f8dc0/num2words-0.5.12.tar.gz...
In procedure connect*: Connection timed out
Trying to use Disarchive to assemble /tmp/guix-file.cB9cmQ...
could not find its Disarchive specification
failed to download "/tmp/guix-file.cB9cmQ" from "https://files.pythonhosted.org/packages/74/67/3008e4f0b97d9a5701c8ef3bf95f1941c5b0a620c8f88f32e849117f8dc0/num2words-0.5.12.tar.gz"
Backtrace:
13 (primitive-load "/home/simon/.config/guix/current/bin/guix")
In guix/ui.scm:
2300:7 12 (run-guix . _)
2263:10 11 (run-guix-command _ . _)
In guix/scripts/import.scm:
89:11 10 (guix-import . _)
In ice-9/boot-9.scm:
1752:10 9 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/scripts/import/pypi.scm:
97:21 8 (_)
In guix/import/utils.scm:
638:3 7 (recursive-import _ #:repo->guix-package _ #:guix-name _ #:version _ . _)
600:31 6 (topological-sort _ #<procedure 7f444ff63a80 at guix/import/utils.scm:639:21 (node)> #<procedure 7f44557e8b00 at guix/import/utils.scm:645:21 (node)>)
In srfi/srfi-1.scm:
586:29 5 (map1 _)
586:29 4 (map1 (("gruut_lang_en" #f) ("jsonlines" #f) ("num2words" #f) ("python-crfsuite" #f)))
586:29 3 (map1 (("jsonlines" #f) ("num2words" #f) ("python-crfsuite" #f)))
586:17 2 (map1 (("num2words" #f) ("python-crfsuite" #f)))
In guix/import/utils.scm:
630:33 1 (lookup-node "num2words" #f)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Wrong number of values returned to continuation (expected 2)
Z
Z
zimoun wrote on 24 Apr 2023 10:36
control message for bug #62765
(address . control@debbugs.gnu.org)
865y9lwubt.fsf@gmail.com
merge 62765 62334
quit
L
L
Ludovic Courtès wrote on 2 May 2023 23:49
control message for bug #63024
(address . control@debbugs.gnu.org)
87a5ym5rq4.fsf@gnu.org
severity 63024 important
quit
L
L
Ludovic Courtès wrote on 2 May 2023 23:50
(address . control@debbugs.gnu.org)
878re65row.fsf@gnu.org
retitle 63024 Guile's "sleep pipe" can leak into processes created by 'spawn'
quit
?