Results 1 to 8 of 8

Thread: Ice for C++: Problem running tests after building for Fedora Core 5

  1. #1
    bartley is offline Registered User
    Name: Chris Bartley
    Organization: Carnegie Mellon University Robotics Institute
    Project: The Telepresence Robot Kit (TeRK)
    Join Date
    Dec 2005
    Posts
    52

    Question Ice for C++: Problem running tests after building for Fedora Core 5

    Hi,

    I'm trying to get Ice for C++ (v 3.0.1) working under Fedora Core 5 (actually, Ice for Java is my real goal, but I realize that I need to build Ice for C++ first). It appears to build ok, but I get the following error when trying to run the tests:

    Code:
    # make test
    
    *** running tests in ./test/IceUtil/thread
    starting client... ok
    running mutex test... ../../../include/IceUtil/Mutex.h:318: IceUtil::ThreadSyscallException:
    thread syscall exception: Resource deadlock avoided failed
    test mutex failed
    test in ./test/IceUtil/thread failed with exit status 256
    Any suggestions? Here's my system info:

    Kernel: 2.6.16-1.2080_FC5smp #1 SMP Tue Mar 28 03:55:15 EST 2006
    bzip2: Version: 1.0.3, Release: 2.2.1
    db4: Version: 4.3.29, Release: 3.fc5
    expat: Version: 1.95.8, Release: 8.2
    ncurses: Version: 5.5, Release: 19
    openssl: Version: 0.9.8a, Release: 5.2
    readline: Version: 5.0, Release: 3.2.1

    thanks heaps,

    chris

  2. #2
    alexm is offline Registered User
    Name: Eskinder Alex Mesfin
    Organization: Medtronic, Inc.
    Project: www.medtronic.com
    Join Date
    Apr 2006
    Location
    In Minneapolis, Mn
    Posts
    16
    Acording to Fedora project, Fedora project is strictly NPTL (thread) so Your problem might be related to that.
    Alex Mesfin
    Medtronic, Inc.
    www.medtronic.com

  3. #3
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    It looks like something changed in the Fedora Core 5 pthread implementation. I suspect pthread_mutex_trylock is failing with EDEADLK if the thread already acquired the mutex like for the FreeBSD implementation. The best way to figure this out would be trace where the test is failing. Are other tests working?

    Also, if you look at the code of the test which is failing (test/IceUtil/MutexTest.cpp), you'll see that there's already a #ifdef __FreeBSD__, if my suspicion is correct this #ifdef would need to be changed to include Linux.

    Cheers,
    Benoit.

  4. #4
    bartley is offline Registered User
    Name: Chris Bartley
    Organization: Carnegie Mellon University Robotics Institute
    Project: The Telepresence Robot Kit (TeRK)
    Join Date
    Dec 2005
    Posts
    52
    Are other tests working?
    Yep, all the other tests work fine (that is, all the tests which aren't in the test/IceUtil/thread directory...there might be some in test/IceUtil/thread that work, but I don't know yet since it dies on the first one).

    I'll test your suggestion with the #ifdef in the morning.

    thanks for your help,

    chris
    Last edited by bartley; 04-14-2006 at 12:32 AM.

  5. #5
    bartley is offline Registered User
    Name: Chris Bartley
    Organization: Carnegie Mellon University Robotics Institute
    Project: The Telepresence Robot Kit (TeRK)
    Join Date
    Dec 2005
    Posts
    52
    More info: The only tests in test/IceUtil/thread which don't work are MutexTest and MonitorMutexTest. All the others are fine. I get the same error for MonitorMutexTest as I did for MutexTest.

  6. #6
    bartley is offline Registered User
    Name: Chris Bartley
    Organization: Carnegie Mellon University Robotics Institute
    Project: The Telepresence Robot Kit (TeRK)
    Join Date
    Dec 2005
    Posts
    52
    Also, if you look at the code of the test which is failing (test/IceUtil/MutexTest.cpp), you'll see that there's already a #ifdef __FreeBSD__, if my suspicion is correct this #ifdef would need to be changed to include Linux.
    Looks like your suspicion is indeed correct. Changing this line (122) in MutexTest.cpp:

    Code:
    #ifdef __FreeBSD__
    to this:

    Code:
    #if defined(__FreeBSD__) || defined(__linux)
    allows the test to complete successfully.

    What do I need to do to fix the Ice code? Or is the problem merely in the test? Sorry I'm a little clueless here.

    thanks heaps,

    chris

  7. #7
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi Chris,

    I believe fixing the test should be enough. I'll discuss this with our pthread expert once he gets back from vacation!

    This shouldn't affect the Ice code and it's unlikely to affect your code. It would affect your code only if it relied on tryAcquire() to return false if the mutex is already locked by the current thread...

    In any case, thanks for pointing this out -- this will be fixed for the next release.

    Cheers,
    Benoit.

  8. #8
    bartley is offline Registered User
    Name: Chris Bartley
    Organization: Carnegie Mellon University Robotics Institute
    Project: The Telepresence Robot Kit (TeRK)
    Join Date
    Dec 2005
    Posts
    52
    Great thanks, and thanks for all your help. I tried my code and it appears to be working fine so far [fingers crossed].

    thanks!

    chris

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Success Compiling Ice on Fedora core 4.
    By myer in forum Help Center
    Replies: 1
    Last Post: 07-28-2005, 03:26 AM
  2. Problem installing Ice 2.0 on Fedora Core 3
    By umber in forum Help Center
    Replies: 5
    Last Post: 12-03-2004, 06:12 PM
  3. Replies: 1
    Last Post: 09-06-2004, 04:38 AM
  4. Problem building Ice 1.4.0 on Fedora Linux Core 2
    By dthomson in forum Help Center
    Replies: 4
    Last Post: 05-28-2004, 11:27 AM
  5. Ice 1.2.0 RPMs (Fedora Core 1)
    By shaver in forum Patches
    Replies: 3
    Last Post: 12-01-2003, 12:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •