Some data points:

1. I was able to reproduce the failures on an amd64 build machine running and 
compiling i386 code as early as v0.7.11-2 (see logs at [1]). To reproduce, on 
Debian Testing, within said version's source code:

```
sbuild-createchroot --include=eatmydata --arch=i386 testing 
/srv/chroot/testing-i386-sbuild
sbuild -d testing --host i386 --build i386
```

2. Apparently the relevant code did not change upstream between v0.7.25 and 
v0.7.26 - that is, when the tests started failing.

3. All tests pass in i386 emulation using rustup's latest rustc/cargo via 
`cargo test --all --target i686-unknown-linux-gnu`. In more detail: I 
cross-compiled for i386 from arm64 (yes, arm64, not amd64) and then ran the 
tests wrapped in qemu-i386.

4. All tests pass on amd64 compiling and running i386 code using rustup's 
latest rustc/cargo via `cargo test --all --target i686-unknown-linux-gnu`.


I recently had a bug in rust-dysk [2] where i386 (and i386 only) tests passing 
with rustup's rustc/cargo (3. and 4. above) + not passing with the 
configuration in point 1. above + the upstream code involving floating point 
operations chained to casts was due to Debian's i386 rust target being compiled 
without SSE2 and thus having inconsistent floating point behavior [3] . What 
I'm seeing in rust-wide, and the nature of the crate itself, closely reminds me 
of that. If this is the case, then the bug is real, it is Debian-specific (in 
the sense that it would not show up on a vanilla i386 rust target with SSE2 
enabled) and there may be not much the upstream developers can do. I was only 
able to fix that bug in rust-dysk because I could replace an entire chain of 
operations altogether, but the code there was far simpler than rust-wide's.


What I really don't understand is why the tests started failing just recently 
in Debian's CI if I see them failing already for v0.7.11-2, especially given 
that the failing code did not change between v0.7.25 and v0.7.26 (which makes 
me think upstream is not the cause anyway).


[1] https://paste.debian.net/hidden/0db6dbeb/
[2] https://github.com/Canop/dysk/pull/79
[3] https://github.com/rust-lang/rust/issues/114479

Reply via email to