Hi,

In my application I have multiple threads converting and pumping data
into my embedded H2-1.3.153 database under J2SE 1.5.0.22 running on
Windows Vista and I experience a deadlock between two of the threads
that is not detected by H2. The JDBC connection string only contains
the database file name but the connection properties are set as
follows:

IFEXISTS = true
LOCK_TIMEOUT = 10000
MULTI_THREADED = 1
LOG = 0
CACHE_SIZE = 65536
UNDO_LOG = 0

Note that the last three options are only set when importing data,
they are not used when the application is in "normal" operation. For
detecting the deadlock I have used the NetBeans IDE Debugger, which
unfortunately does not permit to print the stack traces, but it
therefore nicely shows the monitors held. Thus, I will do my best
below to type the stack traces (and the monitors):

Waiting for monitor org.h2.engine.Database
org.h2.command.Command.executeQuery:176
org.h2.jdbc.JdbcPreparedStatement.executeQuery:96
    holding monitor org.h2.engine.Session
org.h2.store.LobStorage.getNextLobId:113
org.h2.store.LobStorage.addLob:328
    holding monitor org.h2.store.LobStorage
org.h2.store.LobStorage.createClob:639
org.h2.jdbc.JdbcConnection.createClob:1659
org.h2.jdbc.JdbcPreparedStatement.setCharacterStream:990
org.h2.jdbc.JdbcPreparedStatement.setCharacterStream:957
org.apache.commons.dbcp.DelegatingPreparedStatement.setCharacterStream:
178
org.apache.commons.dbcp.DelegatingPreparedStatement.setCharacterStream:
178
org.apache.commons.dbcp.DelegatingPreparedStatement.setCharacterStream:
178
org.hibernate.type.descriptor.sql.ClobTypeDescriptor$3$1.doBind:84
org.hibernate.type.descriptor.sql.BasicBinder.bind:91
org.hibernate.type.AbstractStandardBasicType.nullSafeSet:282
org.hibernate.type.AbstractStandardBasicType.nullSafeSet:277
org.hibernate.type.AbstractSingleColumnStandardBasicType.nullSafeSet:
89
org.hibernate.persister.entity.AbstractEntityPersister.dehydrate:2184
org.hibernate.persister.entity.AbstractEntityPersister.insert:2430
org.hibernate.persister.entity.AbstractEntityPersister.insert:2874
org.hibernate.action.EntityInsertAction.execute:79
org.hibernate.engine.ActionQueue.execute:273
org.hibernate.engine.ActionQueue.executeActions:265
org.hibernate.engine.ActionQueue.executeActions:184
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions:
321
org.hibernate.event.def.DefaultFlushEventListener.onFlush:51
org.hibernate.impl.SessionImpl.flush:1216
org.hibernate.impl.SessionImpl.managedFlush:383
org.hibernate.transaction.JDBCTransaction.commit:133
org.hibernate.ejb.TransactionImpl.commit:76
...following application classes...


Waiting for monitor org.h2.store.LobStorage
org.h2.store.LobStorage.reuse:297
org.h2.store.LobStorage.setTable:660
org.h2.value.ValueLobDb.link:148
org.h2.index.PageDataIndex.add:111
org.h2.table.RegularTable.addRow:127
org.h2.command.dml.Insert.insertRows:126
org.h2.command.dml.Insert.update:86
org.h2.command.CommandContainer.update:69
org.h2.command.Command.executeUpdate:212
    holding monitor org.h2.engine.Database
org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal:143
    holding monitor org.h2.engine.Session
org.h2.jdbc.JdbcPreparedStatement.executeBatch:1092
org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch:297
org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch:297
org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch:297
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch:70
org.hibernate.jdbc.AbstractBatcher.executeBatch:268
org.hibernate.engine.ActionQueue.executeActions:268
org.hibernate.engine.ActionQueue.executeActions:184
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions:
321
org.hibernate.event.def.DefaultFlushEventListener.onFlush:51
org.hibernate.impl.SessionImpl.flush:1216
org.hibernate.impl.SessionImpl.managedFlush:383
org.hibernate.transaction.JDBCTransaction.commit:133
org.hibernate.ejb.TransactionImpl.commit:76
...following application classes...


Best regards,
Michael

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to