Two failing tests on Solaris

Hello PPL developers,
I'm a package maintainer at OpenCSW, a project providing binary packages for Solaris. I'm currently working on building PPL. I've compiled the dependencies and the PPL library itself. There are two failing tests that prevent me from releasing the updated binary.
The library is built with gcc-4.3.3.
maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk > /opt/csw/gcc4/bin/gcc --version gcc (GCC) 4.3.3 maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk > uname -a SunOS unstable9s 5.9 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise-T5220
Compilation flags:
CFLAGS = -O0 -mcpu=v8 CXXFLAGS = -O0 -mcpu=v8 CPPFLAGS = -I/opt/csw/include FFLAGS = -O0 -mcpu=v8 FCFLAGS = -O0 -mcpu=v8 LDFLAGS = -L/opt/csw/gcc4/lib/. -mcpu=v8 -lgnugetopt -L/opt/csw/lib LD_OPTIONS = -R/opt/csw/gcc4/lib -R/opt/csw/lib/$ISALIST -R/opt/csw/lib ASFLAGS = OPTFLAGS = -O0 -mcpu=v8
When running the tests by hand:
gmake[5]: Entering directory `/home/maciej/src/opencsw/pkg/ppl/trunk/work/solaris9-sparc/build-isa-sparcv8/ppl-0.11.2/tests/Partially_Reduced_Product' (...) FAIL: bounds1 (..._ FAIL: smashproduct1
When running the binary by hand, I see a segfault:
maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk > work/solaris9-sparc/build-isa-sparcv8/ppl-0.11.2/tests/Partially_Reduced_Product/bounds1 Bus Error (core dumped) maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk > pstack ./core core './core' of 18057: /home/maciej/src/opencsw/pkg/ppl/trunk/work/solaris9-sparc/build-isa-s fed5e4d4 emutls_destroy (bb218, fed5e494, 0, bb618, 1, ffbff82c) + 40 febd6aa8 keys_destruct (0, 9f384, 5068c, feb8bb08, 5, 0) + 68 feb9cce8 _exithandle (511c4, 2, fb, 10034, ffffffff, fec3c000) + 70 fec207c0 exit (0, ffbff934, ffbff93c, b8fdc, 7d8, ffbffa54) + 24 000511c4 _start (0, ffbff934, 1, ff3dc608, ff3ee834, ff3ee000) + 64
For easier inspection, I've tarred up the whole build:
http://buildfarm.opencsw.org/~maciej/ppl-2011-08-11.tar.gz
Do you have an idea what might be the problem?
Maciej

On 08/11/11 03:46, Maciej Bliziński wrote:
Hello PPL developers,
I'm a package maintainer at OpenCSW, a project providing binary packages for Solaris. I'm currently working on building PPL. I've compiled the dependencies and the PPL library itself. There are two failing tests that prevent me from releasing the updated binary.
The library is built with gcc-4.3.3.
maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk> /opt/csw/gcc4/bin/gcc --version gcc (GCC) 4.3.3 maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk> uname -a SunOS unstable9s 5.9 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise-T5220
Compilation flags:
CFLAGS = -O0 -mcpu=v8 CXXFLAGS = -O0 -mcpu=v8 CPPFLAGS = -I/opt/csw/include FFLAGS = -O0 -mcpu=v8 FCFLAGS = -O0 -mcpu=v8 LDFLAGS = -L/opt/csw/gcc4/lib/. -mcpu=v8 -lgnugetopt -L/opt/csw/lib LD_OPTIONS = -R/opt/csw/gcc4/lib -R/opt/csw/lib/$ISALIST -R/opt/csw/lib ASFLAGS = OPTFLAGS = -O0 -mcpu=v8
When running the tests by hand:
gmake[5]: Entering directory `/home/maciej/src/opencsw/pkg/ppl/trunk/work/solaris9-sparc/build-isa-sparcv8/ppl-0.11.2/tests/Partially_Reduced_Product' (...) FAIL: bounds1 (..._ FAIL: smashproduct1
When running the binary by hand, I see a segfault:
maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk> work/solaris9-sparc/build-isa-sparcv8/ppl-0.11.2/tests/Partially_Reduced_Product/bounds1 Bus Error (core dumped)
Hi Maciej,
can you please define the environment variable `PPL_NOISY_TESTS' to anything, just before running `bounds1' and `smashproduct1' by hand? Then please send us the output.
Do you have an idea what might be the problem?
Not at this moment. Cordially,
Roberto

Hi Roberto,
2011/8/11 Roberto Bagnara bagnara@cs.unipr.it:
can you please define the environment variable `PPL_NOISY_TESTS' to anything, just before running `bounds1' and `smashproduct1' by hand? Then please send us the output.
Here's the output: http://buildfarm.opencsw.org/~maciej/bounds1.log http://buildfarm.opencsw.org/~maciej/smashproduct1.log
Maciej

On 08/11/11 10:21, Maciej Bliziński wrote:
Hi Roberto,
2011/8/11 Roberto Bagnarabagnara@cs.unipr.it:
can you please define the environment variable `PPL_NOISY_TESTS' to anything, just before running `bounds1' and `smashproduct1' by hand? Then please send us the output.
Here's the output: http://buildfarm.opencsw.org/~maciej/bounds1.log http://buildfarm.opencsw.org/~maciej/smashproduct1.log
Where are the segfaults?

