Details

    • Subcomponent:
    • Resolved In Build:
      b81
    • CPU:
      x86
    • OS:
      linux_redhat_9.0
    • Verification:
      Verified

      Description

      If you create a singlethreaded executor, submit a single task into it and forget its reference, both the ThreadPoolExecutor and its associated Thread will stay alive forever although there is an obvious attempt at shutting down the thread in such case (ThreadPoolExecutor's finalizer)

      While ThreadPoolExecutor.finalize() calls the shutdown() method which should tear down the waiting threads, this never happens, as the threads keep reference to the TPE instance on the stack ("this"). This causes a leak.

      While we have found this problem through a bug on our side (which we already fixed), I still believe this is actual bug and the scenario with creating executors and forgetting about them should be supported.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                martin Martin Buchholz
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: