Bug 402511 - ustr doesn't pass testsuite on alpha
Summary: ustr doesn't pass testsuite on alpha
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ustr
Version: 8
Hardware: alpha
OS: Linux
low
low
Target Milestone: ---
Assignee: James Antill
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-28 10:52 UTC by Oliver Falk
Modified: 2008-06-06 09:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-06-06 09:32:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
build.log from ustr with -O0 for both compilation and make check (79.48 KB, text/plain)
2007-12-03 09:29 UTC, Oliver Falk
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 36004 0 None None None Never

Description Oliver Falk 2007-11-28 10:52:58 UTC
I have no clue what's going on with ustr, but I need to fix it, since it's a BR
for libsemanage.

If I take the untouched specfile it compiles fine, but never gets trough this:
+ make check HIDE= DBG_ONLY_BAD_POLICIES_HAVE_THIS_EMPTY_CFLAGS=
make[1]: Entering directory `/home/oliver/cvs/F-8/ustr/ustr-1.0.2'
cat T/tst_0_sizes.c T/ctst_0_sizes.c > tst_0_sizes.c
echo Compiling: tst_0_sizes.o
Compiling: tst_0_sizes.o
cc -O2 -g -W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast
-Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs
-Wno-format-zero-length -Wformat-nonliteral -Wformat-security   
-DUSTR_CONF_INCLUDE_CODEONLY_HEADERS=1 -DUSTR_CONF_REF_BYTES=4 -o tst_0_sizes.o
-c tst_0_sizes.c

->
[oliver@gosa ustr]$ ps -ef | grep -i tst
oliver    9750  9741  0  1970 pts/10   00:00:00 cc -O2 -g -W -Wall -Wundef
-Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -Wno-format-zero-length
-Wformat-nonliteral -Wformat-security -DUSTR_CONF_INCLUDE_CODEONLY_HEADERS=1
-DUSTR_CONF_REF_BYTES=4 -o tst_0_sizes.o -c tst_0_sizes.c
oliver    9783  9750  0  1970 pts/10   00:00:00 /usr/bin/cc -O2 -g -W -Wall
-Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align
-Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -Wno-format-zero-length
-Wformat-nonliteral -Wformat-security -DUSTR_CONF_INCLUDE_CODEONLY_HEADERS=1
-DUSTR_CONF_REF_BYTES=4 -c -o
/home/oliver/.ccache/tmp.hash.gosa.linux-kernel.at.9750.o
/home/oliver/.ccache/tst_0_size.tmp.gosa.linux-kernel.at.9750.i
oliver    9784  9783  0  1970 pts/10   00:00:46
/usr/libexec/gcc/alpha-redhat-linux/4.1.2/cc1 -fpreprocessed
/home/oliver/.ccache/tst_0_size.tmp.gosa.linux-kernel.at.9750.i -quiet -dumpbase
tst_0_size.tmp.gosa.linux-kernel.at.9750.i -auxbase-strip
/home/oliver/.ccache/tmp.hash.gosa.linux-kernel.at.9750.o -g -O2 -W -Wall
-Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align
-Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -Wno-format-zero-length
-Wformat-nonliteral -Wformat-security -o /tmp/ccUb5mwB.s
oliver   10535  8840  0  1970 pts/3    00:00:00 grep -i tst
[oliver@gosa ustr]$ pstree -p 9750
cc(9750)───cc(9783)───cc1(9784)
[oliver@gosa ustr]$ strace -f -p 9750
Process 9750 attached - interrupt to quit
wait4(9783,  <unfinished ...>
Process 9750 detached
[oliver@gosa ustr]$ strace -f -p 9783
Process 9783 attached - interrupt to quit
wait4(9784,  <unfinished ...>
Process 9783 detached
[oliver@gosa ustr]$ strace -f -p 9784
Process 9784 attached - interrupt to quit
<nothing ever happens>



If I change the specfile (%define broken_fed_dbg_opts 0) then it gets further
but spots the following:
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 18872 Aborted                 ./$tst
FAIL: tst_0_sizes
PASS: tst_0_manual
ctst_0_cntl: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 18881 Aborted                 ./$tst
FAIL: ctst_0_cntl
PASS: otst_0_sizes
PASS: otst_0_manual
PASS: octst_0_cntl
PASS: tst_0_nothing
PASS: ctst_0_nothing
PASS: otst_0_nothing
PASS: octst_0_nothing
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 18908 Aborted                 ./$tst
FAIL: tst_1_basic
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 18913 Aborted                 ./$tst
FAIL: tst_2_small
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 18918 Aborted                 ./$tst
FAIL: tst_3_medium
ctst_3_medium: ustr-main-code.h:605: ustr_init_alloc: Assertion
`ustr_owner(ret)' failed.
/bin/sh: line 3: 18923 Aborted                 ./$tst
FAIL: ctst_3_medium
PASS: otst_1_basic
PASS: otst_2_small
 -=> ASSERT (ustr_realloc(&s2, 209)) failed in (tst) from 211 otst_3_medium.c.
