Menu

#131 GCC & Red Hat Linux: internal test hangs

1.10.2
open
nobody
5
2004-11-16
2004-10-05
Anonymous
No

I am running
- cppunit 1.10.2
- Scientific Linux SL release 3.0.1 (SL)
That shuold be fully equivalent to RH Enterprise 3.0.1
- gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-39)

With this combination of cppunit, gcc and OS the test

cppunittestmain

hangs forever with 100% cpu consumption after the output:

..............
TestResultTest::testConstructor : OK
TestResultTest::testStop : OK
TestResultTest::testAddError

Checking with the debugger, the backtrace is:

#0 0xb742aabb in _int_malloc () from /lib/i686/libc.so.6
#1 0xb7429911 in malloc () from /lib/i686/libc.so.6
#2 0xb75a882e in operator new(unsigned) () from
/usr/lib/libstdc++.so.5
#3 0xb7594b13 in std::__default_alloc_template<true,
0>::allocate(unsigned) () from /usr/lib/libstdc++.so.5
#4 0x0805d30a in std::_Deque_base<std::string,
std::allocator<std::string>
>::_M_create_nodes(std::string**, std::string**)
(this=0xbfffbed4, __nstart=0x810fb24,
__nfinish=0x810fb28) at stl_alloc.h:238
#5 0x0805d048 in std::_Deque_base<std::string,
std::allocator<std::string>
>::_M_initialize_map(unsigned) (this=0xbfffbed4,
__num_elements=0) at stl_deque.h:479
#6 0x080c218d in Message (this=0xbfffbed0,
shortDescription=@0xbfffbec0, detail1=@0xbfffbf50) at
stl_deque.h:430
#7 0x080be3c6 in CppUnit::Asserter::failIf(bool,
std::string, CppUnit::SourceLine const&)
(shouldFail=false, sourceLine=@0xbfffbf80) at
stl_alloc.h:664
#8 0x08060c15 in
MockTestListener::addFailure(CppUnit::TestFailure
const&) (this=0x8110428, failure=@0xbfffc020) at
basic_string.h:952
#9 0x080d1813 in
CppUnit::TestResult::addFailure(CppUnit::TestFailure
const&) (this=0x810e718, failure=@0xbfffc020) at
stl_deque.h:130
#10 0x080d1738 in
CppUnit::TestResult::addError(CppUnit::Test*,
CppUnit::Exception*) (this=0x810e718, test=0x8110548,
e=0x810e7a8) at TestResult.cpp:42
#11 0x08097d91 in TestResultTest::testAddError()
(this=0x810bd20) at TestResultTest.cpp:69
#12 0x0809cfab in
CppUnit::TestCaller<TestResultTest>::runTest()
(this=0xb74f0ce4) at TestCaller.h:166
........

Same tests using RH-9 and gcc 3.3 work fine.

Any idea?

Best regards,

Gianluca Chiozzi
gchiozzi@eso.org

Discussion

  • Baptiste Lepilleur

    • summary: internal test hangs --> Gcc & Red Hat Linux: internal test hangs
     
  • Baptiste Lepilleur

    Logged In: YES
    user_id=196852

    This issue seems to be specific to Red Hat + gcc (I had
    another user reporting an issue on this specific test case
    and he was on the same platform, though for him it cored).

    I can't reproduce the bug on my system (Suse 9.0 & gcc 3.3.1).

    I couldn't find anything odd by stepping through the test
    with the debugger. So it's likely a platform specific bug
    and you'll need to step through with the debugger to figure
    out where it's going wrong (that test is really simple).
    There still the possibility that it's a really tricky bug,
    but it's odd that it is only triggered on that platform.

    Baptiste.

     
  • Baptiste Lepilleur

    • summary: Gcc & Red Hat Linux: internal test hangs --> GCC & Red Hat Linux: internal test hangs
     
  • JWheeler

    JWheeler - 2005-01-18

    Logged In: YES
    user_id=418962

    I experience this problem, i.e., hangs with 100% cpu
    utilization, with cppunit 1.10.2 on a machine running a fully
    up to date copy of RH WS 3.

    The only fix I have found to date is to change the line that
    sets CPPFLAGS in the Makefile in examples/cppunittest/ to
    remove the optimization flag -O2. Using optimization flag -O1
    also causes the hang.

    I will post if I find any better fix.

    Regards,

    JWheel

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.