<div dir="ltr">Odd problem of a simple program not exiting at end of main.<br><br><div><br>    ACE VERSION: 6.1.0<br><br>    HOST MACHINE and OPERATING SYSTEM:<br>        If on Windows based OS's, which version of WINSOCK do you<br>        use?:<br>Linux eoms1 4.5.6-200.fc23.x86_64 #1 SMP Wed Jun 1 21:28:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux<br><br>    TARGET MACHINE and OPERATING SYSTEM, if different from HOST:<br>    COMPILER NAME AND VERSION (AND PATCHLEVEL):<br>g++ (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)<br><br>    THE $ACE_ROOT/ace/config.h FILE:<br>#include "ace/config-linux.h" <br><br>    THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE:<br>include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU<br><br>    CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features<br>    (used by MPC when you generate your own makefiles):<br><br>    AREA/CLASS/EXAMPLE AFFECTED:<br>The following tests<br>Error: Bug_2610_Regression_Test  FAILED with exit status 1 after Time:1s<br>Error: Bug_2772_Regression_Test FAILED (time out after Time:316s)<br>ERROR: <Bug_3744_Regression_Test> failed: No such file or directory<br>Error: Bug_3744_Regression_Test  FAILED with exit status 255 after Time:1s<br>Error: Bug_3911_Regression_Test  FAILED with exit status 255 after Time:1s<br>Error: MT_SOCK_Test FAILED (time out after Time:315s)<br>Error: NonBlocking_Conn_Test FAILED (time out after Time:316s)<br>Error: Reactor_Fairness_Test  FAILED with exit status 1 after Time:92s<br><br><br>    DOES THE PROBLEM AFFECT:<br>        COMPILATION?<br>        LINKING?<br>            On Unix systems, did you run make realclean first?<br>        EXECUTION?<br>    Execution.<br>        OTHER (please specify)?<br><br><br>    SYNOPSIS:<br>Main fails to exit program.<br><br>    DESCRIPTION:<br>Had to upgrade my Fedora to 23 with a fresh install.<br>I had a simple Ace_Test example to enqueue a string and have svc()<br>dequeue the message block and string 10 times.<br>Some times the program exits at the end of the main. SOmetimes it<br>doesnt.<br><br>Quite often, the program doesnt stop and just hangs with the<br>following stack trace:<br>0x00007ffff763b9e8 in pthread_cond_destroy@@GLIBC_2.3.2 () from /lib64/libpthread.so.0<br>(gdb) where<br>#0  0x00007ffff763b9e8 in pthread_cond_destroy@@GLIBC_2.3.2 () from /lib64/libpthread.so.0<br>#1  0x00007ffff7b1c3b0 in ACE_OS::cond_destroy (cv=0x621570) at /home/downloads/ACE_wrappers/ace/OS_NS_Thread.inl:224<br>#2  ACE_Condition_Thread_Mutex::remove (this=0x621570) at /home/downloads/ACE_wrappers/ace/Condition_Thread_Mutex.inl:36<br>#3  ACE_Condition_Thread_Mutex::~ACE_Condition_Thread_Mutex (this=0x621570, __in_chrg=<optimized out>)<br>    at Condition_Thread_Mutex.cpp:79<br>#4  0x0000000000403667 in ACE_Message_Queue<ACE_MT_SYNCH>::~ACE_Message_Queue (this=0x6214f0, __in_chrg=<optimized out>)<br>    at /home/3plibs/ACE-6.1.0/include/ace/Message_Queue_T.cpp:1063<br>#5  0x00000000004036b2 in ACE_Message_Queue<ACE_MT_SYNCH>::~ACE_Message_Queue (this=0x6214f0, __in_chrg=<optimized out>)<br>    at /home/3plibs/ACE-6.1.0/include/ace/Message_Queue_T.cpp:1063<br>#6  0x000000000040333d in ACE_Task<ACE_MT_SYNCH>::~ACE_Task (this=0x7fffffffdae0, __in_chrg=<optimized out>)<br>    at /home/3plibs/ACE-6.1.0/include/ace/Task_T.cpp:72<br>#7  0x0000000000403221 in TestAceTask::~TestAceTask (this=0x7fffffffdae0, __in_chrg=<optimized out>) at testAceTask.cpp:68<br>#8  0x0000000000402f3c in main (argc=1, argv=0x7fffffffdce8) at testAceTask.cpp:129<br><br><br><br><br>    REPEAT BY:<br>int TestAceTask::svc() {<br>   std::cout <<  _PFUNC_ << ":" << std::endl;<br>   ACE_Message_Block* mb = 0;<br>   while (getq(mb) != -1)<br>   {<br>      if (mb->size() != 0)<br>      {<br>         const char* pc = (char *)mb->rd_ptr();<br>     std::cout << "str=" << pc << std::endl;<br>         mb->release();<br>      }<br>   }<br>   return -1;<br>}<br><br><br>    SAMPLE FIX/WORKAROUND:<br>NA<br><br><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">-- <br>Sunil Matta<br>973.568.0990<br>Equity/Options Trading Systems<br></div></div>
</div></div>