New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
H2 shows StackOverflowError when flush data to file. #3732
Comments
The DB is most likely corrupted, if you have stack-overflow there. I would suggest updating to a newer version, or even building from the repo. |
Hi @grandinj thanks for your reply. Currently, the StackOverflowError happens several times a day in my lab. But it can work fine on another server with the same version, configuration, and table structure. So I want to know the root cause. And how to avoid a repeat of it。 PS: All SQL and operations are normal, nothing special。 |
It is probably a bug in H2, and we have fixed some similar bugs in the last couple of releases, so upgrading might solve it. If upgrading does not solve it, then it is a new bug. |
Could you mind to provide the similar bugs Id or links that have been fixed? |
In the cluster mode of H2 version 2.1.212, H2 shows StackOverflowError when flush data to file.
Looks like recursion is going on but not ending normally.
2023-02-07 05:02:51.857 [H2-serialization] [ERROR] h2database - biz_HA:database flush
org.h2.message.DbException: General error: "org.h2.mvstore.MVStoreException: java.lang.StackOverflowError [2.1.212/3]" [50000-212]
at org.h2.message.DbException.get(DbException.java:212)
at org.h2.message.DbException.convert(DbException.java:395)
at org.h2.mvstore.db.Store.lambda$new$0(Store.java:124)
at org.h2.mvstore.MVStore.handleException(MVStore.java:3349)
at org.h2.mvstore.MVStore.panic(MVStore.java:590)
at org.h2.mvstore.MVStore.serializeAndStore(MVStore.java:1617)
at org.h2.mvstore.MVStore.lambda$storeNow$4(MVStore.java:1530)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: org.h2.jdbc.JdbcSQLNonTransientException: General error: "org.h2.mvstore.MVStoreException: java.lang.StackOverflowError [2.1.212/3]" [50000-212]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:554)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:477)
... 12 common frames omitted
Caused by: org.h2.mvstore.MVStoreException: java.lang.StackOverflowError [2.1.212/3]
at org.h2.mvstore.DataUtils.newMVStoreException(DataUtils.java:1004)
... 7 common frames omitted
Caused by: java.lang.StackOverflowError: null
at org.h2.mvstore.type.BasicDataType.write(BasicDataType.java:67)
at org.h2.mvstore.Page.write(Page.java:720)
at org.h2.mvstore.Page$NonLeaf.writeUnsavedRecursive(Page.java:1329)
at org.h2.mvstore.Page$NonLeaf.writeChildrenRecursive(Page.java:1344)
at org.h2.mvstore.Page$NonLeaf.writeUnsavedRecursive(Page.java:1330)
at org.h2.mvstore.Page$NonLeaf.writeChildrenRecursive(Page.java:1344)
at org.h2.mvstore.Page$NonLeaf.writeUnsavedRecursive(Page.java:1330)
at org.h2.mvstore.Page$NonLeaf.writeChildrenRecursive(Page.java:1344)
at org.h2.mvstore.Page$NonLeaf.writeUnsavedRecursive(Page.java:1330)
at org.h2.mvstore.Page$NonLeaf.writeChildrenRecursive(Page.java:1344)
at org.h2.mvstore.Page$NonLeaf.writeUnsavedRecursive(Page.java:1330)
at org.h2.mvstore.Page$NonLeaf.writeChildrenRecursive(Page.java:1344)
at org.h2.mvstore.Page$NonLeaf.writeUnsavedRecursive(Page.java:1330)
at org.h2.mvstore.Page$NonLeaf.writeChildrenRecursive(Page.java:1344)
at org.h2.mvstore.Page$NonLeaf.writeUnsavedRecursive(Page.java:1330)
at org.h2.mvstore.Page$NonLeaf.writeChildrenRecursive(Page.java:1344)
at org.h2.mvstore.Page$NonLeaf.writeUnsavedRecursive(Page.java:1330)
at org.h2.mvstore.Page$NonLeaf.writeChildrenRecursive(Page.java:1344)
at org.h2.mvstore.Page$NonLeaf.writeUnsavedRecursive(Page.java:1330)
The text was updated successfully, but these errors were encountered: