Build for Julia is not reproducible

  • Open
  • quality assurance status badge
Details
5 participants
  • Nicolò Balzarotti
  • Ludovic Courtès
  • Christopher Baines
  • Ricardo Wurmus
  • zimoun
Owner
unassigned
Submitted by
Ricardo Wurmus
Severity
normal

Debbugs page

R
R
Ricardo Wurmus wrote on 4 Jan 2016 08:28
(address . bug-guix@gnu.org)
idj1t9xia11.fsf@bimsb-sys02.mdc-berlin.net
When building “julia” twice we get different binaries for

$out/lib/julia/sys.so

and

$out/lib/julia/sys-debug.so

I could not determine the exact differences, because instead of a diff I
just see something like this:

--- /gnu/store/6njfyp46b22b0wb0r0ccg2wdzjx7066g-julia-0.4.2/lib/julia/sys.so
+++ 6njfyp46b22b0wb0r0ccg2wdzjx7066g-julia-0.4.2/lib/julia/sys.so
├── objdump --disassemble --full-contents {}
│ @@ -99994,8 +99994,8 @@
│ 186a00 05a3d38a 01488985 38ffffff 488b0515 .....H..8...H...
│ 186a10 5b8b0148 898540ff ffff4c89 ad48ffff [..H..@...L..H..
│ 186a20 ff31ffba 03000000 4c8db538 ffffff4c .1......L..8...L
│ 186a30 89f64989 f4e8b653 f0ff4889 8538ffff ..I....S..H..8..
│ 186a40 ff31ffba 03000000 488d9d28 ffffff49 .1......H..(...I
│ 186a50 89de4c89 f6e89653 f0ff4889 8528ffff ..L....S..H..(..
│ 186a60 ff488b05 38d08a01 48898530 ffffff48 .H..8...H..0...H
│ -[ Too much input for diff ]
│ +[ Too much input for diff ]

...

--- /gnu/store/6njfyp46b22b0wb0r0ccg2wdzjx7066g-julia-0.4.2/lib/julia/sys-debug.so
+++ 6njfyp46b22b0wb0r0ccg2wdzjx7066g-julia-0.4.2/lib/julia/sys-debug.so
├── objdump --disassemble --full-contents {}
│ @@ -99994,8 +99994,8 @@
│ 1869f0 01488b38 be370200 00e84257 f0ffe89d .H.8.7....BW....
│ 186a00 56f0ff66 6666662e 0f1f8400 00000000 V..ffff.........
│ 186a10 554889e5 488b3e48 8b7608e8 e0fdffff UH..H.>H.v......
│ 186a20 4889c7e8 2856f0ff 5dc3660f 1f440000 H...(V..].f..D..
│ 186a30 554889e5 4883ec10 64488b04 25280000 UH..H...dH..%(..
│ 186a40 00488945 f848833d fb4d8d01 00740948 .H.E.H.=.M...t.H
│ 186a50 8b0df24d 8d01eb1f 488d3591 ac190048 ...M....H.5....H
│ -[ Too much input for diff ]
│ +[ Too much input for diff ]

~~ Ricardo
L
L
Ludovic Courtès wrote on 5 Jan 2016 14:30
(name . Ricardo Wurmus)(address . ricardo.wurmus@mdc-berlin.de)(address . 22304@debbugs.gnu.org)
8760z7k6av.fsf@gnu.org
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

Toggle quote (8 lines)
> When building “julia” twice we get different binaries for
>
> $out/lib/julia/sys.so
>
> and
>
> $out/lib/julia/sys-debug.so

Apparently there’s no __DATE__ and __TIME__ in the C code.

I would check if the order of object files on the command line that
links those shared objects is always the same.

Ludo’.
R
R
Ricardo Wurmus wrote on 4 Feb 2016 06:51
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 22304@debbugs.gnu.org)
idjzivg8r5k.fsf@bimsb-sys02.mdc-berlin.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (15 lines)
> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
>
>> When building “julia” twice we get different binaries for
>>
>> $out/lib/julia/sys.so
>>
>> and
>>
>> $out/lib/julia/sys-debug.so
>
> Apparently there’s no __DATE__ and __TIME__ in the C code.
>
> I would check if the order of object files on the command line that
> links those shared objects is always the same.

As far as I could tell the order of shared objects in two consecutive
runs is the same.

~~ Ricardo
Z
Z
zimoun wrote on 28 Nov 2019 09:14
bug#22304: Julia not reproducible
CAJ3okZ3i90aWjZgZmvZSNad6XbWoRqBsk6KQnxZXaWO8Tq53eQ@mail.gmail.com
Hi,

This bug [1] is still present even with the version 1.1.1 of Julia.



Toggle snippet (8 lines)
guix describe
Generation 57 Nov 25 2019 14:26:15 (current)
guix b5d4d5b
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: b5d4d5b9bcf267fddd02fcc14b88eac0bebf979f

Toggle snippet (10 lines)
guix build julia # populate the store with dependencies
guix build julia --check -K --no-grafts
[...]
guix build: error: derivation
`/gnu/store/xdy3jjz7dzg1lr231b8zbss8xn44ldjj-julia-1.1.1.drv' may not
be deterministic: output
`/gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1' differs from
‘/gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1-check’

Toggle snippet (23 lines)
diff -r /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1
/gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1-check
Binary files /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1/lib/julia/sys.so
and /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1-check/lib/julia/sys.so
differ
Binary files /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1/share/julia/test/depot/compiled/v1.1/Bar/HXSAn.ji
and /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1-check/share/julia/test/depot/compiled/v1.1/Bar/HXSAn.ji
differ
Binary files /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1/share/julia/test/depot/compiled/v1.1/Baz/rONVA.ji
and /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1-check/share/julia/test/depot/compiled/v1.1/Baz/rONVA.ji
differ
Binary files /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1/share/julia/test/depot/compiled/v1.1/Foo/MYb1d.ji
and /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1-check/share/julia/test/depot/compiled/v1.1/Foo/MYb1d.ji
differ
Binary files /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1/share/julia/test/depot/compiled/v1.1/Foo/TeeT6.ji
and /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1-check/share/julia/test/depot/compiled/v1.1/Foo/TeeT6.ji
differ
Binary files /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1/share/julia/test/depot/compiled/v1.1/Qux/YFfiR.ji
and /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1-check/share/julia/test/depot/compiled/v1.1/Qux/YFfiR.ji
differ


Well, then I try to explore with diffoscope but hum? I do not do
correctly because the resulting diff is 845MB ouch!


All the best,
simon
L
L
Ludovic Courtès wrote on 29 Nov 2019 08:19
(name . zimoun)(address . zimon.toutoune@gmail.com)
874kymsli5.fsf@gnu.org
Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

Toggle quote (8 lines)
> Binary files /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1/share/julia/test/depot/compiled/v1.1/Qux/YFfiR.ji
> and /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1-check/share/julia/test/depot/compiled/v1.1/Qux/YFfiR.ji
> differ
>
>
> Well, then I try to explore with diffoscope but hum? I do not do
> correctly because the resulting diff is 845MB ouch!

Pro tip: just run

diffoscope \
/gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1{,-check}/share/julia/test/depot/compiled/v1.1/Qux/YFfiR.ji

That’ll already be enough info for a start!

Ludo’.
Z
Z
zimoun wrote on 2 Dec 2019 09:28
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAJ3okZ0ZZQVqLWWYg=M9sHCfyScy=S9hyraydUbrF2GQwN5hPg@mail.gmail.com
Hi Ludo,

On Fri, 29 Nov 2019 at 17:19, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (2 lines)
> Pro tip: just run

I think that I have already did the pro tip. :-)

Toggle snippet (7 lines)
diffoscope /gnu/store/s2vj70fgv4v4wq66dbi797ss15f8xd3b-julia-1.1.1{,-check}/lib/julia/sys.so
\
> /tmp/sys.diffoscope
du -sh /tmp/sys.diffoscope
845M /tmp/sys.diffoscope

Maybe I am doing incorrectly...

If I understand well [1], the file .ji are "precompiled" (analogy: .pyc). Hum?!



Cheers,
simon
Z
Z
zimoun wrote on 24 Jan 2020 10:30
(name . Ludovic Courtès)(address . ludo@gnu.org)
CAJ3okZ0Yx8+dveO5ooQUBkJe0jAwZHZuwk5rj_c1LKXYXberhg@mail.gmail.com
Hi,

On Mon, 2 Dec 2019 at 18:28, zimoun <zimon.toutoune@gmail.com> wrote:

Toggle quote (2 lines)
> If I understand well [1], the file .ji are "precompiled" (analogy: .pyc). Hum?!

The non-determinism seems coming from these "precompiled" .ji files
and 2 bugs are opened upstream.


Thanks to Nicolò to pointing out these [1] when working on the version update.


With lengthy and clear details. :-)


Let start the container with everything useful.

Toggle snippet (8 lines)
mkdir -p /tmp/test-julia && cd /tmp/test-julia

guix time-machine --commit=b5d4d5b \
environment -u nixbld --no-cwd --container --network \
--expose=$(realpath determinism) --share=/tmp/test-julia \
--ad-hoc julia coreutils nss-certs curl tar gzip

Then, the path to reproduce is odd because there is no Julia packages
in Guix. So we need to use 'Pkg' from Julia which downloads from
elsewhere and the reproducibility of such is not well controlled but
it gives an idea. :-)

