feristhia / h2database

Automatically exported from code.google.com/p/h2database
0 stars 1 forks source link

Deadlock in H2 1.4.180 with MVStore #574

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Occurred on my test server when multiple threads were concurrently writing to 
the DB.

Name: DBHistoryCreator-4 | u:p | sql: 
subterra:data-service:objects:/default/PolarionSVN${TestRun}20140713-2200_perfor
mance_java7%542104
State: BLOCKED on org.h2.mvstore.MVStore@4b233bcf owned by: MVStore background 
writer 
nio:/opt/polarion/data/workspace/polarion-data/database/polarion_history.mv.db
Total blocked: 2 421 469  Total waited: 34 710

Stack trace:
org.h2.mvstore.MVStore.commitAndSave(MVStore.java:888)
org.h2.mvstore.MVStore.beforeWrite(MVStore.java:2104)
org.h2.mvstore.MVMap.beforeWrite(MVMap.java:1052)
org.h2.mvstore.MVMapConcurrent.put(MVMapConcurrent.java:43)
org.h2.mvstore.MVMap.putIfAbsent(MVMap.java:595)
   - locked org.h2.mvstore.MVMapConcurrent@1fa646d9
org.h2.mvstore.db.TransactionStore$TransactionMap.trySet(TransactionStore.java:1
089)
org.h2.mvstore.db.TransactionStore$TransactionMap.set(TransactionStore.java:1011
)
org.h2.mvstore.db.TransactionStore$TransactionMap.put(TransactionStore.java:989)
org.h2.mvstore.db.MVSecondaryIndex.add(MVSecondaryIndex.java:209)
org.h2.mvstore.db.MVTable.addRow(MVTable.java:620)
org.h2.command.dml.Insert.insertRows(Insert.java:156)
org.h2.command.dml.Insert.update(Insert.java:114)
org.h2.command.CommandContainer.update(CommandContainer.java:78)
org.h2.command.Command.executeUpdate(Command.java:254)
   - locked org.h2.engine.Session@1490a1f4
org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:198)
   - locked org.h2.engine.Session@1490a1f4
...

Name: MVStore background writer 
nio:/opt/polarion/data/workspace/polarion-data/database/polarion_history.mv.db
State: BLOCKED on org.h2.mvstore.MVMapConcurrent@1fa646d9 owned by: 
DBHistoryCreator-4 | u:p | sql: 
subterra:data-service:objects:/default/PolarionSVN${TestRun}20140713-2200_perfor
mance_java7%542104
Total blocked: 87  Total waited: 770 354

Stack trace:
org.h2.mvstore.MVMapConcurrent.put(MVMapConcurrent.java:49)
org.h2.mvstore.MVMap.rewrite(MVMap.java:814)
org.h2.mvstore.MVMap.rewrite(MVMap.java:829)
org.h2.mvstore.MVMap.rewrite(MVMap.java:829)
org.h2.mvstore.MVMap.rewrite(MVMap.java:829)
org.h2.mvstore.MVMap.rewrite(MVMap.java:829)
org.h2.mvstore.MVMap.rewrite(MVMap.java:797)
org.h2.mvstore.MVStore.compact(MVStore.java:1627)
   - locked org.h2.mvstore.MVStore@4b233bcf
org.h2.mvstore.MVStore.commitInBackground(MVStore.java:2384)
org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:2573)

Original issue reported on code.google.com by radek.kr...@gmail.com on 24 Jul 2014 at 7:42

GoogleCodeExporter commented 9 years ago
I don't see a deadlock in there... Does the JVM say it's a deadlock? Maybe it's 
just slow?

Anyway, could you try again with version 1.4.181?

Original comment by thomas.t...@gmail.com on 8 Aug 2014 at 9:28

GoogleCodeExporter commented 9 years ago
Yes, the JVM says it's a deadlock.

I'll do new tests with version 1.4.181 this week. As I checked the recent 
commits, the issue is probably already fixed.

Original comment by radek.kr...@gmail.com on 11 Aug 2014 at 3:00

GoogleCodeExporter commented 9 years ago
Closing this issue for lack of feedback.

Original comment by noelgrandin on 6 Jan 2015 at 7:57