-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.0
-
x86
-
windows_nt
Name: dkC59003 Date: 03/03/2000
The regression test (testbase_nsk) nsk/regression/b4311308 fails
under the HotSpot Client VM (build 1.4merlin-internal-release, compiled mode)
on win32.
The test creates the situation when the thread (One_Thread) is owner
of the java_monitor and is waiting to be notified for the other java_monitor.
Then the test analyses the MONITOR_DUMP for this state.
Next, the test creates the second situation when the two threads
(One_Thread and Two_Thread) are in the deadlock state and then
analyses the MONITOR_DUMP again.
When the test runs under the HotSpot in the compiled mode
the MONITOR_DUMP event info is incorrect for the both states.
In the mixed mode the test passes.
To reproduce the bug run doit.bat on win32 in
/net/sqesvr/vsn/GammaBase/Bugs/<this bug number>.
The first parameter for doit.bat should be JDK root directory
(e.g. L:/java/jdk1.3/win32) and the other parameter(s) -
VM option(s) (optional, e.g. -Xcomp).
See logs:
In compiled mode:
% doit.bat d:\bond\java\dest\jdk1.3.0U\win32 -Xcomp
java version "1.3.0rc1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-U)
Java HotSpot(TM) Client VM (build 1.4merlin-internal-release, compiled mode)
==> nsk/regression/b4311308 test LOG:
----> Thread - One_Thread(lockA, lockB) - Started!
----> state N 1: b4311308.lockA has been locked by One_Thread
----> One_Thread is waiting for b4311308.barrier notification
====> checking Monitor Dump for state N 1...
----> Request Event For Monitor Dump...
----> analysing of Monitor Dump...
----> result of Monitor Dump analysing:
----> One_Thread: owner_java_monitor_counter = 0
----> One_Thread: wait_to_be_notified_java_monitor_counter = 1
----> Monitor Dump for state N 1 is NOT correct!
----> Expected result:
----> One_Thread: owner_java_monitor_counter = 1
----> One_Thread: wait_to_be_notified_java_monitor_counter = 1
---->
----> Thread - Two_Thread(lockB, lockA) - Started!
----> state N 2: b4311308.lockA has been locked by One_Thread
----> One_Thread is waiting for b4311308.lockB to enter
----> b4311308.lockB has been locked by Two_Thread
----> Two_Thread is waiting for b4311308.lockA to enter
====> checking Monitor Dump for state N 2...
----> Request Event For Monitor Dump...
----> analysing of Monitor Dump...
----> result of Monitor Dump analysing:
----> One_Thread: owner_java_monitor_counter = 1
----> One_Thread: wait_to_enter_java_monitor_counter = 0
----> Two_Thread: owner_java_monitor_counter = 1
----> Two_Thread: wait_to_enter_java_monitor_counter = 0
----> Monitor Dump for state N 2 is NOT correct!
----> Expected result:
----> One_Thread: owner_java_monitor_counter = 1
----> One_Thread: wait_to_enter_java_monitor_counter = 1
----> Two_Thread: owner_java_monitor_counter = 1
----> Two_Thread: wait_to_enter_java_monitor_counter = 1
==> nsk/regression/b4311308 test FAILED
In mixed mode:
% doit.bat d:\bond\java\dest\jdk1.3.0U\win32
==> nsk/regression/b4311308 test LOG:
----> Thread - One_Thread(lockA, lockB) - Started!
----> state N 1: b4311308.lockA has been locked by One_Thread
----> One_Thread is waiting for b4311308.barrier notification
====> checking Monitor Dump for state N 1...
----> Request Event For Monitor Dump...
----> analysing of Monitor Dump...
----> result of Monitor Dump analysing:
----> One_Thread: owner_java_monitor_counter = 1
----> One_Thread: wait_to_be_notified_java_monitor_counter = 1
----> Monitor Dump for state N 1 is correct!
---->
----> Thread - Two_Thread(lockB, lockA) - Started!
----> state N 2: b4311308.lockA has been locked by One_Thread
----> One_Thread is waiting for b4311308.lockB to enter
----> b4311308.lockB has been locked by Two_Thread
----> Two_Thread is waiting for b4311308.lockA to enter
====> checking Monitor Dump for state N 2...
----> Request Event For Monitor Dump...
----> analysing of Monitor Dump...
----> result of Monitor Dump analysing:
----> One_Thread: owner_java_monitor_counter = 1
----> One_Thread: wait_to_enter_java_monitor_counter = 1
----> Two_Thread: owner_java_monitor_counter = 1
----> Two_Thread: wait_to_enter_java_monitor_counter = 1
----> Monitor Dump for state N 2 is correct!
==> nsk/regression/b4311308 test PASSED
======================================================================
- duplicates
-
JDK-4418568 NULL thread ID in MONITOR_DUMP
- Resolved
- relates to
-
JDK-4387957 Thread dump under hotspot does not indicate monitor ownership
- Closed