[Bug libgcj/34574] New: wait() call hangs in _Jv_CondWait taking the monitor with it causing the application to hang

2007-12-24 Thread rajathf at techmahindra dot com
   }
  } catch ( InterruptedException e ) {
  }
 }


 /**
  * Called by a Worker object
  * to indicate that it has begun 
  * working on a workload.
  */
 synchronized public void workerBegin()
 {
  _activeThreads++;
  _started = true;
  notify();
 }

 /**
  * Called by a Worker object to 
  * indicate that it has completed a 
  * workload.
  */
 synchronized public void workerEnd()
 {
  _activeThreads--;
  notify();
 }

 /**
  * Called to reset this object to
  * its initial state.
  */
 synchronized public void reset()
 {
  _activeThreads = 0;
 }

}
--

compilation options used...


gcj -d . -C ThreadPool.java/* Generate Class File */
gcj -c -d . ThreadPool.java   /* Compile Java File  */
gcjh ThreadPool


gcj -d . -C env_test.java   /* Generate Class File */
gcj -c -d . env_test.java  /* Compile Java File  */
gcjh env_test


g++ -m32 -Wno-deprecated -fPIC 
-I/appl/flstr/d2/fernanr2/MutexLock/TestJVSynchronise -c
TestJVSynchronise19thDec.cc

gcj -o TestJVSynchronise19thDec.exe TestJVSynchronise19thDec.o ThreadPool.o 
env_test.o  -lstdc++


-- 
   Summary: wait() call hangs in _Jv_CondWait taking the monitor
with it causing the application to hang
   Product: gcc
   Version: 4.2.2
Status: UNCONFIRMED
  Severity: critical
      Priority: P3
         Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rajathf at techmahindra dot com
 GCC build triplet: Configured with: ./configure --
prefix=/software/gcc/4.2.2 --enab
  GCC host triplet: Thread model: posix
GCC target triplet: sparc-sun-solaris2.9


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34574



[Bug libgcj/34574] wait() call hangs in _Jv_CondWait taking the monitor with it causing the application to hang

2007-12-24 Thread rajathf at techmahindra dot com


--- Comment #1 from rajathf at techmahindra dot com  2007-12-24 18:27 
---
the pstack i got at deadlock mite help...


-  lwp# 1 / thread# 1  
 fcde58f4 lwp_park (0, 0, 0)
 fcde2b9c cond_wait_queue (1a8900, fcdf8b48, 0, 0, fcfc, fcdf8000) + d4
 fcde3358 cond_wait (1a8900, 1a8910, 0, 0, 0, 0) + 14
 fcde3394 pthread_cond_wait (1a8900, 1a8910, 0, 0, 0, 0) + 8
 fdeaf8b4 _Z12_Jv_CondWaitP23_Jv_ConditionVariable_tP11_Jv_Mutex_txi (1,
170260, 0, ffbfefe0, 0, 0) + 20c
 fdea4298 _ZN4java4lang6Object4waitEJvxi (153d10, 0, 0, 0, 0, 0) + 8c
 00012e10 _ZN4Done8waitDoneEJvv (153d10, 17ade0, 1, 0, 0, 0) + 38
 00013b28 _ZN10ThreadPool8completeEJvv (17ae28, 17ade0, 14c18, 6176, 6176,
0) + 80
 00014484 _ZN3abc27WaitForAllThreadsToCompleteEv (ffbff248, 14c18, 37340,
ff3b3a28, ffbfffcc, ff3cc4ec) + 28
 00012d54 main (1, ffbff324, ffbff32c, 2698c, 0, 0) + c0
 0001280c _start   (0, 0, 0, 0, 0, 0) + 5c
-  lwp# 2 / thread# 2  
 fcde58f4 lwp_park (0, 0, 0)
 fcde2b9c cond_wait_queue (1a, fcdf8b48, 0, 0, fcfc0200, fcdf8000) + d4
 fcde3358 cond_wait (1a, 1a8898, 0, 0, 0, 0) + 14
 fcde3394 pthread_cond_wait (1a, 1a8898, 0, 0, 0, 0) + 8
 fdeaf8b4 _Z12_Jv_CondWaitP23_Jv_ConditionVariable_tP11_Jv_Mutex_txi (1,
ff102280, 0, fcd7bdb0, 0, fcd7be74) + 20c
 fde98d68 _ZN3gnu3gcj7runtime15FinalizerThread3runEJvv (177e10, fcd7be88, 0,
fcdd172c, 5, ff101be8) + e4
 fdea7f70 _Z13_Jv_ThreadRunPN4java4lang6ThreadE (177e10, ff1a66a0, 0, ff1a6000,
ff12d474, feb3c510) + 18
 fdeaf3d4 _Z12really_startPv (fcc80, 0, fcd7bfa0, fcd7bf7c, 0, 0) + 20
 fe7dd37c GC_start_routine (12ef80, 0, 0, 0, 0, 0) + d4
 fcde57b4 _lwp_start (0, 0, 0, 0, 0, 0)
-  lwp# 3 / thread# 3  
 fcde58f4 lwp_park (0, 0, 0)
 fcde166c mutex_lock_queue (fcdf8b44, 0, 170210, fcdf8000, 0, 0) + 104
 fcde206c slow_lock (170210, fcfc0400, 0, 0, 0, 0) + 58
 fdeaf8d8 _Z12_Jv_CondWaitP23_Jv_ConditionVariable_tP11_Jv_Mutex_txi (1,
170210, 0, fcc7bbc8, 0, 0) + 230
 fdea4298 _ZN4java4lang6Object4waitEJvxi (153d00, 0, 0, 0, 80d080, d282) +
8c
 00013e8c _ZN8IBMMutex7acquireEJvv (153d00, 17ade0, a, 0, 0, 0) + 88
 000140f4 _ZN3env3runEJvv (17ade0, 26868, 1, 0, 0, 0) + 88
 000131e4 _ZN12WorkerThread3runEJvv (177cd0, fcc7be88, 0, 0, 0, ff101be8) + d0
 fdea7f70 _Z13_Jv_ThreadRunPN4java4lang6ThreadE (177cd0, ff1a66a0, 0, ff1a6000,
ff12d474, feb3c510) + 18
 fdeaf3d4 _Z12really_startPv (fcc50, 0, fcc7bfa0, fcc7bf7c, 0, 0) + 20
 fe7dd37c GC_start_routine (12ef80, 0, 0, 0, 0, 0) + d4
 fcde57b4 _lwp_start (0, 0, 0, 0, 0, 0)
-  lwp# 4 / thread# 4  
 fcde58f4 lwp_park (0, 0, 0)
 fcde166c mutex_lock_queue (fcdf8b44, 0, 170210, fcdf8000, 0, 0) + 104
 fcde206c slow_lock (170210, fcfc0600, 0, 0, 0, 0) + 58
 fdeaf8d8 _Z12_Jv_CondWaitP23_Jv_ConditionVariable_tP11_Jv_Mutex_txi (1,
170210, 0, fcb7bbc8, 0, 0) + 230
 fdea4298 _ZN4java4lang6Object4waitEJvxi (153d00, 0, 0, 0, 80a880, eb72) +
8c
 00013e8c _ZN8IBMMutex7acquireEJvv (153d00, 17ade0, a, 0, 0, 0) + 88
 000140f4 _ZN3env3runEJvv (17ade0, 26868, 1, 0, 0, 0) + 88
 000131e4 _ZN12WorkerThread3runEJvv (177c80, fcb7be88, 0, 0, 0, ff101be8) + d0
 fdea7f70 _Z13_Jv_ThreadRunPN4java4lang6ThreadE (177c80, ff1a66a0, 0, ff1a6000,
ff12d474, feb3c510) + 18
 fdeaf3d4 _Z12really_startPv (fcc40, 0, fcb7bfa0, fcb7bf7c, 0, 0) + 20
 fe7dd37c GC_start_routine (12ef80, 0, 0, 0, 0, 0) + d4
 fcde57b4 _lwp_start (0, 0, 0, 0, 0, 0)
-  lwp# 5 / thread# 5  
 fcde58f4 lwp_park (0, 0, 0)
 fcde166c mutex_lock_queue (fcdf8b44, 0, 170210, fcdf8000, 0, 0) + 104
 fcde206c slow_lock (170210, fcfc0800, 0, 0, 0, 0) + 58
 fdeaf8d8 _Z12_Jv_CondWaitP23_Jv_ConditionVariable_tP11_Jv_Mutex_txi (1,
170210, 0, fca7bbc8, 0, 0) + 230
 fdea4298 _ZN4java4lang6Object4waitEJvxi (153d00, 0, 0, 0, 808080, 1e62) + 8c
 00013e8c _ZN8IBMMutex7acquireEJvv (153d00, 17ade0, a, 0, 0, 0) + 88
 000140f4 _ZN3env3runEJvv (17ade0, 26868, 1, 0, 0, 0) + 88
 000131e4 _ZN12WorkerThread3runEJvv (177c30, fca7be88, 0, 0, 0, ff101be8) + d0
 fdea7f70 _Z13_Jv_ThreadRunPN4java4lang6ThreadE (177c30, ff1a66a0, 0, ff1a6000,
ff12d474, feb3c510) + 18
 fdeaf3d4 _Z12really_startPv (fcc38, 0, fca7bfa0, fca7bf7c, 0, 0) + 20
 fe7dd37c GC_start_routine (12ef80, 0, 0, 0, 0, 0) + d4
 fcde57b4 _lwp_start (0, 0, 0, 0, 0, 0)
-  lwp# 6 / thread# 6  
 fcde58f4 lwp_park (0, 0, 0)<---Normal Scenario for remaining
threads
 fcde166c mutex_lock_queue (fcdf8b44, 0, 170210, fcdf8000, 0, 0) + 104
 fcde206c slow_lock (170210, fcfc0a00, 0, 0, 0, 0) + 58
 fdeaf8d8 _Z12_Jv_CondWaitP23_Jv_ConditionVariable_tP11_Jv_Mutex_txi (1,
170210, 0, fc97bbc8, 0, 0) + 230
 fdea4298 _ZN4java4lang6Object4waitEJvxi (153d00, 0, 0, 0, 8b7080, d642) +
8c
 00013e8c _ZN8IBMMutex7acquireEJvv (153d00, 17ade0, a, 0, 0, 0) + 88
 000140f4 _ZN3env3runEJvv (17ade0, 26868, 1, 0, 0, 0) + 88
 000131e4 _ZN12WorkerThread3runE

[Bug libgcj/34574] wait() call hangs in _Jv_CondWait taking the monitor with it causing the application to hang

2007-12-24 Thread rajathf at techmahindra dot com


-- 

rajathf at techmahindra dot com changed:

   What|Removed |Added

   Severity|critical|blocker


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34574