Page 1 sur 2

Tests fail on big endian architectures

Publié : mar. sept. 12, 2017 8:12 pm
par tohansen
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

Re: Tests fail on big endian architectures

Publié : jeu. sept. 14, 2017 6:10 am
par parisse
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?

Re: Tests fail on big endian architectures

Publié : jeu. sept. 14, 2017 8:43 am
par tohansen
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.

Re: Tests fail on big endian architectures

Publié : jeu. sept. 14, 2017 9:36 am
par parisse
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.

Re: Tests fail on big endian architectures

Publié : jeu. sept. 14, 2017 10:16 am
par tohansen
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.

Re: Tests fail on big endian architectures

Publié : jeu. sept. 14, 2017 10:49 am
par parisse

Re: Tests fail on big endian architectures

Publié : jeu. sept. 14, 2017 10:57 am
par tohansen
The change from there is applied and it fixed the problem on arm64, but not on the big endian architectures.

Re: Tests fail on big endian architectures

Publié : jeu. sept. 14, 2017 11:36 am
par parisse
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.

Re: Tests fail on big endian architectures

Publié : jeu. sept. 14, 2017 12:52 pm
par tohansen
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

Re: Tests fail on big endian architectures

Publié : jeu. sept. 14, 2017 6:18 pm
par parisse
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

Re: Tests fail on big endian architectures

Publié : jeu. sept. 14, 2017 7:24 pm
par tohansen
I attached gdb backtraces.

Re: Tests fail on big endian architectures

Publié : ven. sept. 15, 2017 6:13 am
par parisse
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.

Re: Tests fail on big endian architectures

Publié : ven. sept. 15, 2017 10:24 am
par tohansen
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.

Re: Tests fail on big endian architectures

Publié : ven. sept. 15, 2017 10:40 am
par parisse
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.

Re: Tests fail on big endian architectures

Publié : ven. sept. 15, 2017 10:51 am
par tohansen
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?