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

JDK 1.3.1: ORB.shutdown does not recover resources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.1
    • 1.3.1, 1.4.1
    • other-libs
    • 09
    • sparc
    • solaris_8
    • Not verified

      The JDK ORB creates ReaderThreads that are never destroyed. If an app
      creates and destroys ORBs its ThreadCount goes up forever. This is a
      big problem for production systems. I attach a test case. After 10
      iterations the thread count is 13 after 100 iterations the thread count
      is 103:

      1.4.1_02:
      ----------
      java -classpath . test.ReaderTest 10
      Current threads: 2
      After 10 iterations, current threads: 13

      java -classpath . test.ReaderTest 100
      Current threads: 2
      After 100 iterations, current threads: 103

      1.3.1_07:
      ---------
      java -classpath . test.ReaderTest 10
      Current threads: 1
      After 10 iterations, current threads: 12

      java -classpath . test.ReaderTest 100
      Current threads: 1
      After 100 iterations, current threads: 102

      We would expect that ORB.shutdown would also clean up the reader
      threads, or at the very least a System.gc() on an unreferenced ORB
      would clean them up - but neither has any affect.

      Attached is the testcase ( copy the IOR when you start tnameserv to
      TestIOR in your home directory )

            kcavanauorcl Ken Cavanaugh (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: