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

SFSB memory leak due to Date() usage

    Details

    • Steps to Reproduce:
      Hide

      Access an SFSB.
      Change the system time backwards before the SFSB expiration time elapses (I ran "date", then copy/pasted it into "date -s" several seconds later).
      Wait sufficient time for expiration (and potential retry) and attempt to access bean again.

      Expected: bean no longer exists.
      Actual: bean never expires.

      Show
      Access an SFSB. Change the system time backwards before the SFSB expiration time elapses (I ran "date", then copy/pasted it into "date -s" several seconds later). Wait sufficient time for expiration (and potential retry) and attempt to access bean again. Expected: bean no longer exists. Actual: bean never expires.
    • Affects:
      Release Notes

      Description

      SFSB tracks expiration with "new Date().getTime()" and "System.currentTimeMillis()".
      But the expiration threads are scheduled (inside JDK classes) with System.nanoTime().

      If the expiration task runs before the bean is considered expired, the expiration check fails and the bean is never expired.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pferraro Paul Ferraro
                  Reporter:
                  dereed Dennis Reed
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: