harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vera Petrashkova (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4346) [buildtest][vts] Test vm/jvmti/events/MonitorContendedEnter/MonitorContendedEnter0101/MonitorContendedEnter0101.xml should be redesigned
Date Thu, 05 Jul 2007 06:49:04 GMT
[buildtest][vts] Test vm/jvmti/events/MonitorContendedEnter/MonitorContendedEnter0101/MonitorContendedEnter0101.xml
should be redesigned

                 Key: HARMONY-4346
                 URL: https://issues.apache.org/jira/browse/HARMONY-4346
             Project: Harmony
          Issue Type: Bug
          Components: build - test - ci
            Reporter: Vera Petrashkova

According to J2SE JVMTI specification:
Monitor Contended Enter
void JNICALL MonitorContendedEnter(jvmtiEnv *jvmti_env,
                                               JNIEnv* jni_env,
                                               jthread thread,
                                               jobject object)
Sent when a thread is attempting to enter a Java programming language monitor already acquired
by another thread.

VTS test 

creates some object "monitor" which is acquired by main thread.
Then it starts "second" thread which is also trying to lock "monitor". 
The test prints some messages.

This test passes if  MonitorContendedEnter event was sent only onece (counter = 1).

But the result depends on running machine CPU speed and
synhronzation with thread start and print output.

In fact, callbackMonitorContendedEnter() method which is defined in the test is called 2 or
3 times
for the tested thread (for example, the first time while executes synchronized Thread.start()
method, the second - while synchronized println output, and the third - into the test).

As the result this test fails.
It should be redesigned, for example, remove println invocation and change
"counter == 1" criteria to "counter >= 1  and counter <= 2".

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message