On 08/02/2021 11:28, John English wrote:
In the last few days I've suddenly had a bunch of OOM exceptions. I'm using Derby 10.9.1.0, Oracle Java 1.8.0 on Ubuntu 64-bit, and haven't upgraded for a while (probably years, looking at those numbers).

The place where they happen is in a call to executeQuery() in a method which displays a view as a table.

Following on from what I wrote earlier, another of the heap dumps shows the exception happening at the same executeQuery() call, but the first few stack trace look like this:

at org.apache.derby.iapi.types.SQLChar.<init>(Ljava/lang/String;)V (Unknown Source) at org.apache.derby.iapi.types.SQLVarchar.<init>(Ljava/lang/String;)V (Unknown Source) at org.apache.derby.iapi.types.SQLVarchar.cloneValue(Z)Lorg/apache/derby/iapi/types/DataValueDescriptor; (Unknown Source) at org.apache.derby.impl.sql.execute.BasicSortObserver.getClone([Lorg/apache/derby/iapi/types/DataValueDescriptor;)[Lorg/apache/derby/iapi/types/DataValueDescriptor; (Unknown Source) at org.apache.derby.impl.sql.execute.BasicSortObserver.insertNonDuplicateKey([Lorg/apache/derby/iapi/types/DataValueDescriptor;)[Lorg/apache/derby/iapi/types/DataValueDescriptor; (Unknown Source) at org.apache.derby.impl.store.access.sort.SortBuffer.insert([Lorg/apache/derby/iapi/types/DataValueDescriptor;)I (Unknown Source) at org.apache.derby.impl.store.access.sort.MergeInserter.insert([Lorg/apache/derby/iapi/types/DataValueDescriptor;)V (Unknown Source) at org.apache.derby.impl.sql.execute.SortResultSet.loadSorter()Lorg/apache/derby/iapi/store/access/ScanController; (Unknown Source)

The leak suspects seem to be the same:

One instance of "org.apache.derby.impl.store.access.sort.SortBuffer" loaded by "org.eclipse.jetty.webapp.WebAppClassLoader @ 0xf047e888" occupies 157,386,240 (74.59%) bytes. The memory is accumulated in one instance of "org.apache.derby.impl.store.access.sort.SortBuffer", loaded by "org.eclipse.jetty.webapp.WebAppClassLoader @ 0xf047e888", which occupies 157,386,240 (74.59%) bytes.

One instance of "org.apache.derby.impl.services.cache.ConcurrentCache" loaded by "org.eclipse.jetty.webapp.WebAppClassLoader @ 0xf047e888" occupies 42,742,864 (20.26%) bytes. The memory is accumulated in one instance of "org.apache.derby.impl.services.cache.ConcurrentCache", loaded by "org.eclipse.jetty.webapp.WebAppClassLoader @ 0xf047e888", which occupies 42,742,864 (20.26%) bytes.

--
John English

Reply via email to