Results 1 to 3 of 3

Thread: IceUtil::Thread::run(): terminate called recursively Cond.cpp

  1. #1
    spsoni's Avatar
    spsoni is offline Registered User
    Name: Sury P Soni
    Organization: Next Digital
    Project: Unified Messaging Plattform for Inhouse Products
    Join Date
    Mar 2008
    Location
    Melbourne, Australia
    Posts
    40

    IceUtil::Thread::run(): terminate called recursively Cond.cpp

    Hi,

    I am using Ice 3.2.1 on FreeBSD.

    I am getting following error:

    Code:
    IceUtil::Thread::run(): uncaught exception: terminate called recursively Cond.cpp
    Backtrace is as follows:

    Code:
    #0  0x284de537 in pthread_testcancel () from /lib/libpthread.so.2
    #1  0x284cd89a in sigaction () from /lib/libpthread.so.2
    #2  0x284c788d in pthread_kill () from /lib/libpthread.so.2
    #3  0x284c7256 in raise () from /lib/libpthread.so.2
    #4  0x285a0b78 in abort () from /lib/libc.so.6
    #5  0x2843c30f in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.5
    #6  0x2844049c in __cxxabiv1::__terminate () from /usr/lib/libstdc++.so.5
    #7  0x284404d4 in std::terminate () from /usr/lib/libstdc++.so.5
    #8  0x28481d4d in __cxa_get_globals () from /usr/lib/libstdc++.so.5
    #9  0x28440346 in __cxa_current_exception_type () from /usr/lib/libstdc++.so.5
    #10 0x2843c1e6 in __gnu_cxx::__verbose_terminate_handler () from /usr/lib/libstdc++.so.5
    #11 0x2844049c in __cxxabiv1::__terminate () from /usr/lib/libstdc++.so.5
    #12 0x284404d4 in std::terminate () from /usr/lib/libstdc++.so.5
    #13 0x28481d4d in __cxa_get_globals () from /usr/lib/libstdc++.so.5
    #14 0x28440409 in __cxa_throw () from /usr/lib/libstdc++.so.5
    #15 0x282c0822 in IceUtil::Cond::Cond () from /usr/local/lib/libIceUtil.so.32
    #16 0x08051d42 in Monitor (this=0x28063fc0) at Monitor.h:78
    #17 0x08050c06 in Job (this=0x28063fc0, data=@0xbf7fcf40, type=1) at ./../src/job.cpp:10
    #18 0x08058637 in ProxyPutAdapter::run (this=0x807b340) at proxy_put_adapter.cpp:28
    #19 0x282db04d in startHook () from /usr/local/lib/libIceUtil.so.32
    #20 0x284cf3a5 in pthread_create () from /lib/libpthread.so.2
    #21 0x2858c137 in _ctx_start () from /lib/libc.so.6
    I am running few test cases on individual components of my application. Therefore, in above component, there is no Ice messaging except Monitor and Threads from IceUtil.

    The above exception is occuring when I slow down my application by printing high frequency of debug information ( cout<<" SOme debug ..."<<flush; ).

    Code snippet as follows:

    Code:
    	for(int i=1;i<=100000;i++) {
    		while(true) {
                            //Job is sub-class of IceUtil::Monitor<IceUtil::Mutex>
    			Job *data = new Job("xxx", DB_PUT);   //proxy_put_adapter.cpp:28
    			try {
                                    //Following put operation is where I print some debug information.
                                    //If I reduce the debug info frequency, exception does not occur at line 28, above.
    				smart_queue_->put(data, DB_PUT);
    				break;
    			} catch(...) {
    				continue;
    			}
    		}
    	}

    I hope, my problem is clear from this post. I can provide you will full component code, if required.

    I am not sure, but I suspect, my problem could be somewhat related to reasons similar to this post.


    Thanks.
    Last edited by spsoni; 05-13-2008 at 02:53 AM.

  2. #2
    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,

    You should catch the exception and print it out so that we can figure out why the condition variable of the IceUtil::Monitor can't be created:

    Code:
    try
    {
        Job *data = new Job("xxx", DB_PUT);
    }
    catch(const IceUtil::Exception& ex)
    {
        cerr << ex << endl;
        throw;
    }
    Is the Job object correctly released? If not, it's likely that your process is running out of system resources.

    Cheers,
    Benoit.

  3. #3
    spsoni's Avatar
    spsoni is offline Registered User
    Name: Sury P Soni
    Organization: Next Digital
    Project: Unified Messaging Plattform for Inhouse Products
    Join Date
    Mar 2008
    Location
    Melbourne, Australia
    Posts
    40
    Thanks Benoit.

    Yes, its certainly a system getting out of resource problem.

    Garbage collection fixed the problem.

    Apologise for posting message before proper investigation.

    Cheers.

    -S

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. operator! missing for IceUtil::Cond?
    By rbock in forum Help Center
    Replies: 2
    Last Post: 02-19-2010, 10:57 AM
  2. ICE3.3.1:Cond.cpp:311: error: `CLOCK_MONOTONIC'
    By zeronumber in forum Help Center
    Replies: 5
    Last Post: 12-18-2009, 04:09 AM
  3. Replies: 2
    Last Post: 07-14-2008, 11:37 AM
  4. Terminate called on Ice::FileException in IcePy
    By joshmoore in forum Bug Reports
    Replies: 4
    Last Post: 08-28-2007, 01:03 PM
  5. Thread.cpp:413: IceUtil::ThreadSyscallException
    By grahamyin in forum Help Center
    Replies: 2
    Last Post: 09-27-2005, 11:54 PM

Posting Permissions

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