Uploaded image for project: 'Spring Modules'
  1. Spring Modules
  2. MOD-371

MetadataCacheAttributeSource's HashMap must be synchronized

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.9
    • Component/s: CACHE
    • Labels:
      None
    • Environment:
      All environments, I reproduced on several multiprocessor configurations running macos or linux.

      Description

      MetadataCacheAttributeSource uses a HashMap to cache attributes for the method of the target object. The HashMap is not thread safe. In realy multi threaded environment, such as a heavily stressed tomcat running on a multi-cpu system, this leads to corruption of the HashMap buckets internal structure with disastrous results (infinite loop in get() ).

      Fixable using a call to Collections.synchronizedMap() at attribute HashMap creation.

        Attachments

          Activity

            People

            Assignee:
            irbouho Omar Irbouh
            Reporter:
            kali Mathieu Poumeyrol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: