jankotek/JDBM3 — Issue #2: java.lang.StackOverflowError on BTree
Author: terry239
Created: 2012-02-02 21:06:06+00:00
State: open

Example bellow fails on commit (but if commit chunk size equals data size 100000, also fails on put i = 32597)

build = new DBMaker("test.tree.dbm").setMRUCacheSize(100).build();
Map treeMap = build.createTreeMap("treeMap");
for (int i = 0; i < 100000; i++) {
System.out.println(i);
treeMap.put(i + "asdddfffffffffffffffffffdgf" + i + "sddfdfsfddddddddddddddddd" + i, "dsfgfg.dfcdfsgfgfffffffffffffffffdddddddddd");
if (i % 10000 == 0) {
build.commit();
}
}
build.commit();
build.close();

java.lang.StackOverflowError
at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:240)
at java.lang.StringCoding.encode(StringCoding.java:272)
at java.lang.StringCoding.encode(StringCoding.java:284)
at java.lang.String.getBytes(String.java:986)
at net.kotek.jdbm.BTreeNode.writeKeys(BTreeNode.java:1237)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:983)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)