Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4143749

RMI server calling finalizers on exit hangs Solaris native threads VM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.1.6, 1.2.0
    • core-libs
    • None
    • sparc
    • solaris_2.5.1

      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

            acolleysunw Adrian Colley (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: