Today we experienced another database corruption. The difference with earlier cases is that this time it happened during normal production use of the system while the previous cases seemed to occur during nightly system restarts.
The system is a Ubuntu 19.04 server running a singular standalone Java server application with OpenJDK 12. The server application accesses a couple of hundred H2 file-based (MVStore) databases in embedded mode. The connection pool takes care of limiting the number of concurrently open connections to a maximum of 99. Since we have been running this setup about 20-fold during multiple years without ever experiencing this until we upgraded from h2-1.4.196 to h2-1.4.199 I am convinced something has changed for the worse between these versions. This is the stack trace: 2019-05-17 15:35:43 database: flush org.h2.message.DbException: General error: "java.lang.IllegalStateException: File corrupted in chunk 16664, expected page length 4..1536, got 1768842341 [1.4.199/6]" [50000-199] at org.h2.message.DbException.get(DbException.java:194) at org.h2.message.DbException.convert(DbException.java:347) at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:90) at org.h2.mvstore.MVStore.handleException(MVStore.java:2787) at org.h2.mvstore.MVStore.panic(MVStore.java:441) at org.h2.mvstore.MVStore.<init>(MVStore.java:404) at org.h2.mvstore.MVStore$Builder.open(MVStore.java:3343) at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:162) at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:95) at org.h2.engine.Database.getPageStore(Database.java:2739) at org.h2.engine.Database.open(Database.java:769) at org.h2.engine.Database.openDatabase(Database.java:319) at org.h2.engine.Database.<init>(Database.java:313) at org.h2.engine.Engine.openSession(Engine.java:69) at org.h2.engine.Engine.openSession(Engine.java:201) at org.h2.engine.Engine.createSessionAndValidate(Engine.java:178) at org.h2.engine.Engine.createSession(Engine.java:161) at org.h2.engine.Engine.createSession(Engine.java:31) at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:336) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:169) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:148) at org.h2.Driver.connect(Driver.java:69) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677) at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228) -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/c0b4841a-ec22-478e-9568-55ed71e77e25%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
