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

Peter Levart peter.levart at gmail.com
Wed Nov 6 09:36:46 UTC 2019


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?

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