Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-5227

StackOverflowError in GridCacheMapEntry#checkOwnerChanged()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.6
    • 2.8
    • None
    • None

    Description

      A simple test reproducing this error:

          /**
           * @throws Exception if failed.
           */
          public void testBatchUnlock() throws Exception {
             startGrid(0);
             grid(0).createCache(new CacheConfiguration<Integer, Integer>(DEFAULT_CACHE_NAME)
                  .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL));
      
              try {
                  final CountDownLatch releaseLatch = new CountDownLatch(1);
      
                  IgniteInternalFuture<Object> fut = GridTestUtils.runAsync(new Callable<Object>() {
                      @Override public Object call() throws Exception {
                          IgniteCache<Object, Object> cache = grid(0).cache(null);
      
                          Lock lock = cache.lock("key");
      
                          try {
                              lock.lock();
      
                              releaseLatch.await();
                          }
                          finally {
                              lock.unlock();
                          }
      
                          return null;
                      }
                  });
      
                  Map<String, String> putMap = new LinkedHashMap<>();
      
                  putMap.put("key", "trigger");
      
                  for (int i = 0; i < 10_000; i++)
                      putMap.put("key-" + i, "value");
      
                  IgniteCache<Object, Object> asyncCache = grid(0).cache(null).withAsync();
      
                  asyncCache.putAll(putMap);
      
                  IgniteFuture<Object> resFut = asyncCache.future();
      
                  Thread.sleep(1000);
      
                  releaseLatch.countDown();
      
                  fut.get();
      
                  resFut.get();
              }
              finally {
                  stopAllGrids();
              }
      

      We should replace a recursive call with a simple iteration over the linked list.

      Attachments

        Issue Links

          Activity

            People

              mstepachev Stepachev Maksim
              agoncharuk Alexey Goncharuk
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m