Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
important
L
L
Ludovic Courtès wrote on 3 Jul 2021 23:41
(address . bug-guix@gnu.org)
87tulbxegp.fsf@inria.fr
On current ‘core-updates’
(ca. 39f1486efd70712416ca784f9014132644b04155), Guile 3.0.7,
specifically (@@ (gnu packages commencement) guile-final) fails tests on
i686-linux:

Toggle snippet (13 lines)
Running numbers.test
FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)
FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 -10/7)
FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (130.0 10/7)
FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (-130.0 -10/7)
FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (130.0 -10/7)
FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (-130.0 10/7)
FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 10/7)
FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 -10/7)
FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 10/7)
FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 -10/7)

Note that this doesn’t happen on ‘master’ (glibc 3.31).

Ludo’.
L
L
Ludovic Courtès wrote on 3 Jul 2021 23:45
control message for bug #49368
(address . control@debbugs.gnu.org)
87sg0vxe9f.fsf@gnu.org
severity 49368 important
quit
M
M
Maxime Devos wrote on 4 Jul 2021 14:06
Re: bug#49368: Guile 3.0.7 test failures on i686-linux, glibc 2.33 [core-updates]
c3d4cad63eaef080975b83afcd0c4c60161263dd.camel@telenet.be
Ludovic Courtès schreef op za 03-07-2021 om 23:41 [+0200]:
Toggle quote (21 lines)
> On current ‘core-updates’
> (ca. 39f1486efd70712416ca784f9014132644b04155), Guile 3.0.7,
> specifically (@@ (gnu packages commencement) guile-final) fails tests on
> i686-linux:
>
> --8<---------------cut here---------------start------------->8---
> Running numbers.test
> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (-130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (-130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 -10/7)
> --8<---------------cut here---------------end--------------->8---
>
> Note that this doesn’t happen on ‘master’ (glibc 3.31).

In a REPL:

(euclidean/ 130.0 10/7)
(euclidean/ 130.0 -10/7)
(floor/ 130.0 10/7)
(floor/ -130.0 -10/7)
(ceiling/ 130.0 -10/7)
(ceiling/ -130.0 10/7)
(truncate/ 130.0 10/7)
(truncate/ 130.0 -10/7)
(truncate/ -130.0 10/7)
(truncate/ -130.0 -10/7)

Output on core-updates (using --keep-failed and ./meta/uninstalled-env guile):

scheme@(guile-user)> (euclidean/ 130.0 10/7)
$1 = 90.0
$2 = 1.4285714285714257
scheme@(guile-user)> (euclidean/ 130.0 -10/7)
$3 = -90.0
$4 = 1.4285714285714257
scheme@(guile-user)> (floor/ 130.0 10/7)
$5 = 90.0
$6 = 1.4285714285714257
scheme@(guile-user)> (floor/ -130.0 -10/7)
$7 = 90.0
$8 = -1.4285714285714257
scheme@(guile-user)> (ceiling/ 130.0 -10/7)
$9 = -90.0
$10 = 1.4285714285714257
scheme@(guile-user)> (ceiling/ -130.0 10/7)
$11 = -90.0
$12 = -1.4285714285714257
scheme@(guile-user)> (truncate/ 130.0 10/7)
$13 = 90.0
$14 = 1.4285714285714257
scheme@(guile-user)> (truncate/ 130.0 -10/7)
$15 = -90.0
$16 = 1.4285714285714257
scheme@(guile-user)> (truncate/ -130.0 10/7)
$17 = -90.0
$18 = -1.4285714285714257
scheme@(guile-user)> (truncate/ -130.0 -10/7)
$19 = 90.0
$20 = -1.4285714285714257

It appears that truncate/, ceiling/ and floor/ give the same output ...
that doesn't seem correct.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYOGkPBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pb/AP4iErBmWRYgxDQmlFpOgaItThKB
v61U/iNfeIA0mGNNqwD9Fm27V20yPTIfUNH1HFKo54Tesd/5RADeIMOpWyAR2wA=
=GU8x
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 4 Jul 2021 14:31
707865c726394c527a9141e742a575c2e4e19a67.camel@telenet.be
Ludovic Courtès schreef op za 03-07-2021 om 23:41 [+0200]:
Toggle quote (10 lines)
> On current ‘core-updates’
> (ca. 39f1486efd70712416ca784f9014132644b04155), Guile 3.0.7,
> specifically (@@ (gnu packages commencement) guile-final) fails tests on
> i686-linux:
>
> --8<---------------cut here---------------start------------->8---
> Running numbers.test
> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)
> [...]

