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] Updated: (HARMONY-4324) [jdktools][jpda] JDWP agent incorrectly handles THREAD_START/DEATH requests
Date Tue, 03 Jul 2007 15:07:04 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ivan Popov updated HARMONY-4324:
--------------------------------

    Attachment: H4324_jdwp_agent.patch

I'm attaching patch 'H4324_jdwp_agent.patch' for JDWP agent, which solves this problem. It
also improves trace messages for events and eliminates infinite recursion in using JVMTI function
GetThreadInfo() for tracing STEP events.

With this patch affected JDWP stress tests do not fail anymore with ILLEGAL_ARGUMENT error
diagnostics, but they still hang due to HARMONY-2889. I ran also JDWP unit tests against Harmony
M2 build with patched JDWP agent and they all passed for me except known failures. It is OK
to apply this patch.


> [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
>          Components: JDK
>         Environment: Windows/x86, Linux/x86, harmony-jdk-r551077
>            Reporter: Ivan Popov
>         Attachments: H4324_jdwp_agent.patch
>
>
> 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