Hi David & Stuart,
Thank you for the help! please review the in webrev 6948101.zip in
attachment.
Regards,
Eric
On 2012/6/27 9:14, Stuart Marks wrote:
Hi Eric,
Alan Bateman asked me to help you out with this since he's going to be
unavailable for a couple weeks.
I didn't see you on the OpenJDK census [1] so you might not have an
Author role and thus the ability to post webrevs. If indeed you don't,
I can post a webrev for you. I can also post a webrev for your other
review (7123972) if it's still necessary.
Finally, I can push the fixes for you when the reviews are complete.
s'marks
[1] http://openjdk.java.net/census
On 6/26/12 2:56 PM, David Holmes wrote:
Hi Eric,
On 26/06/2012 7:26 PM, Eric Wang wrote:
Please help to review the fix attached for test bug 6948101
<http://monaco.us.oracle.com/detail.jsf?cr=6948101> which is same root
cause as bug 7123972
<http://monaco.us.oracle.com/detail.jsf?cr=7123972>.
The test makes wrong assumption that GC is started immediately to
recycle unused objects after System.gc() called.
The proposed fix is to make sure objects have been recycled by GC
before
checking if the weak reference is null.
Again I really need to see a webrev to see the fix in context. Do you
have
Author role and an OpenJDK user name so you can post webrevs on
cr.openjdk.java.net?
I suspect this may have the same issues as the other fix and require
a timeout
for when the original problem is still present.
Thanks,
David
Regards,
Eric
--- old/test/ProblemList.txt 2012-06-26 17:02:12.934138771 +0800
+++ new/test/ProblemList.txt 2012-06-26 17:02:11.494051649 +0800
@@ -271,9 +271,6 @@
# 7140992
java/rmi/server/Unreferenced/finiteGCLatency/FiniteGCLatency.java generic-all
-# 6948101
-java/rmi/transport/pinLastArguments/PinLastArguments.java generic-all
-
# 7146541
java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java
linux-all
--- old/test/java/rmi/transport/pinLastArguments/PinLastArguments.java
2012-06-26 17:02:17.432074905 +0800
+++ new/test/java/rmi/transport/pinLastArguments/PinLastArguments.java
2012-06-26 17:02:15.984073307 +0800
@@ -43,7 +43,8 @@
import java.rmi.server.UnicastRemoteObject;
public class PinLastArguments {
-
+ private static volatile boolean finalized = false;
+
public interface Ping extends Remote {
void ping(Object first, Object second) throws RemoteException;
}
@@ -53,6 +54,9 @@
public void ping(Object first, Object second) {
System.err.println("ping invoked: " + first + ", " + second);
}
+ protected void finalize() {
+ finalized = true;
+ }
}
public static void main(String[] args) throws Exception {
@@ -78,7 +82,11 @@
}
impl = null;
- System.gc();
+ while(!finalized) {
+ System.gc();
+ System.runFinalization();
+ Thread.sleep(20);
+ }
if (ref.get() != null) {
throw new Error("TEST FAILED: impl not garbage collected");