/bin/sh: line 3: 18934 Aborted                 ./$tst
FAIL: otst_3_medium
 -=> ASSERT (ustr_realloc(&s2, 209)) failed in (tst) from 207 octst_3_medium.c.
/bin/sh: line 3: 18939 Aborted                 ./$tst
FAIL: octst_3_medium
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 18944 Aborted                 ./$tst
FAIL: tst_4_grow
ctst_4_grow: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 18949 Aborted                 ./$tst
FAIL: ctst_4_grow
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 18954 Aborted                 ./$tst
FAIL: tst_5_shrink
ctst_5_shrink: ustr-main-code.h:605: ustr_init_alloc: Assertion
`ustr_owner(ret)' failed.
/bin/sh: line 3: 18959 Aborted                 ./$tst
FAIL: ctst_5_shrink
PASS: otst_4_grow
PASS: octst_4_grow
 -=> ASSERT (ustr_owner(s4)) failed in (tst) from 99 otst_5_shrink.c.
/bin/sh: line 3: 18970 Aborted                 ./$tst
FAIL: otst_5_shrink
 -=> ASSERT (ustr_owner(s4)) failed in (tst) from 94 octst_5_shrink.c.
/bin/sh: line 3: 18975 Aborted                 ./$tst
FAIL: octst_5_shrink
PASS: tst_6_tiny
PASS: otst_6_tiny
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 18986 Aborted                 ./$tst
FAIL: tst_7_auto
ctst_7_auto: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 18991 Aborted                 ./$tst
FAIL: ctst_7_auto
PASS: otst_7_auto
PASS: octst_7_auto
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 19002 Aborted                 ./$tst
FAIL: tst_8_spn
ctst_8_spn: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 19007 Aborted                 ./$tst
FAIL: ctst_8_spn
PASS: otst_8_spn
PASS: octst_8_spn
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 19018 Aborted                 ./$tst
FAIL: tst_9_ins
ctst_9_ins: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 19023 Aborted                 ./$tst
FAIL: ctst_9_ins
PASS: otst_9_ins
PASS: octst_9_ins
PASS: tst_10_b
ctst_10_b: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 19037 Aborted                 ./$tst
FAIL: ctst_10_b
PASS: otst_10_b
PASS: octst_10_b
PASS: tst_11_io
ctst_11_io: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 19051 Aborted                 ./$tst
FAIL: ctst_11_io
PASS: otst_11_io
PASS: octst_11_io
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 19062 Aborted                 ./$tst
FAIL: tst_12_fmt
ctst_12_fmt: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 19067 Aborted                 ./$tst
FAIL: ctst_12_fmt
PASS: otst_12_fmt
 -=> ASSERT (ustrp_cmp_eq(sp1, ((struct Ustrp *) "\x01" "\x1" "y" ""))) failed
in (tst) from 106 octst_12_fmt.c.
/bin/sh: line 3: 19075 Aborted                 ./$tst
FAIL: octst_12_fmt
PASS: tst_13_utf8
ctst_13_utf8: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 19083 Aborted                 ./$tst
FAIL: ctst_13_utf8
PASS: otst_13_utf8
 -=> ASSERT (ustrp_owner(sp2)) failed in (tst) from 308 octst_13_utf8.c.
/bin/sh: line 3: 19091 Aborted                 ./$tst
FAIL: octst_13_utf8
PASS: tst_14_cmp
ctst_14_cmp: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 19099 Aborted                 ./$tst
FAIL: ctst_14_cmp
PASS: otst_14_cmp
PASS: octst_14_cmp
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 19110 Aborted                 ./$tst
FAIL: tst_15_enomem
ctst_15_enomem: ustr-main-code.h:605: ustr_init_alloc: Assertion
`ustr_owner(ret)' failed.
/bin/sh: line 3: 19115 Aborted                 ./$tst
FAIL: ctst_15_enomem
 -=> ASSERT (ustrp_setf_enomem_clr(sp1)) failed in (tst) from 154 otst_15_enomem.c.
/bin/sh: line 3: 19120 Aborted                 ./$tst
FAIL: otst_15_enomem
 -=> ASSERT (!ustrp_enomem(sp1)) failed in (tst) from 132 octst_15_enomem.c.