2011/8/11 Roberto Bagnara bagnara@cs.unipr.it:
On 08/11/11 10:21, Maciej Bliziński wrote:
Hi Roberto,
2011/8/11 Roberto Bagnarabagnara@cs.unipr.it:
can you please define the environment variable `PPL_NOISY_TESTS' to anything, just before running `bounds1' and `smashproduct1' by hand? Then please send us the output.
Here's the output: http://buildfarm.opencsw.org/~maciej/bounds1.log http://buildfarm.opencsw.org/~maciej/smashproduct1.log
Where are the segfaults?
Interestingly, segfaults go away when stdout goes to a pipe instead of the terminal. For example:
maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk > PPL_NOISY_TESTS=wibble work/solaris9-sparc/build-isa-sparcv8/ppl-0.11.2/tests/Partially_Reduced_Product/smashproduct1
/dev/null
Bus Error (core dumped) maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk > PPL_NOISY_TESTS=wibble work/solaris9-sparc/build-isa-sparcv8/ppl-0.11.2/tests/Partially_Reduced_Product/smashproduct1
/dev/null | cat
maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk >
Perhaps the segfaults are a bit of a red herring; these two tests also fail, e.g:
maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk > (work/solaris9-sparc/build-isa-sparcv8/ppl-0.11.2/tests/Partially_Reduced_Product/smashproduct1 || echo "Test failed" | cat) Test failed
We could investigate the failures first, and after fixing them, we might find out that the segfaults are gone too.
Maciej

On 08/11/11 11:04, Maciej Bliziński wrote:
2011/8/11 Roberto Bagnarabagnara@cs.unipr.it:
On 08/11/11 10:21, Maciej Bliziński wrote:
Hi Roberto,
2011/8/11 Roberto Bagnarabagnara@cs.unipr.it:
can you please define the environment variable `PPL_NOISY_TESTS' to anything, just before running `bounds1' and `smashproduct1' by hand? Then please send us the output.
Here's the output: http://buildfarm.opencsw.org/~maciej/bounds1.log http://buildfarm.opencsw.org/~maciej/smashproduct1.log
Where are the segfaults?
Interestingly, segfaults go away when stdout goes to a pipe instead of the terminal. For example:
maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk> PPL_NOISY_TESTS=wibble work/solaris9-sparc/build-isa-sparcv8/ppl-0.11.2/tests/Partially_Reduced_Product/smashproduct1
/dev/null
Bus Error (core dumped) maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk> PPL_NOISY_TESTS=wibble work/solaris9-sparc/build-isa-sparcv8/ppl-0.11.2/tests/Partially_Reduced_Product/smashproduct1
/dev/null | cat
maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk>
Perhaps the segfaults are a bit of a red herring; these two tests also fail, e.g:
maciej@unstable9s :~/src/opencsw/pkg/ppl/trunk> (work/solaris9-sparc/build-isa-sparcv8/ppl-0.11.2/tests/Partially_Reduced_Product/smashproduct1 || echo "Test failed" | cat) Test failed
We could investigate the failures first, and after fixing them, we might find out that the segfaults are gone too.
When a test fails in the PPL camp, the output with PPL_NOISY_TESTS ends with a list of the test functions that failed. I don't see that in the files you linked. I suggest you use gdb on smashproduct1 to find out more. Cheers,
Roberto

2011/8/11 Roberto Bagnara bagnara@cs.unipr.it:
When a test fails in the PPL camp, the output with PPL_NOISY_TESTS ends with a list of the test functions that failed. I don't see that in the files you linked. I suggest you use gdb on smashproduct1 to find out more.
Based on the place where the segfault happens, it seems to me that I've been hit by an old GCC bug.
(...) *** sp.widening_assign(sp_prev) constraints *** C = 0, -A >= -2, B >= 0, C = 0.
Program received signal SIGSEGV, Segmentation fault. 0xfed5e4d4 in emutls_destroy (ptr=0x840b8) at ../../../gcc-4.3.3/libgcc/../gcc/emutls.c:76 76 ../../../gcc-4.3.3/libgcc/../gcc/emutls.c: No such file or directory. in ../../../gcc-4.3.3/libgcc/../gcc/emutls.c (gdb) where #0 0xfed5e4d4 in emutls_destroy (ptr=0x840b8) at ../../../gcc-4.3.3/libgcc/../gcc/emutls.c:76 #1 0xfebd6ab0 in keys_destruct () from /usr/lib/libc.so.1 #2 0xfeb9ccf0 in _exithandle () from /usr/lib/libc.so.1 #3 0xfec207c8 in exit () from /usr/lib/libc.so.1 #4 0x000349d8 in _start () at ../../gcc-4.3.3/gcc/config/sparc/sol2-c1.asm:108
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40024
Old GCC at OpenCSW is the problem I'm trying to fix in the first place (PPL is a dependency), so I promise to rebuild PPL with the new GCC once I manage to build it. But I need to find a way out of the vicious circle, either make the tests pass, or establish that the failures are harmless.
Is there another way of getting the list of failed functions?
Maciej

On 08/11/11 12:23, Maciej Bliziński wrote:
But I need to find a way out of the vicious circle, either make the tests pass, or establish that the failures are harmless.
As far as I know, GCC does not use the functionality exercised in those test programs.
Is there another way of getting the list of failed functions?
Perhaps you single-step the program with gdb. Success,
Roberto
participants (2)
-
Maciej Bliziński
-
Roberto Bagnara