Curiously, on core-updates, ceiling/ is inconsistent with ceiling-quotient
and ceiling-remainder:

scheme@(guile-user) [1]> (ceiling/ 130.0 -10/7)
$28 = -90.0
$29 = 1.4285714285714257
scheme@(guile-user) [1]> (ceiling-quotient 130.0 -10/7)
$30 = -91.0
scheme@(guile-user) [1]> (ceiling-remainder 130.0 -10/7)
$31 = 0.0

But on 'master', the results are consistent:

scheme@(guile-user)> (ceiling/ 130.0 -10/7)
$1 = -91.0
$2 = 0.0
scheme@(guile-user)> (ceiling-quotient 130.0 -10/7)
$3 = -91.0
scheme@(guile-user)> (ceiling-remainder 130.0 -10/7)
$4 = 0.0

To be investigated ...

Greetings,
Maxime.
Toggle quote (1 lines)
>
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYOGqOhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oYtAP4lFjMOZyfCyJp9+W9e/RoS2kNg
35ZmRF8jK8jV3WemtgD/Vpfi1ljFf2TEJm4tKh7G/2OzQ0TMoEhxDXfhGCRpUQU=
=A9Zb
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 6 Jul 2021 15:24
b6b4a1391d032a4f01ab5901e12464493e1c10a2.camel@telenet.be
Ludovic Courtès schreef op za 03-07-2021 om 23:41 [+0200]:
Toggle quote (23 lines)
> On current ‘core-updates’
> (ca. 39f1486efd70712416ca784f9014132644b04155), Guile 3.0.7,
> specifically (@@ (gnu packages commencement) guile-final) fails tests on
> i686-linux:
>
> --8<---------------cut here---------------start------------->8---
> Running numbers.test
> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: floor/: mixed types: (-130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: ceiling/: mixed types: (-130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (130.0 -10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 10/7)
> FAIL: numbers.test: Number-theoretic division: truncate/: mixed types: (-130.0 -10/7)
> --8<---------------cut here---------------end--------------->8---
>
> Note that this doesn’t happen on ‘master’ (glibc 3.31).
>
> Ludo’.

I wondered if the implementation of the C function 'ceil' is buggy,
so I tried the following (spoiler: 'ceil' doesn't seem to be the issue,
or I need another test case:

Run "guix build --system=i686-linux -e (@@ (gnu packages commencement) guile-final) --keep-failed".
In the build directory, write to a file "test.c":

#include <stdio.h>
#include <math.h>

int
main(void)
{
double x;
double y;
if (scanf("%lf %lf", &x, &y) < 0) /* < 0 is actually incorrect here */
return 1;
if (printf("%lf/%lf=%lf\n", x,y, x/y) < 0)
return 1;
if (printf("ceil(%lf/%lf)=%lf\n", x,y, ceil(x/y)) < 0)
return 1;
return 0;
}

Run ((exact->inexact 10/7) = 1.4285714285714286 on both master and core-updates):

$ gcc -Wall -Wextra -lm test.c -o test
$ echo "130.0 1.4285714285714286" | ./test
130.000000/1.428571=91.000000
ceil(130.000000/1.428571)=91.000000

On master, the output is:
130.000000/1.428571=91.000000
ceil(130.000000/1.428571)=91.000000
(idem)

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYORZnhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7q/WAQD4dfWMlKM9QjPclKIrEhyjZ5fr
lUbDUyS3ybODRQXJyAD8CbgxbnFTq0qARX+7Cu/XY2oZxpd+on6g5ddpcFjbJAk=
=3504
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 24 Jul 2021 20:46
(address . 49368-done@debbugs.gnu.org)
7fce1551ca9819053aa094923e6d6f39b9966f22.camel@telenet.be
Ludovic Courtès schreef op za 03-07-2021 om 23:41 [+0200]:
Toggle quote (10 lines)
> On current ‘core-updates’
> (ca. 39f1486efd70712416ca784f9014132644b04155), Guile 3.0.7,
> specifically (@@ (gnu packages commencement) guile-final) fails tests on
> i686-linux:
>
> --8<---------------cut here---------------start------------->8---
> Running numbers.test
> FAIL: numbers.test: Number-theoretic division: euclidean/: mixed types: (130.0 10/7)
> [...]

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYPxgARccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nLJAP4vFJtHqZpJR3x3GqT8iAMBIgSs
0xMTdWLdjMq1riDaCAD/YJInSXX/t1KEyZ91c8vuQO4cv7w1n76hCtTHyaFIAwY=
=9Tkp
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49368@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49368
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