/bin/sh: line 3: 19125 Aborted                 ./$tst
FAIL: octst_15_enomem
PASS: tst_16_parse
ctst_16_parse: ustr-main-code.h:605: ustr_init_alloc: Assertion
`ustr_owner(ret)' failed.
/bin/sh: line 3: 19133 Aborted                 ./$tst
FAIL: ctst_16_parse
PASS: otst_16_parse
PASS: octst_16_parse
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 19144 Aborted                 ./$tst
FAIL: tst_17_sub
ctst_17_sub: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 19149 Aborted                 ./$tst
FAIL: ctst_17_sub
PASS: otst_17_sub
PASS: octst_17_sub
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 19160 Aborted                 ./$tst
FAIL: tst_18_split
ctst_18_split: ustr-main-code.h:605: ustr_init_alloc: Assertion
`ustr_owner(ret)' failed.
/bin/sh: line 3: 19165 Aborted                 ./$tst
FAIL: ctst_18_split
PASS: otst_18_split
PASS: octst_18_split
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 19176 Aborted                 ./$tst
FAIL: tst_98_pool
ctst_98_pool: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 19181 Aborted                 ./$tst
FAIL: ctst_98_pool
 -=> ASSERT (ustrp_owner(spa)) failed in (tst) from 78 otst_98_pool.c.
/bin/sh: line 3: 19186 Aborted                 ./$tst
FAIL: otst_98_pool
 -=> ASSERT (ustrp_owner(spa)) failed in (tst) from 75 octst_98_pool.c.
/bin/sh: line 3: 19191 Aborted                 ./$tst
FAIL: octst_98_pool
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 19196 Aborted                 ./$tst
FAIL: tst_99_64bit
ctst_99_64bit: ustr-main-code.h:605: ustr_init_alloc: Assertion
`ustr_owner(ret)' failed.
/bin/sh: line 3: 19201 Aborted                 ./$tst
FAIL: ctst_99_64bit
PASS: otst_99_64bit
PASS: octst_99_64bit
==============================
43 of 84 tests failed
Please report to james
==============================
make[1]: *** [check] Error 1

Comment 1 James Antill 2007-11-28 16:10:29 UTC
> If I take the untouched specfile it compiles fine, but never gets trough this:

make[1]: Entering directory `/home/oliver/cvs/F-8/ustr/ustr-1.0.2'
[...]
Compiling: tst_0_sizes.o
cc -O2 -g -W -Wall -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast
-Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -Wnested-externs
-Wno-format-zero-length -Wformat-nonliteral -Wformat-security   
-DUSTR_CONF_INCLUDE_CODEONLY_HEADERS=1 -DUSTR_CONF_REF_BYTES=4 -o tst_0_sizes.o
-c tst_0_sizes.c

...as far as I can tell this is a GCC bug, I've seen it on older Solaris/Sparc
builds too. What version of GCC are you using, 4.1.2?

 I think the problem is with the tests that include a "lot" of inline code
(tst_*.c), and GCC gets confused at some point and loops forever. One point
worth noting is that changing the %define here just makes tst_0_sizes.c etc. be
compiled with -O1 instead of -O2 ... so I assume it's some optimization pass
enabled at -O2 that is broken.
 Jackub etc. would probably easily be able to tell you more / debug / fix it. 


> If I change the specfile (%define broken_fed_dbg_opts 0) then it gets further
> but spots the following:
 -=> ASSERT (ustr_owner(ret)) failed in (ustr_init_alloc) from 605 ustr-main-code.h.
/bin/sh: line 3: 18872 Aborted      
ctst_0_cntl: ustr-main-code.h:605: ustr_init_alloc: Assertion `ustr_owner(ret)'
failed.
/bin/sh: line 3: 18881 Aborted                 ./$tst

...so the above implies that something very bad is happening (the assert
basically does like: "x = 4", [...] assert(x == 4);
 Esp. after the above, my first instinct would be to blame the inline
optimization. You could try compiling it all with "make CFLAGS=-O0" and the
%define in fedora mode, which should give us an answer to that.


Comment 2 Oliver Falk 2007-12-03 09:29:17 UTC
Created attachment 275501 [details]
build.log from ustr with -O0 for both compilation and make check

Comment 3 James Antill 2007-12-03 15:16:07 UTC
 Well, that didn't help, bummer.
 You could try compiling with -DUSTR_CONF_COMPILE_USE_INLINE=0 ... which isn't
that well tested (my bad), but should remove all uses of inline in the failing
test cases.



Note You need to log in before you can comment on or make changes to this bug.