Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4187

Cloning org.jboss.invocation.InterceptorContext leaks memory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 9.0.0.CR1
    • 8.1.0.Final, 8.2.0.Final
    • None
    • None
    • Hide

      I think I ran into this issue by putting an interceptor on the run() method of a Runnable and scheduling it using the ManagedScheduledExecutorService.

      Show
      I think I ran into this issue by putting an interceptor on the run() method of a Runnable and scheduling it using the ManagedScheduledExecutorService.
    • Low

    Description

      The clone function uses sublist to set the new list of interceptors.

      public InterceptorContext clone()

      { .... clone.setInterceptors(interceptors.subList(next, interceptors.size())); return clone; }

      This will keep a reference to the original list around. So the original list will never be released. Chaining clone multiple times will eventually cause an out of memory because each sublist grows slightly.

      Attachments

        Activity

          People

            emartins@redhat.com Eduardo Martins
            jeroenwielandt Jeroen Wielandt (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: