[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-serviceability-dev
Subject: Re: RFR: JDK-8203026: java.rmi.NoSuchObjectException: no such object in table
From: "serguei.spitsyn () oracle ! com" <serguei ! spitsyn () oracle ! com>
Date: 2019-03-25 17:21:30
Message-ID: d8ef5350-db4f-7274-c32c-44a7eb37e11d () oracle ! com
[Download RAW message or body]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Gary,<br>
<br>
It looks good to me.<br>
<br>
Nit:<br>
It is better to define as interface:<br>
<br>
<pre><span class="new">+ private static RemoteHostImpl remoteHost;
=>
+ private static RemoteHost remoteHost;</span></pre>
<br>
<pre><span class="new">+ private static RemoteVmImpl rvm;
=>
</span><span class="new">+ private static RemoteVm rvm;</span>
<span class="new"></span></pre>
<br>
Thanks,<br>
Serguei<br>
<br>
<br>
On 3/24/19 17:10, Gary Adams wrote:<br>
</div>
<blockquote type="cite" cite="mid:5C981C8A.3060101@oracle.com">Here's
an updated webrev that includes the change to bind to the stub.
<br>
The jstatd tests continue to pass after this change.
<br>
<br>
Webrev: <a class="moz-txt-link-freetext" \
href="http://cr.openjdk.java.net/~gadams/8203026/webrev.01/">http://cr.openjdk.java.net/~gadams/8203026/webrev.01/</a>
<br>
<br>
It would be good to have a second reviewer from the serviceability
team.
<br>
<br>
Longer term it would be good to replace the rmi dependency, which
does not
<br>
appear to be central to the functionality provided here.
<br>
<br>
On 3/22/19, 9:56 AM, Roger Riggs wrote:
<br>
<blockquote type="cite">Hi Gary,
<br>
<br>
Holding a static reference to the implementation solves the
problem.
<br>
<br>
But I noticed that the object that is bound in the registry is
the RemoteHostImpl
<br>
and it should be the RemoteHost stub.
<br>
<br>
Line 145: should be:
<br>
<br>
bind(name.toString(), stub);
<br>
<br>
That is likely to solve the problem as well, because the
distributed garbage
<br>
collector will correctly cause a hard reference to be retained
to the implementation.
<br>
<br>
Roger
<br>
<br>
<br>
On 03/22/2019 04:05 AM, <a class="moz-txt-link-abbreviated" \
href="mailto:gary.adams@oracle.com">gary.adams@oracle.com</a> wrote: <br>
<blockquote type="cite">Here's a proposed fix for the
intermittent jstatd test failure.
<br>
By moving the exported object from a local method variable to
a
<br>
static class variable a strong reference is held so the object
<br>
will not be garbage collected prematurely.
<br>
<br>
Webrev:
<a class="moz-txt-link-freetext" \
href="http://cr.openjdk.java.net/~gadams/8203026/webrev.00/">http://cr.openjdk.java.net/~gadams/8203026/webrev.00/</a>
<br>
Issue: <a class="moz-txt-link-freetext" \
href="https://bugs.openjdk.java.net/browse/JDK-8203026">https://bugs.openjdk.java.net/browse/JDK-8203026</a>
<br>
<br>
The test is currently filed as a core-libs/java.rmi, but it
probably
<br>
should be core-svc/tools with label=jstatd. It is the callers
<br>
responsibility to ensure the strong reference to prevent
<br>
the premature garbage collection, so this is a test failure
<br>
rather than a need to change the underlying rmi behavior.
<br>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic