[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: JDK-8204994: SA might fail to attach to process with "Windbg Error: WaitForEvent failed"
From:       Chris Plummer <chris.plummer () oracle ! com>
Date:       2020-05-29 21:03:13
Message-ID: e9875584-f6f7-de7b-ab8a-d46bb0de4a65 () oracle ! com
[Download RAW message or body]

+1

On 5/29/20 1:52 PM, serguei.spitsyn@oracle.com wrote:
> Hi Alex,
>
> Thank you for the update!
> LGTM.
>
> Thanks,
> Serguei
>
>
> On 5/29/20 13:35, Alex Menkov wrote:
>> Hi Serguei,
>>
>> ok, I added the loop.
>> webrev:
>> http://cr.openjdk.java.net/~amenkov/jdk15/WinDbg_WaitForEvent/webrev.2/
>>
>> --alex
>>
>> On 05/28/2020 20:35, serguei.spitsyn@oracle.com wrote:
>>> Hi Alex,
>>>
>>> It'd be nice to reduce noise from such intermittent issues and also 
>>> get rid of such bugs in the future.
>>> My gut feeling is that we just significantly reduced a probability 
>>> of this failure in something
>>> like an order of magnitude but it will still happens once in a month 
>>> or a half of year.
>>> This issue should go away completely with 3 or 4 iterations.
>>> The price is not high as the 3rd iteration is going to be rare and 
>>> the 4th should never happen.
>>> Also, it would not increase complexity.
>>>
>>> But no pressure, you are to decide.
>>> I'm just sharing my opinion.
>>>
>>> Thanks,
>>> Serguei
>>>
>>>
>>> On 5/28/20 17:04, Alex Menkov wrote:
>>>> Hi Serguei,
>>>>
>>>> With my testing 2nd call always succeeded, but I was able to 
>>>> reproduce the case only 3 times with my test runs.
>>>> I can implement the loop, but number of retries is anyway an 
>>>> arbitrary value.
>>>>
>>>> --alex
>>>>
>>>> On 05/28/2020 15:44, serguei.spitsyn@oracle.com wrote:
>>>>> Hi Alex,
>>>>>
>>>>> It looks good in general.
>>>>>
>>>>> +static HRESULT WaitForEvent(IDebugControl *ptrIDebugControl) {
>>>>> + // see JDK-8204994: sometimes WaitForEvent fails with 
>>>>> E_ACCESSDENIED,
>>>>> + // but succeeded on 2nd call.
>>>>> + HRESULT hr = ptrIDebugControl->WaitForEvent(DEBUG_WAIT_DEFAULT, 
>>>>> INFINITE);
>>>>> + if (hr == E_ACCESSDENIED) {
>>>>> + // yield current thread use of a processor (short delay).
>>>>> + SwitchToThread();
>>>>> + hr = ptrIDebugControl->WaitForEvent(DEBUG_WAIT_DEFAULT, INFINITE);
>>>>> + }
>>>>> + return hr;
>>>>> +}
>>>>>
>>>>>
>>>>> Can the ptrIDebugControl->WaitForEvent fail with E_ACCESSDENIED 
>>>>> twice and succeed on third call?
>>>>> Would it better to make it a loop with more retry attempts?
>>>>>
>>>>> Thanks,
>>>>> Serguei
>>>>>
>>>>>
>>>>> On 5/27/20 13:54, Alex Menkov wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> please review the fix for
>>>>>> https://bugs.openjdk.java.net/browse/JDK-8204994
>>>>>> webrev:
>>>>>> http://cr.openjdk.java.net/~amenkov/jdk15/WinDbg_WaitForEvent/webrev/ 
>>>>>>
>>>>>>
>>>>>> --alex
>>>>>
>>>
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic