unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51983: guix build: error: integer expected from stream
@ 2021-11-19 20:47 Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2021-11-19 21:03 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2021-11-24 19:52 ` Maxim Cournoyer
  0 siblings, 2 replies; 4+ messages in thread
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2021-11-19 20:47 UTC (permalink / raw)
  To: 51983

[-- Attachment #1: Type: text/plain, Size: 6452 bytes --]

Guix,

I saw this reported by jlicht on #guix but I'm pretty sure that 
it's been reported a few times.

Here's the error, with channel:

(channel
  (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git")
  (branch "core-updates-frozen")
  (introduction
    (make-channel-introduction
     "9edb3f66fd807b096b48283debdcddccfea34bad"
     (openpgp-fingerprint
      "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"))))

And patch:

--8<---------------cut here---------------start------------->8---
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Fri, 19 Nov 2021 17:37:44 +0100
Subject: [PATCH] daemon: Print the line whence we expect an 
integer.

* nix/libstore/local-store.cc 
  (LocalStore::getLineFromSubstituter):
Include the malformed substituter stream line in the error 
message.

---
 nix/libstore/local-store.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nix/libstore/local-store.cc 
b/nix/libstore/local-store.cc
index 675d1ba66f..83b6681122 100644
--- a/nix/libstore/local-store.cc
+++ b/nix/libstore/local-store.cc
@@ -839,7 +839,8 @@ template<class T> T 
LocalStore::getIntLineFromSubstituter(Agent & run)
 {
     string s = getLineFromSubstituter(run);
     T res;
-    if (!string2Int(s, res)) throw Error("integer expected from 
     stream");
+    if (!string2Int(s, res))
+        throw Error(format("integer expected from stream: %1%") % 
s);
     return res;
 }
 
-- 
2.34.0
--8<---------------cut here---------------end--------------->8---

(…which I'd like to merge if there are no objections…)

--8<---------------cut here---------------start------------->8---
λ guix time-machine -C ~/channels.scm -- build texlive 
--substitute-urls="https://guix.tobias.gr 
https://bordeaux.guix.gnu.org https://ci.guix.gnu.org"
[…]
substitute: updating substitutes from 
'https://guix.tobias.gr'... 100.0%
substitute: updating substitutes from 
'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 
'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 
'https://substitutes.nonguix.org'... 100.0%
substitute: updating substitutes from 
'https://mirror.brielmaier.net'... 100.0%
The following derivations will be built:
   /gnu/store/i32vy0dhw00y59ajpfbzb66z7g5x5bmh-texlive-texmf-20210325.drv
   /gnu/store/z5r60zy9vmydf44fdyyc7hgc6q93aahm-texlive-20210325-texmf.tar.xz.drv
100.5 MB will be downloaded:
   /gnu/store/0brdikxqk59hdr47qabcm3sya001d8vf-glibc-utf8-locales-2.33
   /gnu/store/910a1558wknjm4687681kr0w2invish4-tcsh-6.22.03
   /gnu/store/jazwfsj2v41yih2yzw5nydqgdz1hgfm4-file-5.39
   /gnu/store/2ank6pw2lrybx24zyifkrc3bkxj8jpf4-lua-5.3.5
   /gnu/store/0777brz2w8k5s4g53yfh34fyxp5r08sq-module-import-compiled
   /gnu/store/l8kxrs01lll3pzjrd590p45l8k045q6q-make-4.3
   /gnu/store/l8l2y2dlya5rs9hfypmcb4saay7iwn0q-findutils-4.8.0
   /gnu/store/6mag7gwl47gh7h2lp5byvxxw80x2zi72-ed-1.17
   /gnu/store/m96snvbl92ivkd32giqh5f3d21bc2n5x-patch-2.7.6
   /gnu/store/s49sxmz9g4xmzz222cay9k04ziy3qgmj-diffutils-3.8
   /gnu/store/0v470agxfi4px58491h9932vwliljacr-teckit-2.5.10
   /gnu/store/nafmw4krl0q6c1agaz55vz6ls35inw29-zziplib-0.13.72
   /gnu/store/dswp2mfwb56xg57903cvhwcjj1fpdhqi-harfbuzz-2.8.2
   /gnu/store/fl8vfhmwkg7k1d8qr9apwq5yb0iqa9k5-libpaper-1.1.24
   /gnu/store/vbgd375j8p1iprljsizfwkfq56hi6mwi-jbig2dec-0.19
   /gnu/store/1d1xbgmdqdsz5pzcmpky3mbgzhxgx7jl-libtiff-4.3.0
   /gnu/store/1gn0gbzgqgj8x2vczfr2kgjkw1mlnz14-font-ghostscript-8.11
   /gnu/store/hgi1jja24hsj9yjmr6zrpazhgy42v94f-ghostscript-9.54.0
   /gnu/store/ic0ria97lvn16kg6jipzqq763rksvmhq-coreutils-minimal-8.32
   /gnu/store/k18as85v9s0z66w40wg9sym4c5qz03l2-perl-5.34.0
   /gnu/store/vhxayydx3y9n2gi2sc0dam26p7k1aaj8-libjpeg-turbo-2.0.5
   /gnu/store/8wzdcc46j1brwgw2kvk5878f887msz6m-gd-2.3.2
   /gnu/store/4inr1zm5334vz2p2shznc4iw1478bqan-libxaw-1.0.14
   /gnu/store/x64cjzj368falclljlmy72lh5qdk5fdp-mpfr-4.1.0
   /gnu/store/izcn0nn61pqf5p0j8073vrq8wyzrmkr4-graphite2-1.3.13
   /gnu/store/3nxgh1pmqg44f0ccg16ny4fs81mmafvq-pixman-0.40.0
   /gnu/store/53qn4zlhvsmn11lx5s15dqxsnjy59xfc-libxrender-0.9.10
   /gnu/store/5ybvb5jxlbfa93znylyy1f68h11l9qla-libelf-0.8.13
   /gnu/store/yqsj0ncmzxp4llcj74sj23wl11x3vigw-glib-2.70.0-bin
   /gnu/store/qqs98rxwjrji6aaf6dqwp7q4m545g2sn-glib-2.70.0
   /gnu/store/2431gxx661891b15zcn5sf14616bh287-cairo-1.16.0
   /gnu/store/7cddr79rydhc1m4hxr921mq17pz1jj3z-sed-4.8
   /gnu/store/35n3whmk8il5k9mv4i94g3hhq0x5v0iv-config-0.0.0-1.c8ddc84
   /gnu/store/72kpdqplq4nc87fm7ch47kxy3nlkzsyx-xz-5.2.5
   /gnu/store/p5fgysbcnnp8b1d91mrvjvababmczga0-python-3.9.6
   /gnu/store/m24fb3ig1wn7yfixp2cvsvik41fv325m-libxmu-1.1.3
   /gnu/store/7sik9fp2ffvnr7l01s423x4r5pn75rf9-icu4c-69.1
   /gnu/store/45xjw0k3mzpjkxhfhfganl0p8xnqgjq4-libxext-1.3.4
   /gnu/store/i67d4yi1zclniycczhi63z4cp42jmqra-libxt-1.2.1
   /gnu/store/04ccqq2y4khq38jvianwy9mw6zlr1vf4-libsm-1.2.3
   /gnu/store/xb8ksrk21cslvh9pvm53q5qsrhz6613p-libice-1.0.10
   /gnu/store/368cv23ggbgl91bw90hyhkqx5dzq0988-libxpm-3.5.13
   /gnu/store/ch15pm3i78dvh66l8ds80ijf6kj850j8-libsigsegv-2.13
   /gnu/store/v45pjc1yqmy59j9ff913p3ywn9qk4lqx-gawk-5.1.0
   /gnu/store/25gv43v5rm05i26z39ajrd6nsxa5r461-coreutils-8.32
   /gnu/store/f5jcpy9s4cxzphi0khrqvxhrqnnn9azm-ruby-2.7.4
   /gnu/store/375858dr3cqbwry58xcgc0776205p0mf-freetype-2.10.4
   /gnu/store/brpl5kly3c64ah2y9v3fgbwl32641c0f-libpng-1.6.37
   /gnu/store/q6riv4m9d392dhxdw8jhrn5gsvbcamj9-font-dejavu-2.37
   /gnu/store/2fk1gz2s7ppdicynscra9b19byrrr866-glibc-2.33
   /gnu/store/3ywv7s8d38rgcq7ljmc1s084358a2m3h-glibc-2.33-static
   /gnu/store/w6zv2mz56wyxr471q38a3cmzm4iqimy8-bzip2-1.0.8
   /gnu/store/379xr5pkxprcamhlcbqz9nghj90qxw86-fontconfig-minimal-2.13.94
   /gnu/store/irzhgvy2zb6dd9g7a6b343pn4lvsn9n0-texlive-bin-20210325
   /gnu/store/35xph93135j3l3l856b2504j1hll53vr-texlive-20210325
substitute: updating substitutes from 
'https://guix.tobias.gr'... 100.0%
substitute: updating substitutes from 
'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 
'https://ci.guix.gnu.org'... 100.0%
guix build: error: integer expected from stream: 
18446744071924943736
--8<---------------cut here---------------end--------------->8---

So this sounds like integer xerflow, which agains rings a bell… 
but I don't remember well enough which one.

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* bug#51983: guix build: error: integer expected from stream
  2021-11-19 20:47 bug#51983: guix build: error: integer expected from stream Tobias Geerinckx-Rice via Bug reports for GNU Guix
@ 2021-11-19 21:03 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2021-11-24 23:24   ` Ludovic Courtès
  2021-11-24 19:52 ` Maxim Cournoyer
  1 sibling, 1 reply; 4+ messages in thread
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2021-11-19 21:03 UTC (permalink / raw)
  Cc: 51983

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

Tobias Geerinckx-Rice via Bug reports for GNU Guix 写道:
> substitute: updating substitutes from 
> 'https://ci.guix.gnu.org'... 100.0%
> guix build: error: integer expected from stream: 
> 18446744071924943736

And it is indeed specific to querying ci.guix.

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

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

* bug#51983: guix build: error: integer expected from stream
  2021-11-19 20:47 bug#51983: guix build: error: integer expected from stream Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2021-11-19 21:03 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
@ 2021-11-24 19:52 ` Maxim Cournoyer
  1 sibling, 0 replies; 4+ messages in thread
From: Maxim Cournoyer @ 2021-11-24 19:52 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 51983

Hello Tobias!

Tobias Geerinckx-Rice <me@tobias.gr> writes:

> Guix,
>
> I saw this reported by jlicht on #guix but I'm pretty sure that 
> it's been reported a few times.
>
> Here's the error, with channel:
>
> (channel
>   (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git")
>   (branch "core-updates-frozen")
>   (introduction
>     (make-channel-introduction
>      "9edb3f66fd807b096b48283debdcddccfea34bad"
>      (openpgp-fingerprint
>       "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"))))
>
> And patch:
>
> From: Tobias Geerinckx-Rice <me@tobias.gr>
> Date: Fri, 19 Nov 2021 17:37:44 +0100
> Subject: [PATCH] daemon: Print the line whence we expect an 
> integer.
>
> * nix/libstore/local-store.cc 
>   (LocalStore::getLineFromSubstituter):
> Include the malformed substituter stream line in the error 
> message.
>
> ---
>  nix/libstore/local-store.cc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/nix/libstore/local-store.cc 
> b/nix/libstore/local-store.cc
> index 675d1ba66f..83b6681122 100644
> --- a/nix/libstore/local-store.cc
> +++ b/nix/libstore/local-store.cc
> @@ -839,7 +839,8 @@ template<class T> T 
> LocalStore::getIntLineFromSubstituter(Agent & run)
>  {
>      string s = getLineFromSubstituter(run);
>      T res;
> -    if (!string2Int(s, res)) throw Error("integer expected from 
>      stream");
> +    if (!string2Int(s, res))
> +        throw Error(format("integer expected from stream: %1%") % 
> s);
>      return res;
>  }

I just stumbled on this.

LGTM!

Maxim




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

* bug#51983: guix build: error: integer expected from stream
  2021-11-19 21:03 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
@ 2021-11-24 23:24   ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2021-11-24 23:24 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 51983-done, 46212

Hi,

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> Tobias Geerinckx-Rice via Bug reports for GNU Guix 写道:
>> substitute: updating substitutes from
>> 'https://ci.guix.gnu.org'... 100.0%
>> guix build: error: integer expected from stream:
>> 18446744071924943736
>
> And it is indeed specific to querying ci.guix.

This reminds me of:

  https://issues.guix.gnu.org/46212

and indeed:

--8<---------------cut here---------------start------------->8---
$ guix build flightgear -n --no-grafts
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bayfront.guix.gnu.org'... 100.0%
guix build: error: integer expected from stream
$ guix describe
Generacio 195	Nov 22 2021 00:37:58	(nuna)
  guix 24aa7b3
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 24aa7b3c21309b63cc6e8e18d6417d2cddccf6c6
--8<---------------cut here---------------end--------------->8---

The ‘NarSize’ field is still broken on ci.guix:

--8<---------------cut here---------------start------------->8---
$ wget -qO - https://ci.guix.gnu.org/ashmi6vr9d0k03z9q6ncbb2wf36p9nyk.narinfo |grep Size
FileSize: 1876560180
FileSize: 1715771086
FileSize: 1753645085
NarSize: 18446744072093825552
$ wget -qO - https://bordeaux.guix.gnu.org/ashmi6vr9d0k03z9q6ncbb2wf36p9nyk.narinfo |grep Size
FileSize: 1715771086
NarSize: 2679241232
--8<---------------cut here---------------end--------------->8---

and again the database on berlin has a negative size:

--8<---------------cut here---------------start------------->8---
$ sudo sqlite3 /var/guix/db/db.sqlite
SQLite version 3.32.3 2020-06-18 14:00:33
Enter ".help" for usage hints.
sqlite> select * from validpaths where path = '/gnu/store/ashmi6vr9d0k03z9q6ncbb2wf36p9nyk-flightgear-2020.3.11';
56551239|/gnu/store/ashmi6vr9d0k03z9q6ncbb2wf36p9nyk-flightgear-2020.3.11|sha256:1c68105efd8ee4677085a2cecaa5859f1f5f213d52e213ef4949384717dc493a|1636968959|/gnu/store/xvyar43mcfw0r7jfm1x0a2i9rhnsdh87-flightgear-2020.3.11.drv|-1615726064
--8<---------------cut here---------------end--------------->8---

[Time passes…]

OK, this one is now fixed by commit
1eb40a6dc4917f5a2e915f8b31b750dba3d378c6m, which means you now get:

--8<---------------cut here---------------start------------->8---
$ guix build flightgear --no-grafts  -n
1,715.8 MB would be downloaded:
   /gnu/store/ashmi6vr9d0k03z9q6ncbb2wf36p9nyk-flightgear-2020.3.11
guix build: warning: at least 18,446,744,072,093.8 MB needed but only 4,753.4 MB available in /gnu/store
--8<---------------cut here---------------end--------------->8---

Fun, no?  :-)

Also, after substitution, the size in the store database would be the
wrong one, so ‘guix size’ would keep telling you it’s this big.  Not
great but harmless as the nar size is used for UI purposes only.

Ludo’.




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

end of thread, other threads:[~2021-11-24 23:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 20:47 bug#51983: guix build: error: integer expected from stream Tobias Geerinckx-Rice via Bug reports for GNU Guix
2021-11-19 21:03 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2021-11-24 23:24   ` Ludovic Courtès
2021-11-24 19:52 ` Maxim Cournoyer

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).