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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Alex Menkov-2
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
Reply | Threaded
Open this post in threaded view
|

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

serguei.spitsyn@oracle.com
Hi Alex,

It looks good to me.
It is nice to have this extra information about failures.

Thanks,
Serguei

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

Reply | Threaded
Open this post in threaded view
|

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

Chris Plummer
In reply to this post by Alex Menkov-2
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.

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



Reply | Threaded
Open this post in threaded view
|

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

Alex Menkov-2
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.
Note that call of GetLastError() is really cheap.

--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
>
>
>
Reply | Threaded
Open this post in threaded view
|

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

Chris Plummer
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
>>
>>
>>