View Issue Details

IDProjectCategoryView StatusLast Update
0003382SymmetricDSBugpublic2021-11-17 16:00
Reporterandythuering Assigned Topmarzullo  
Status closedResolutionfixed 
Product Version3.9.2 
Target Version3.13.0Fixed in Version3.13.0 
Summary0003382: MV-Store DB corrupt after stopping SymmetricDS replication software
DescriptionUsing the db replication software SymmetricDS with a MV-Store DB leads to DB corruption and crash of h2 after SymmetricDS is stopped. H2 Versions 1.4.195 and 1.4.196 are affected, older versions were not tested. Migration to PageStore is a workaround.
After starting h2 again reconnection e.g. via Shell works sometimes. On disconnect the following stack trace is shown:
sql> quit
SQL Exception: General error: "java.lang.IllegalStateException: This map is closed [1.4.196/4]" [50000-196]
org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalStateException: This map is closed [1.4.196/4]" [50000-196]
at org.h2.message.DbException.getJdbcSQLException(
at org.h2.message.DbException.get(
at org.h2.message.DbException.convert(
at org.h2.server.TcpServerThread.sendError(
Caused by: java.lang.IllegalStateException: This map is closed [1.4.196/4]
at org.h2.mvstore.DataUtils.newIllegalStateException(
at org.h2.mvstore.MVMap.beforeWrite(
at org.h2.mvstore.MVMap.remove(
at org.h2.value.ValueLobDb.remove(
at org.h2.engine.Session.removeTemporaryLobs(
at org.h2.engine.Session.close(
at org.h2.engine.Database.closeOpenFilesAndUnlock(
at org.h2.engine.Database.close(
at org.h2.engine.Database.removeSession(
at org.h2.engine.Session.close(
at org.h2.server.TcpServerThread.closeSession(
at org.h2.server.TcpServerThread.process(
... 1 more

at org.h2.engine.SessionRemote.done(
at org.h2.engine.SessionRemote.close(
at org.h2.jdbc.JdbcConnection.close(

After this a restart of h2 is needed to get a connection again to the database, connections are no more possible otherwise.
I suppose that SymmetricDS does not close the connections correctly, but this should not lead to a database corruption. The replicated table has some lob fields.
Steps To ReproduceUse h2 database version 1.4.195 or 1.4.196, create a database with the MV-storage engine. Establish a table replication with a table which contains lob fields (not sure if the cause has to to with lobs). Quit SymDS, try reconnecting with a db client to the database. H2 has crashed and a reconnection only works after a restart of h2. On quitting a connection always a "This map is closed" stacktrace occurs and a restart of h2 is needed. Is it possible that SymDS does not close the connections to the db properly on exit?


related to 0003897 closedpmarzullo Cleanly exit all job threads when engine is stopped 


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2018-01-19 16:29 andythuering New Issue
2019-04-24 17:15 elong Relationship added related to 0003897
2019-04-24 17:16 elong Tag Attached: sym/sym_service
2019-05-13 18:26 elong Assigned To => pmarzullo
2019-05-13 18:26 elong Status new => assigned
2019-05-13 18:26 elong Target Version => 3.10.3
2019-06-24 17:45 elong Target Version 3.10.3 => 3.10.4
2019-08-09 19:41 elong Target Version 3.10.4 => 3.10.5
2019-10-31 14:59 admin Target Version 3.10.5 => 3.10.6
2019-11-14 19:47 elong Target Version 3.10.6 => 3.10.7
2019-12-09 15:25 admin Target Version 3.10.7 => 3.10.8
2020-01-02 14:40 admin Target Version 3.10.8 => 3.10.9
2020-01-22 19:03 elong Target Version 3.10.9 => 3.10.10
2020-02-14 13:46 elong Target Version 3.10.10 => 3.10.11
2020-03-16 20:10 admin Target Version 3.10.11 => 3.12.0
2020-05-26 12:27 elong Target Version 3.12.0 => 3.13.0
2021-06-14 19:05 pmarzullo Status assigned => resolved
2021-06-14 19:05 pmarzullo Resolution open => fixed
2021-06-14 19:05 pmarzullo Fixed in Version => 3.13.0
2021-11-17 16:00 admin Status resolved => closed