Toggle snippet (18 lines)
export SSL_CERT_DIR="$GUIX_ENVIRONMENT/etc/ssl/certs"
export SSL_CERT_FILE="$SSL_CERT_DIR/ca-certificates.crt"
export GIT_SSL_CAINFO="$SSL_CERT_FILE"

# populate the Julia package manager
julia --startup-file=no -q -e 'using Pkg; Pkg.instantiate()'

# install something
julia --startup-file=no -q -e 'using Pkg; Pkg.add("Compat")'

# use something / precompiled it
julia --startup-file=no -q -e 'using Compat'

# check the .ji file
md5sum ~/.julia/compiled/v1.1/Compat/*


Then each time one runs this block, one gets different hash.


All the best,
simon
Z
Z
zimoun wrote on 13 May 2020 11:44
Julia v1.4.1 still not reproducible
CAJ3okZ0_SORCsKtY3vvPnT3o+NOYwovHO+v9E6gcG=68ACEyfQ@mail.gmail.com
Hi Efraim,

On Wed, 13 May 2020 at 13:04, Efraim Flashner <efraim@flashner.co.il> wrote:

Toggle quote (5 lines)
> guix build: error: derivation `/gnu/store/z21c12ijspavaclcins5pja8z1s8wbm0-julia-1.4.1.drv' may not be deterministic: output `/gnu/store/ri931fk8hf5wvagk76zhmwbphq2pwgnp-julia-1.4.1' differs from ?/gnu/store/ri931fk8hf5wvagk76zhmwbphq2pwgnp-julia-1.4.1-check?
>
> I built it on bayfront twice. I'll get the diffoscope output once it
> finally builds.

Thank you.

Cheers,
simon
N
N
Nicolò Balzarotti wrote on 17 May 2020 06:55
(address . 22304@debbugs.gnu.org)
87v9kuwtrp.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me
Ops, I sent it to 22304@debuugs.gnu.org instead of 22304@debbugs.gnu.org
Attachment: file
L
L
Ludovic Courtès wrote on 27 Jun 2021 03:40
Re: bug#22304: Build for Julia is not reproducible
(address . 22304@debbugs.gnu.org)
87bl7r1tgy.fsf_-_@gnu.org
Hi!

FWIW Julia 1.5.3 is also not reproducible:

Toggle snippet (31 lines)
$ guix challenge julia
/gnu/store/d077a9ggqlcyhnhcg4ng2ibnlarxq8zf-julia-1.5.3 contents differ:
no local build for '/gnu/store/d077a9ggqlcyhnhcg4ng2ibnlarxq8zf-julia-1.5.3'
https://ci.guix.gnu.org/nar/lzip/d077a9ggqlcyhnhcg4ng2ibnlarxq8zf-julia-1.5.3: 097czl5kmmdbgljqjrmamkpzsfmkkpy578i1niwm2fizxslyxws6
https://bordeaux.guix.gnu.org/nar/lzip/d077a9ggqlcyhnhcg4ng2ibnlarxq8zf-julia-1.5.3: 047bd3qgar4c17i9xp5g564xac4vsqy5h7hzd0ss824f367idh9c
differing files:
/share/julia/test/depot/compiled/v1.5/Qux/YFfiR_w3IH9.ji
/share/julia/test/depot/compiled/v1.5/Foo/TeeT6_w3IH9.ji
/share/julia/test/depot/compiled/v1.5/Foo/MYb1d_w3IH9.ji
/share/julia/test/depot/compiled/v1.5/Baz/rONVA_w3IH9.ji
/share/julia/test/depot/compiled/v1.5/Bar/HXSAn_w3IH9.ji
/share/julia/stdlib/v1.5/REPL/src/Terminals.jl.6161.mem
/share/julia/stdlib/v1.5/REPL/src/Terminals.jl.6152.mem
/share/julia/stdlib/v1.5/REPL/src/Terminals.jl.6143.mem
/share/julia/stdlib/v1.5/Logging/src/ConsoleLogger.jl.6161.mem
/share/julia/stdlib/v1.5/Logging/src/ConsoleLogger.jl.6152.mem
/share/julia/stdlib/v1.5/Logging/src/ConsoleLogger.jl.6143.mem
/lib/julia/sys.so

1 store items were analyzed:
- 0 (0.0%) were identical
- 1 (100.0%) differed
- 0 (0.0%) were inconclusive
$ guix describe
Generacio 186 Jun 25 2021 11:36:00 (nuna)
guix e4305e4
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: e4305e4562f1bcedf888d8a5473aad256df38e81

Ludo’.
C
C
Christopher Baines wrote on 1 Nov 2023 02:39
Julia
(address . 22304@debbugs.gnu.org)
87fs1p95h3.fsf@cbaines.net
Just checking this, looks like 1.8.3 is still not reproducible, just one
file differs though:

→ guix challenge --diff=simple julia
/gnu/store/h5mgc7ar7a05f9rwrd1makhzays5wd3s-julia-1.8.3 contents differ:
no local build for '/gnu/store/h5mgc7ar7a05f9rwrd1makhzays5wd3s-julia-1.8.3'
https://ci.guix.gnu.org/nar/lzip/h5mgc7ar7a05f9rwrd1makhzays5wd3s-julia-1.8.3:0jzli7ym7ihj7zhqwqp8lgwn6c38n44ld1rdn39pa7n8qp1q154r
differing file:
/lib/julia/sys.so
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmVCHQhfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xe14A/+M/duyXxeoUxEVDxmk1+CW5S7k9uahAb3
HFazHD/MhfvMZ8L/Pid2scGyxFGvzagx/CCQNrb/khmD/J4YYRs1QfwxntxE7hM5
lcdAF4M8SUSVVnBVeGqhUOy3zfNgH1UmBFoGlxVJcY2IlFN8ktk/Zfjd9TmsZxZf
93yiOt5Wqq6K9uuTUdLO2FQPI1CXdFKtlzk7KOmNN5/5AKNUwl9XDe0TGi0X/+IH
uE5bqzB5v992K/iyVtGQNWy/x2Q2CCtC8JrTpWPZUb3m0MsNV7rQADBIH9k+h+8P
fSELwnHgetv15/xv1rX1/ldzWBfpWi9hRCeuGs0wDLYoEC41v1R+pkivctRrK0CO
lifcfe9LsXna55VXblVFCTfiGsbvCdnvDwQ58Ex7qWqwVusqTqFCBQBwPEGnxFky
ro6bfQowm6nZ/DNvDWgGr8FAOqGdr0lAlAf61jswNJOVkkhrRFAwq37nwiReE/v5
Lk/TITi4JiENwpbvr2N+IuIHVs4Dfx1xN5rEY+UTdbg+T6MZFATyWghD/hT9YSDs
i9F0Vd3H05OTS25SLqp/SOufBajZURPo79nKYZSAr3z9NrSk+sxpoVrds/EZcmFn
im3jHflDO5WOA1whVMh3qxZUwPweqAtUXYjkE5K0zF7hUmaDLu3eaCxRBi/U0thy
cMwEHkgPNYM=
=KvKF
-----END PGP SIGNATURE-----

?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 22304@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 22304
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch