RFR of JDK-8232446: logging enhancement for rmi when socket closed

Hamlin Li huaming.li at oracle.com
Wed Nov 6 12:02:40 UTC 2019


On 2019/11/6 5:36 PM, Peter Levart wrote:
> Hi Hamlin,
>
> in TCPTransport.decrementExportCount():
>
>  283             try {
>  284                 if (tcpLog.isLoggable(Log.BRIEF)) {
>  285                     tcpLog.log(Log.BRIEF, "close server socket on 
> " + ss);
>  286                 }
>  287                 ss.close();
>  288             } catch (IOException e) {
>  289             }
>
> ...you could add a log statement to the catch block too. Or even 
> better, rearrange for IOException to be thrown from that method and 
> deal with it in two places:
>
> - in exportObject() - add it as suppressed exception to exception 
> thrown from super.exportObject().
> - in targetUnexported() - log it or wrap it into UncheckedIOException 
> (depending on what are the callers of targetUnexported())
>
> What do you think?
Thanks Peter.

I agree. I adopt your first suggestion: add log statement to catch 
block, as I think it's simple/straight and sufficient to help diagnose.

And I also add log for catch blocks in other close places.

The change is updated in place at: 
http://cr.openjdk.java.net/~mli/8232446/webrev.00/


Thank you

-Hamlin

>
> Regards, Peter
>
>
>
> On 11/6/19 3:07 AM, Hamlin Li wrote:
>> Would you please review the patch?
>>
>> bug: https://bugs.openjdk.java.net/browse/JDK-8232446
>>
>> webrev: http://cr.openjdk.java.net/~mli/8232446/webrev.00/
>>
>>
>> We have some intermittent failures in rmi related to socket closing, 
>> this is to add more logging to help diagnose the issues.
>>
>>
>> Thanks you
>>
>> -Hamlin
>>
>


More information about the core-libs-dev mailing list