Massive Number of Test Failures

I am seeing a whole lot of failures in the tests on trunk. From discussions
with Chris and others, I should not be seeing this.

Here's a typical case:

[x86_64-off-opt]: Core was generated by `Output/simple_throw.cbe'.
[x86_64-off-opt]: Program terminated with signal 6, Aborted.
[x86_64-off-opt]: #0 0x00002b0620792b95 in raise () from /lib64/libc.so.6
[x86_64-off-opt]: #0 0x00002b0620792b95 in raise () from /lib64/libc.so.6
[x86_64-off-opt]: #1 0x00002b0620793f90 in abort () from /lib64/libc.so.6
[x86_64-off-opt]: #2 0x00002b0620621af4 in
__gnu_cxx::__verbose_terminate_handler () from /usr/lib64/libstdc++.so.6
[x86_64-off-opt]: #3 0x00002b062061fc36 in ?? () from
/usr/lib64/libstdc++.so.6
[x86_64-off-opt]: #4 0x00002b062061fc63 in std::terminate () from
/usr/lib64/libstdc++.so.6
[x86_64-off-opt]: #5 0x00002b062061fd4a in __cxa_throw () from
/usr/lib64/libstdc++.so.6
[x86_64-off-opt]: #6 0x0000000000400603 in main ()
[x86_64-off-opt]: /ptmp/dag/llvm-project.official/llvm/trunk/projects/test-
suite/DiffOutput.sh "/ptmp/dag/build.llvm.trunk.official.opt/x86_64-unknown-
linux-gnu/Release/bin/fpcmp " cbe simple_throw
[x86_64-off-opt]: ******************** TEST (cbe) 'simple_throw' FAILED!

I am seeing a whole lot of failures in the tests on trunk. From discussions
with Chris and others, I should not be seeing this.

Does 'make check-lit' pass for you in llvm/test?

-Chris

Nope. In fact I am seeing more failures in debug mode now.

But what does "pass" mean?

[x86_64-off-opt]: Testing Time: 127.55s
[x86_64-off-opt]: Expected Passes : 5006
[x86_64-off-opt]: Expected Failures : 33
[x86_64-off-opt]: Unsupported Tests : 66

Is that really passing? Even though I see a bunch of "FAIL:" lines in the
make output? Not 33 of them, however.

                                            -Dave

I am seeing a whole lot of failures in the tests on trunk. From discussions
with Chris and others, I should not be seeing this.

Here's a typical case:

[x86_64-off-opt]: Core was generated by `Output/simple_throw.cbe'.
[x86_64-off-opt]: Program terminated with signal 6, Aborted.
[x86_64-off-opt]: #0 0x00002b0620792b95 in raise () from /lib64/libc.so.6
[x86_64-off-opt]: #0 0x00002b0620792b95 in raise () from /lib64/libc.so.6
[x86_64-off-opt]: #1 0x00002b0620793f90 in abort () from /lib64/libc.so.6
[x86_64-off-opt]: #2 0x00002b0620621af4 in
__gnu_cxx::__verbose_terminate_handler () from /usr/lib64/libstdc++.so.6
[x86_64-off-opt]: #3 0x00002b062061fc36 in ?? () from
/usr/lib64/libstdc++.so.6
[x86_64-off-opt]: #4 0x00002b062061fc63 in std::terminate () from
/usr/lib64/libstdc++.so.6
[x86_64-off-opt]: #5 0x00002b062061fd4a in __cxa_throw () from
/usr/lib64/libstdc++.so.6
[x86_64-off-opt]: #6 0x0000000000400603 in main ()
[x86_64-off-opt]: /ptmp/dag/llvm-project.official/llvm/trunk/projects/test-
suite/DiffOutput.sh "/ptmp/dag/build.llvm.trunk.official.opt/x86_64-unknown-
linux-gnu/Release/bin/fpcmp " cbe simple_throw
[x86_64-off-opt]: ******************** TEST (cbe) 'simple_throw' FAILED!
********************
[x86_64-off-opt]: Execution Context Diff:
[x86_64-off-opt]: /ptmp/dag/build.llvm.trunk.official.opt/x86_64-unknown-
linux-gnu/Release/bin/fpcmp: FP Comparison failed, not a numeric difference
between 'A' and 't'
[x86_64-off-opt]: ******************** TEST (cbe) 'simple_throw'

Are all the failures you see only CBE failures? And are they all EH related?
I don't think CBE ever worked with EH, for example my LLVM 2.5 tests
show a failure there.

****************************

Any idea why I would be seeing these and when others don't? Is it because the
buildbots don't build Release tools?

buildbots don't run llvm-test, the nightly testers do.

  A quick glance suggests all of these

failures in are Release mode.

I am on x86_64 Linux. Is anyone else able to reproduce a bunch of failures in
Release mode?

I am using gcc 4.4.2. Is anyone else using it successfully to build Release
tools? Possibly we have another broken gcc.

I hope not, then whats not broken? :slight_smile:

Best regards,
--Edwin

And curiously, none in Release mode. No FAIL messages anyway. I
still see this:

[x86_64-off-opt]: Expected Passes : 5006
[x86_64-off-opt]: Expected Failures : 33
[x86_64-off-opt]: Unsupported Tests : 66

[x86_64-off-dbg]: Expected Passes : 5001
[x86_64-off-dbg]: Expected Failures : 33
[x86_64-off-dbg]: Unsupported Tests : 66
[x86_64-off-dbg]: Unexpected Failures: 5

Why would changing the test harness change the result of the tests?

                                        -Dave

It's hard to know without knowing exactly what tests are failing and how.

-Chris

SDUse::setInitial should initialize List to null in your patch. You're
probably seeing random uninitialized data noise without that.
(Though valgrind wouldn't notice this because of the aggressive reuse
of allocated memory.)

Also, the replacement getOperandNo is returning the index in the
use list, rather than the index in the operand array.

Dan

Yes. David, to clarify, what do you see with a *clean checkout* with no patches in it?

-Chris

This is the clean checkout. That's what the "off" means - official.

                         -Dave

Wrong thread?

SDUse::setInitial should initialize List to null in your patch. You're
probably seeing random uninitialized data noise without that.
(Though valgrind wouldn't notice this because of the aggressive reuse
of allocated memory.)

Why isn't the default constructor called? I would have expected that
to be invoked for every new SDUse.

I will fix this.

Also, the replacement getOperandNo is returning the index in the
use list, rather than the index in the operand array.

Thanks. I don't have the source right in front of me. I'll take a look
when I can.

                                   -Dave

Here's a fixed patch. It shows the same iterator errors I'm seeing
with 2.5. Run make-check with a Debug+Checks compiler. I
will file a bug once I have a proper internet connection. :-/

                            -Dave

sdxdebug.patch (7.67 KB)

Hmm, not the same exact error we're seeing. This one is in
BlackfinISelDAGToDAG.cpp. Ours is in SelectionDAG::ReplaceAllUsesOf.

But this is still a problem, I believe. The Blackfin people should look at
it.

I will keep investigating.

                                            -Dave

I filed PR6434 for the Blackfin issue. Note that there is no Blackfin codegen
component in Bugzilla. We probably want one.

                                        -Dave

I added components for MicroBlaze and blackfin.