Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-544

WeakHashMap 100% CPU utilisation in ShiroModule

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.2.4
    • None
    • Integration: Guice
    • None

    Description

      ShiroModule's destroyables member variable is backed by an unsynchronized WeakHashMap, which can cause endless loops.

      See:

      https://java.net/jira/browse/JAVASERVERFACES-2544
      https://bugs.eclipse.org/bugs/show_bug.cgi?id=397439

      This means that the add(Destroyable) method can cause deadlock.

      This issue is hard to workaround because the destroy() method is final so we cannot simply override the behavior.

      We were able to fix this problem by making both the add() and destroy() methods synchronized after forking the project.

      Attachments

        Activity

          People

            deraj123 Jared Bunting
            guillaumeleger Guillaume Leger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: