[Bug 834] New: Unit tests fail on macosx

http://bugs.orocos.org/show_bug.cgi?id=834

Summary: Unit tests fail on macosx
Product: Toolchain
Version: 2.3.0
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: kiwi [dot] net [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Also fail sometimes on Ubuntu. Haven't investigated if is same cause.

The problem only occurs with release builds. Tried MacPorts and a manually
built boost - both v1.42.0 - on Mac OS X 10.6.6. A manually built v1.42.0 did
not have any problems. Possibly a boost problem then ...

(gdb) r
Starting program:
/opt/sw/orocos/toolchain-next/build/rtt-custom-boost/tests/list-test 
Reading symbols for shared libraries .+++++++++++........................ done
Running 2 test cases...
 
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
boost::unit_test::framework::get (id=65536, t=boost::unit_test::tut_case) at
framework.ipp:388
388        if( (res->p_type & t) == 0 )
(gdb) bt
#0  boost::unit_test::framework::get (id=65536, t=boost::unit_test::tut_case)
at framework.ipp:388
#1  0x0000000103b3c69a in get<boost::unit_test::test_case> [inlined] () at
/Users/sroderick/software/boost/boost_1_42_0/boost/test/framework.hpp:232
#2  0x0000000103b3c69a in traverse_test_tree [inlined] () at
/Users/sroderick/software/boost/boost_1_42_0/boost/test/impl/unit_test_suite.ipp:232
#3  0x0000000103b3c69a in boost::unit_test::traverse_test_tree
(suite=@0x103d08d00, V=@0x7fff5fbfeb70) at unit_test_suite.ipp:207
#4  0x0000000103b05c6b in
boost::unit_test::results_collector_t::test_unit_finish (this=<value
temporarily unavailable, due to optimizations>, tu=@0x103d08d08) at
unit_test_suite_impl.hpp:200
#5  0x000000010006e575 in boost::unit_test::framework_impl::test_suite_finish
(this=0x1000fb380, ts=@0x103d08d00) at framework.ipp:192
#6  0x0000000100028390 in boost::unit_test::traverse_test_tree
(suite=@0x103d08d00, V=@0x1000fb380) at unit_test_suite.ipp:223
#7  0x0000000100028480 in boost::unit_test::traverse_test_tree (id=2,
V=@0x1000fb380) at unit_test_suite.ipp:234
#8  0x00000001000280be in boost::unit_test::traverse_test_tree
(suite=@0x103d091d0, V=@0x1000fb380) at unit_test_suite.ipp:207
#9  0x0000000100028480 in boost::unit_test::traverse_test_tree (id=1,
V=@0x1000fb380) at unit_test_suite.ipp:234
#10 0x000000010002f6aa in boost::unit_test::framework::run (id=1,
continue_test=true) at framework.ipp:442
#11 0x000000010002fa0d in boost::unit_test::unit_test_main
(init_func=0x10001cdaa <init_unit_test_suite(int, char**)>, argc=1,
argv=0x7fff5fbff238) at unit_test_main.ipp:185
#12 0x000000010002fc96 in main (argc=1, argv=0x7fff5fbff238) at
unit_test_main.ipp:237
(gdb) 

Ruben Smits's picture

[Bug 834] Unit tests fail on macosx

Ruben Smits's picture

[Bug 834] Unit tests fail on macosx

[Bug 834] Unit tests fail on macosx

http://bugs.orocos.org/show_bug.cgi?id=834

--- Comment #1 from S Roderick <kiwi [dot] net [..] ...> 2011-03-07 01:44:57 CET ---
I meant to say "Tried MacPorts and manually built boost - both RELEASE v1.42.0
- on Mac OS X 10.6.6. A manually built DEBUG v1.42.0 did not have any problems"

[Bug 834] Unit tests fail on macosx

On Mar 6, 2011, at 19:44 , S Roderick wrote:

>
> http://bugs.orocos.org/show_bug.cgi?id=834
>
> --- Comment #1 from S Roderick <kiwi [dot] net [..] ...> 2011-03-07 01:44:57 CET ---
> I meant to say "Tried MacPorts and manually built boost - both RELEASE v1.42.0
> - on Mac OS X 10.6.6. A manually built DEBUG v1.42.0 did not have any problems"

Bug remains in MacPorts boost v1.45.0 release build. And again, works fine with debug build.

[Bug 834] Unit tests fail on macosx

On Monday 07 March 2011 02:33:50 S Roderick wrote:
> On Mar 6, 2011, at 19:44 , S Roderick wrote:
> > http://bugs.orocos.org/show_bug.cgi?id=834
> >
> > --- Comment #1 from S Roderick <kiwi [dot] net [..] ...> 2011-03-07 01:44:57 CET
> > --- I meant to say "Tried MacPorts and manually built boost - both
> > RELEASE v1.42.0 - on Mac OS X 10.6.6. A manually built DEBUG v1.42.0 did
> > not have any problems"
>
> Bug remains in MacPorts boost v1.45.0 release build. And again, works fine
> with debug build.

I think this belongs on the boost-users mailing list. something got eliminated
(due to NDEBUG or the compiler optimizing). They'll have to fix it or work
around it.

Peter

[Bug 834] Unit tests fail on macosx

On Mar 6, 2011, at 20:33 , S Roderick wrote:

> On Mar 6, 2011, at 19:44 , S Roderick wrote:
>
>>
>> http://bugs.orocos.org/show_bug.cgi?id=834
>>
>> --- Comment #1 from S Roderick <kiwi [dot] net [..] ...> 2011-03-07 01:44:57 CET ---
>> I meant to say "Tried MacPorts and manually built boost - both RELEASE v1.42.0
>> - on Mac OS X 10.6.6. A manually built DEBUG v1.42.0 did not have any problems"
>
> Bug remains in MacPorts boost v1.45.0 release build. And again, works fine with debug build.

Slightly off topic, but I have noticed several times that ctest computes a test timeout of about 9.9998e+06 (seconds). One of my nightly builds just locked up for hours, due to a unit test not completing. Perhaps we should force ctest to a fixed, but reasonable timeout? Even 5 minutes should be adequate for any one of our unit tests.

S