Tests fail on big endian architectures

Bugs

Modérateur : xcasadmin

tohansen
Messages : 8
Inscription : mar. sept. 12, 2017 6:40 pm

Tests fail on big endian architectures

Message par tohansen » mar. sept. 12, 2017 8:12 pm

Hi,

all of xcas' tests fail on big endian architectures on Debian. You can see the build logs here:
https://buildd.debian.org/status/packag ... sg1-2%2Bb1

The big endian architectures are mips, s390x, hppa, m68k, powerpc, ppc64 and sparc64. Do you have an idea what's wrong?

The Debian bug report is here:
https://bugs.debian.org/867172

Thanks,
Tobias

parisse
Messages : 5112
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Tests fail on big endian architectures

Message par parisse » jeu. sept. 14, 2017 6:10 am

I don't see any information in the log except FAIL ...
What failed? Is it a segfault of the executable (can we get a stack trace?) or a result that is not the same as the expected result?

tohansen
Messages : 8
Inscription : mar. sept. 12, 2017 6:40 pm

Re: Tests fail on big endian architectures

Message par tohansen » jeu. sept. 14, 2017 8:43 am

Here are the test logs from s390x: https://people.debian.org/~thansen/make ... 90x.tar.xz

After chk_fhan16 it started to hang. I waited at least half an hour and aborted. Hope this helps.

parisse
Messages : 5112
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Tests fail on big endian architectures

Message par parisse » jeu. sept. 14, 2017 9:36 am

It's full wrong, I have no idea why. I'm afraid I can not fix anything unless I have access to a shell with emacs and gdb on a similar arch.

tohansen
Messages : 8
Inscription : mar. sept. 12, 2017 6:40 pm

Re: Tests fail on big endian architectures

Message par tohansen » jeu. sept. 14, 2017 10:16 am

Debian has machines for this purpose, but they don't like to give access to people who are not involved with Debian...

Has Giac been tested on a big endian architecture at some point in the past? If it is expected to work, maybe somebody who sees the bug (here or in Debian) will fix it eventually.

parisse
Messages : 5112
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Tests fail on big endian architectures

Message par parisse » jeu. sept. 14, 2017 10:49 am


tohansen
Messages : 8
Inscription : mar. sept. 12, 2017 6:40 pm

Re: Tests fail on big endian architectures

Message par tohansen » jeu. sept. 14, 2017 10:57 am

The change from there is applied and it fixed the problem on arm64, but not on the big endian architectures.

parisse
Messages : 5112
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Tests fail on big endian architectures

Message par parisse » jeu. sept. 14, 2017 11:36 am

Is it possible to test with non default compile flags?
For example -DDOUBLEVAL would disable some optimizations in the gen type that are probably not valid here.

tohansen
Messages : 8
Inscription : mar. sept. 12, 2017 6:40 pm

Re: Tests fail on big endian architectures

Message par tohansen » jeu. sept. 14, 2017 12:52 pm

That helped: Now there's a crash in icas with backtrace, 5 fails, 18 passes, then it hangs. See make-check.log:

https://people.debian.org/~thansen/giac ... 90x.tar.xz

parisse
Messages : 5112
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Tests fail on big endian architectures

Message par parisse » jeu. sept. 14, 2017 6:18 pm

I compiled with -DDOUBLEVAL (and SMARTPTR64 disabled) to compare. I get the same diffs for chk_cas chk_fhan0 and chk_fhan2 (since DOUBLEVAL enables standard double with 53 bits of mantissa instead of truncated double with 48 bits of mantissa, roundoff errors are expected).
We have therefore only 2 failures remaining, both with segfaults. Unfortunately the trace is not useful.
I would recommend to recompile with -g, and trace the segfault with gdb and valgrind on ../src/icas testnormalize or ../src/icas testlimit

tohansen
Messages : 8
Inscription : mar. sept. 12, 2017 6:40 pm

Re: Tests fail on big endian architectures

Message par tohansen » jeu. sept. 14, 2017 7:24 pm

I attached gdb backtraces.
Pièces jointes
gdb_backtraces.zip
(9.23 Kio) Téléchargé 124 fois

parisse
Messages : 5112
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Tests fail on big endian architectures

Message par parisse » ven. sept. 15, 2017 6:13 am

It does not help much. Maybe valgrind would give more information, but if I'm not able to debug myself and move in frames to print variables and set breakpoints, I won't be able to fix something.

tohansen
Messages : 8
Inscription : mar. sept. 12, 2017 6:40 pm

Re: Tests fail on big endian architectures

Message par tohansen » ven. sept. 15, 2017 10:24 am

Ok, thanks anyway. I enabled the -DDOUBLEVAL flag in the Debian package for big endian architectures, so if someone looks at this in the future they are one step further.

parisse
Messages : 5112
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Tests fail on big endian architectures

Message par parisse » ven. sept. 15, 2017 10:40 am

If you have some good pointers on how to install something like qemu for one of this arch, maybe I could try to debug myself.

tohansen
Messages : 8
Inscription : mar. sept. 12, 2017 6:40 pm

Re: Tests fail on big endian architectures

Message par tohansen » ven. sept. 15, 2017 10:51 am

I have never used qemu. Didn't you mention in another thread that you debugged arm64 with qemu? Shouldn't it work the same way with mips or s390x?

Répondre