harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Popov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4324) [jdktools][jpda] JDWP agent incorrectly handles THREAD_START/DEATH requests
Date Tue, 03 Jul 2007 13:31:08 GMT
[jdktools][jpda] JDWP agent incorrectly handles THREAD_START/DEATH requests
---------------------------------------------------------------------------

                 Key: HARMONY-4324
                 URL: https://issues.apache.org/jira/browse/HARMONY-4324
             Project: Harmony
          Issue Type: Bug
         Environment: Windows/x86, Linux/x86, harmony-jdk-r551077
            Reporter: Ivan Popov


When JDWP agent receives request for THREAD_START event with modifier for specified thread
it calls JVMTI function SetEventNotificationMode() function with given thread. However, JVMTI
spec for SetEventNotificationMode() function says:

The following events cannot be controlled at the thread level 
through this function. 
...
 - ThreadStart 
...

Thus, JDWP agent gets JVMTI_ERROR_ILLEGAL_ARGUMENT (103) error from SetEventNotificationMode().

Similarly, when JDWP agent handles request for THREAD_DEATH event with specified thread it
also calls the JVMTI SetEventNotificationMode() with given thread. But if the thread is not
started yet, this function returns JVMTI_ERROR_THREAD_NOT_ALIVE (15) error.

JDWP agent should handle the THREAD_START/DEATH requests in a special way, for example, to
call SetEventNotificationMode() always with null thread and then to filter the THREAD_START/DEATH
events.

This issues causes failure of the following JDWP stress tests:

  org.apache.harmony.test.stress.jpda.jdwp.scenario.EVENT015.EventTest015
  org.apache.harmony.test.stress.jpda.jdwp.scenario.EVENT016.EventTest016
  org.apache.harmony.test.stress.jpda.jdwp.scenario.EVENT017.EventTest017

Typical error in the tests output:

 ==> Prepare and send requests for THREAD_START and THREAD_END events for 'EventDebuggee015_Thread'...
 ## FAILURE: EventRequest.Set command for THREAD_START event returns unexpected ERROR = 103(ILLEGAL_ARGUMENT)
 ## Expected ERROR = 0(NONE)
 ## Expected ERROR = 110(OUT_OF_MEMORY)
 ##          Thread name = EventDebuggee015_Thread
 ==> Time (mlsecs) of preparing requests for THREAD_START and THREAD_END events = 0
 ==> Successful requests for THREAD_START event = 0
 ==> Successful requests for THREAD_END event = 0
 ## FAILURE while sending requests for THREAD_START and THREAD_END events!



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


Mime
View raw message