RFR: JDK-8227124: "could not open pipe" error does not report error details

Chris Plummer chris.plummer at oracle.com
Wed Jul 3 23:41:39 UTC 2019


On 7/3/19 4:38 PM, Alex Menkov wrote:
> Hi Chris,
>
> On 07/03/2019 15:16, Chris Plummer wrote:
>> Hi Alex,
>>
>> I think the calls to GetLastError() should be in the else clauses, 
>> just before or as part of the log_error() statements. Otherwise you 
>> are making the GetLastError() calls even when there is no error.
>
> It can be done this way for open_pipe(),
> but for write_pipe(s) lastError code needs to be saved after the calls 
> as any system call can override the value.
Ok, I see now. I didn't realize it was getting clobbered by other calls.
> Note that call of GetLastError() is really cheap.
Ok, that's fine then.

thanks,

Chris
>
> --alex
>
>>
>> thanks,
>>
>> Chris
>>
>> On 7/3/19 1:59 PM, Alex Menkov wrote:
>>> Hi all,
>>>
>>> Please review a fix for
>>> https://bugs.openjdk.java.net/browse/JDK-8227124
>>>
>>> This is subtask of JDK-8221512: Failed to complete jcmd operation 
>>> '[error][attach] could not open pipe \\.\pipe\javatool-708501419 to 
>>> send result of operation jcmd'
>>>
>>> To fix issues with "could  not open pipe" error, additional info is 
>>> required, the change adds logging of system error.
>>>
>>> webrev:
>>> http://cr.openjdk.java.net/~amenkov/jdk14/openPipeErrorLog/webrev/
>>>
>>> --alex
>>
>>
>>




More information about the serviceability-dev mailing list