Bug 1210577

Summary: Setting more than 513MB for buffer-service-max-storage-object-size, OOME occurs at org.teiid.common.buffer.impl.BufferFrontedFileStoreCache.initialize()
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Hisao Furuichi <hfuruich>
Component: TeiidAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: jdurani, vhalbert
Target Milestone: ER1Keywords: QA-Closed
Target Release: 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1210714 (view as bug list) Environment:
Last Closed: 2016-02-10 08:54:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hisao Furuichi 2015-04-10 06:35:24 UTC
Describe the issue: 
Setting more than 513MB for buffer-service-max-storage-object-size, OOME occurs at org.teiid.common.buffer.impl.BufferFrontedFileStoreCache.initialize().

One of our user needs to set more than 512MB for buffer-service-max-storage-object-size to avoid TEIID30001[1], this limitation becomes a critical issue for them.

[1]
TEIID30001 Max block number exceeded by 233,144 21,422,155. Increase the maxStorageObjectSize to support larger storage objects.  Alternatively you could make the processor batch size smaller.

How to reproduce:
1: Set 600MB for buffer-service-max-storage-object-size
2: Start JBoss DV

Expected result:
JBoss DV can boot up.

Actual result:
OOME occurs.

Additional Information:
- By taking look at the source code[2], if the value of maxStorageObjectSize is more than equals with 536870912, the loop becomes infinit, and will cause OOME.

- The same issue occurs with JBoss DV 6.1

[2]teiid/engine/src/main/java/org/teiid/common/buffer/impl/BufferFrontedFileStoreCache.java
===
public static final long MAX_ADDRESSABLE_MEMORY = 1l<<(ADDRESS_BITS+LOG_BLOCK_SIZE);
~~
static final int BLOCK_SIZE = 1 << LOG_BLOCK_SIZE;
~~
public void initialize() throws TeiidComponentException {
~~
  List<BlockStore> stores = new ArrayList<BlockStore>();
  int size = BLOCK_SIZE;
  int files = 32; //this allows us to have 64 terabytes of smaller block sizes
  do {
    stores.add(new BlockStore(this.storageManager, size, 30, files));
    size <<=1;
    if (files > 1) {
      files >>= 1;
    }
  } while ((size>>1) < maxStorageObjectSize);
~~
===

Comment 2 JBoss JIRA Server 2015-04-10 11:43:35 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3422 to Resolved

Comment 4 JBoss JIRA Server 2015-10-11 14:18:30 UTC
Steven Hawkins <shawkins> updated the status of jira TEIID-3422 to Closed