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

(timer) TimerThread.mainLoop shouldn't ignore InterruptedException for non-daemon Timer threads

XMLWordPrintable

    • other
    • windows_xp

      OPERATING SYSTEM
      Windows XP
      FULL JDK VERSION
      java version "1.5.0_04"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
      DESCRIPTION
      If a non-daemon java.util.Timer is created then upon JVM shutdown (via destroyJavaVM) the process
      will hang until the TimerThread for the Timer has completed; this potentially could be a very long time.
      Within an IBM WebSphere environment as part of shutdown remaining threads are interrupted to force
      them to shutdown in a timely manner. However the java.util.TimerThread.mainLoop catches and ignores
      java.lang.InterruptedException, hence we remain in a hung scenario for long lived Timers.
      Removal of catching java.lang.InterruptedException for non-daemon threads would solve this problem.

            martin Martin Buchholz
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: