What does "Illegal page length" mean?

54 views
Skip to first unread message

John Schmitt

unread,
Aug 27, 2025, 2:43:28 PM (11 days ago) Aug 27
to Repo and Gerrit Discussion
I'm running reindex to upgrade from 3.11 to 3.12. I'm seeing this:

[2025-08-27 17:56:40,511] [Index-Batch-1[Index changes slice 69/109 of project a-git-project][a-git-project-69]] WARN com.google.gerrit.server.cache.h2.H2CacheImpl : Cannot read cache jdbc:h2:file:///gerrit/gerrit/cache/git_file_diff-v2 for GitFileDiffCacheKey{project=a-git-project, oldTree=tree 3cec52287d355675abfd5b8db6b2f21dacd1a851 -------, newTree=tree 1982961389340fbaa3ac0b
0d942efb97d1df6fbc -------, newFilePath=some-file-path, renameScore=60, diffAlgorithm=HISTOGRAM_WITH_FALLBACK_MYERS, whitespace=IGNORE_NONE, useTimeout=true}
org.h2.jdbc.JdbcSQLNonTransientException: General error: "org.h2.mvstore.MVStoreException: Illegal page length -2103318 reading at 49485846; max pos 47382528 [2.3.232/6]"; SQL statement:
SELECT v, created FROM data WHERE k=? AND version=? [50000-232]

I thought changing maxObjectSizeLimit might fix this:

[receive]
        inheritProjectMaxObjectSizeLimit = false
        maxObjectSizeLimit = 1g

It doesn't seem to make a difference.

What am I missing?

Matthias Sohn

unread,
Aug 28, 2025, 12:46:27 AM (10 days ago) Aug 28
to John Schmitt, Repo and Gerrit Discussion
This setting is unrelated to indexes and prevents uploading a packfile containing objects larger than this limit.

It doesn't seem to make a difference.

What am I missing?

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/3995f783-e45d-4ed3-89cc-6be2d84fab1en%40googlegroups.com.

Thomas Wolf

unread,
Sep 2, 2025, 2:33:48 PM (5 days ago) Sep 2
to Repo and Gerrit Discussion
On Wednesday, August 27, 2025 at 8:43:28 PM UTC+2 John Schmitt wrote:
I'm running reindex to upgrade from 3.11 to 3.12. I'm seeing this:
[...]
org.h2.jdbc.JdbcSQLNonTransientException: General error: "org.h2.mvstore.MVStoreException: Illegal page length -2103318 reading at 49485846; max pos 47382528 [2.3.232/6]"; SQL statement:
SELECT v, created FROM data WHERE k=? AND version=? [50000-232]

Did you upgrade the existing H2 databases to the new H2 version? Gerrit upgraded H2 from version 1.3.176 to 2.3.232. This requires rebuilding/migrating the H2 databases used for caches

If not, use the migration script provided at [1] for the caches. I think the database at ./db/account_patch_reviews.h2.db also needs to be migrated.


Cheers,

  Thomas

Matthias Sohn

unread,
Sep 2, 2025, 4:22:12 PM (5 days ago) Sep 2
to Thomas Wolf, Repo and Gerrit Discussion
On Tue, Sep 2, 2025 at 8:33 PM Thomas Wolf <t.wo...@gmail.com> wrote:

On Wednesday, August 27, 2025 at 8:43:28 PM UTC+2 John Schmitt wrote:
I'm running reindex to upgrade from 3.11 to 3.12. I'm seeing this:
[...]
org.h2.jdbc.JdbcSQLNonTransientException: General error: "org.h2.mvstore.MVStoreException: Illegal page length -2103318 reading at 49485846; max pos 47382528 [2.3.232/6]"; SQL statement:
SELECT v, created FROM data WHERE k=? AND version=? [50000-232]

Did you upgrade the existing H2 databases to the new H2 version? Gerrit upgraded H2 from version 1.3.176 to 2.3.232. This requires rebuilding/migrating the H2 databases used for caches

With h2 version 2.x we use different file names for the database files than the ones we used with h2 version 1.x.
This means if you don't migrate the old caches, new empty databases will be created for persistent caches.
 
If not, use the migration script provided at [1] for the caches. I think the database at ./db/account_patch_reviews.h2.db also needs to be migrated. 
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.

Thomas Wolf

unread,
Sep 2, 2025, 4:56:59 PM (5 days ago) Sep 2
to Repo and Gerrit Discussion
On Tuesday, September 2, 2025 at 10:22:12 PM UTC+2 Matthias Sohn wrote:
On Tue, Sep 2, 2025 at 8:33 PM Thomas Wolf <t.wo...@gmail.com> wrote:

On Wednesday, August 27, 2025 at 8:43:28 PM UTC+2 John Schmitt wrote:
I'm running reindex to upgrade from 3.11 to 3.12. I'm seeing this:
[...]
org.h2.jdbc.JdbcSQLNonTransientException: General error: "org.h2.mvstore.MVStoreException: Illegal page length -2103318 reading at 49485846; max pos 47382528 [2.3.232/6]"; SQL statement:
SELECT v, created FROM data WHERE k=? AND version=? [50000-232]

Did you upgrade the existing H2 databases to the new H2 version? Gerrit upgraded H2 from version 1.3.176 to 2.3.232. This requires rebuilding/migrating the H2 databases used for caches

With h2 version 2.x we use different file names for the database files than the ones we used with h2 version 1.x.
This means if you don't migrate the old caches, new empty databases will be created for persistent caches.

Right, forgot about that bit.

In any case the exception indicates a problem with the H2 database ./cache/git_file_diff-v2. It doesn't tell _why_ H2 has a problem with it, though.

Cheers,

  Thomas

Matthias Sohn

unread,
Sep 2, 2025, 5:04:34 PM (5 days ago) Sep 2
to Thomas Wolf, Repo and Gerrit Discussion
If the h2 database e.g. "git_file_diff-v2.mv.db" faces errors you'll find error logs in the corresponding 
trace file "git_file_diff-v2.trace.db" in the site's cache directory. 

Cheers,

  Thomas

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages