Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1384

Remote processes can access cache before it's started

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 5.0.1.FINAL
    • None
    • None

      version:
      Infinispan 5.1.0-SNAPSHOT last commit fc94449eec33469057614a13cbfe59e4f4e855fd Author: Michal Linhard <michal@linhard.sk> Date: Wed Sep 7 13:42:32 2011 +0200

      The mechanism that locks cache while it is being created and started is not in effect when accessing the cache remotely.
      The problem happens in this scenario:

      1. Thread1 does DefaultCacheManager.getCache and starts the cache to the point where ComponentRegistry for that cache exists, but the cache is not yet started
      2. Thread2 (originating in JGroups layer) does call via InboundInvocationHandlerImpl and gets hold of the ComponentRegistry for the cache and calls perform() on the command

      (note that the Thread2 doesn't obtain the cache via DefaultCacheManager.getCache and therefore it doesn't have to wait on the cacheCreateLock or CacheWrapper lock)

      the problem manifests itself in JBPAPP-7173 where using unstarted CacheLoaderInterceptor leads to NPE.

            rh-ee-galder Galder ZamarreƱo
            mlinhard Michal Linhard (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: