Annotating the stack trace reveals this: Command#executeQuery which takes a lock on a Database object JdbcPreparedStatement#executeQuery takes a lock on a Session object LobStorage.LobInputStream#fillBuffer LobStorage.LobInputStream#readFully LobStorage.LobInputStream#read IOUtils#copy IOUtils#copy IOUtils#copyAndCloseInput Transfer#writeValue TcpServerThread#sendRow
JdbcPreparedStatement#executeUpdateInternal takes a lock on a Session object JdbcPreparedStatement#executeUpdate LobStorage#setTable ValueLobDb#link PageDataIndex#add RegularTable#addRow Insert#insertRows Insert#update CommandContainer#update Command#executeUpdate which takes a lock on a Database object The normal solution is taking multiple locks is to enforce a strict ordering, where lock B can only be taken after lock A. I'm not sure what the correct solution here is, we'll have to wait for Thomas to get back. Please can you log this in the issue tracker: http://code.google.com/p/h2database/issues/list So we don't forget it. Thanks. erinmtan wrote: > Hello Community and Hello Tom! > > Apologies if I'm on the wrong support group, but this Jackrabbit setup works > with Apache Derby, that's why I thought I > start asking here for insight. > > I'm using a two node Jackrabbit Cluster with a H2 backed DatabaseJournal. The > nodes and H2 run in separate processes > on the same windows box (=3 jvm processes). The nodes talk via jdbc(tcp) to > the one H2 jvm process. > > When only one clusternode process is started, everything is fine. However, > when the second one is started as well, a > couple of seconds later the H2 jvm process deadlocks (see profiler > printscreen). I have the feeling this occurs when > the "sync period" of the other clusternode is due, meaning when the second > node wakes up to read the journal in order > to get up to date. > > We are using the following: > H2 1.3.154 > Jackrabbit 2.2.4 > Windows 2008 Server R2 64bit > > Konfiguration of Clusternodes: > <Cluster id="node_batch" syncDelay="10000"> > <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal"> > <param name="driver" value="org.h2.Driver" /> > <param name="url" value="jdbc:h2:tcp://127.0.0.1/journal"/> > <param name="schemaObjectPrefix" value="journal_"/> > <param name="databaseType" value="h2"/> > <param name="user" value="sa"/> > <param name="password" value="sa"/> > </Journal> > </Cluster> > ... > <Cluster id="node_online" syncDelay="10000"> > <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal"> > <param name="driver" value="org.h2.Driver" /> > <param name="url" value="jdbc:h2:tcp://127.0.0.1/journal"/> > <param name="schemaObjectPrefix" value="journal_"/> > <param name="databaseType" value="h2"/> > <param name="user" value="sa"/> > <param name="password" value="sa"/> > </Journal> > </Cluster> > > H2 runs "embedded" in a dedicated Java program started/stopped as follows: > > h2JournalServer = Server.createTcpServer("-baseDir", BASEDIR).start(); > ... > h2JournalServer.stop(); > > Any tips / clues would be appreciated, > Thx, Tanju > > -- > 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. -- 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.
