HBase
  1. HBase
  2. HBASE-10205

ConcurrentModificationException in BucketAllocator

    Details

    • Hadoop Flags:
      Reviewed

      Description

      The BucketCache WriterThread calls BucketCache.freeSpace() upon draining the RAM queue containing entries to be cached. freeSpace() in turn calls BucketSizeInfo.statistics() through BucketAllocator.getIndexStatistics(), which iterates over 'bucketList'. At the same time another WriterThread might call BucketAllocator.allocateBlock(), which may call BucketSizeInfo.allocateBlock(), add a bucket to 'bucketList' and consequently cause a ConcurrentModificationException. Calls to BucketAllocator.allocateBlock() are synchronized, but calls to BucketAllocator.getIndexStatistics() are not, which allows this race to occur.

        Activity

        Enis Soztutar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        stack made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 2.0.0 [ 12327188 ]
        Fix Version/s 0.98.6 [ 12327376 ]
        Resolution Fixed [ 1 ]
        chunhui shen made changes -
        Fix Version/s 0.99.0 [ 12325675 ]
        chunhui shen made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        chunhui shen made changes -
        Attachment hbase-10205-trunk.patch [ 12619494 ]
        Arjen Roodselaar made changes -
        Component/s regionserver [ 12312139 ]
        Arjen Roodselaar made changes -
        Field Original Value New Value
        Description The BucketCache WriterThread calls BucketCache.freeSpace() upon draining the RAM queue containing entries to be cached. freeSpace() in turn calls BucketSizeInfo.statistics() through BucketAllocator.getIndexStatistics(), which iterates 'bucketList'. At the same time another WriterThread might call BucketAllocator.allocateBlock(), which may call BucketSizeInfo.allocate() and add a bucket to 'bucketList' and consequently cause a ConcurrentModificationException. Calls to BucketAllocator.allocateBlock() are synchronized, but calls to BucketAllocator.getIndexStatistics() are not, which allows this race to occur. The BucketCache WriterThread calls BucketCache.freeSpace() upon draining the RAM queue containing entries to be cached. freeSpace() in turn calls BucketSizeInfo.statistics() through BucketAllocator.getIndexStatistics(), which iterates over 'bucketList'. At the same time another WriterThread might call BucketAllocator.allocateBlock(), which may call BucketSizeInfo.allocateBlock(), add a bucket to 'bucketList' and consequently cause a ConcurrentModificationException. Calls to BucketAllocator.allocateBlock() are synchronized, but calls to BucketAllocator.getIndexStatistics() are not, which allows this race to occur.
        Arjen Roodselaar created issue -

          People

          • Assignee:
            Arjen Roodselaar
            Reporter:
            Arjen Roodselaar
          • Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development