The Solaris native threads VM (up to and including JDK1.2beta3) hangs if an RMI server has called System.runFinalizersOnExit(true) and then calls System.exit(), try the following:
-- Foo.java -------------------------------------
import java.rmi.*;
public interface Foo extends Remote {
}
-- FooImpl.java ---------------------------------
import java.rmi.*;
import java.rmi.server.*;
public class FooImpl extends UnicastRemoteObject implements Foo {
public FooImpl() throws RemoteException {}
public static void main(String[] args) {
try {
System.runFinalizersOnExit(true);
FooImpl foo = new FooImpl();
System.out.println("Exiting...");
System.exit(0);
}
catch (Exception e) {
e.printStackTrace();
}
}
}
Actually the (native threads) VM hangs whenever you try and close a socket that is doing an accept() but BugId 4055180 suggests that this is an application bug and not a VM bug.
lee.worrall@UK 1998-05-29
-- Foo.java -------------------------------------
import java.rmi.*;
public interface Foo extends Remote {
}
-- FooImpl.java ---------------------------------
import java.rmi.*;
import java.rmi.server.*;
public class FooImpl extends UnicastRemoteObject implements Foo {
public FooImpl() throws RemoteException {}
public static void main(String[] args) {
try {
System.runFinalizersOnExit(true);
FooImpl foo = new FooImpl();
System.out.println("Exiting...");
System.exit(0);
}
catch (Exception e) {
e.printStackTrace();
}
}
}
Actually the (native threads) VM hangs whenever you try and close a socket that is doing an accept() but BugId 4055180 suggests that this is an application bug and not a VM bug.
lee.worrall@UK 1998-05-29
- relates to
-
JDK-4144981 Simultaneous socketAccept/socketClose deadlocks under native threads
-
- Closed
-