h2database / h2database/h2database

Store header is corrupt

Open
#3,307 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.6k
Forks
1.3k
Avg merge
1d 2h
Merged PRs (30d)
9

Description

This is the error which is triggered everytime on compacting db.

Caused by: org.h2.jdbc.JdbcSQLNonTransientException: IO Exception: "Closing" [90028-198]
Caused by: java.lang.IllegalStateException: Store header is corrupt: split:30:/data/data/org.briarproject.briar.android.debug/app_db/db.mv.db [1.4.198/6]

Database:
https://code.briarproject.org/briar/briar/-/blob/master/bramble-core/src/main/java/org/briarproject/bramble/db/H2Database.java#L60

Compact and close:
https://code.briarproject.org/briar/briar/-/blob/master/bramble-core/src/main/java/org/briarproject/bramble/db/H2Database.java#L116

https://code.briarproject.org/briar/briar/-/blob/master/bramble-core/src/main/java/org/briarproject/bramble/db/JdbcDatabase.java#L429

Replacing "SHUTDOWN COMPACT" with "SHUTDOWN" does not trigger any error.
Removing CIPHER=AES does not trigger any error.

Error started from 1.4.198 and is present with the lastest 2.0.204.

Full trace log:
db.trace.txt

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with bramble-core/src/main/java/org/briarproject/bramble/db/H2Database.java at the database and compact/close references, then inspect JdbcDatabase.java around line 429 and the attached db.trace.txt. Reproduce encrypted database compaction using SHUTDOWN COMPACT and compare it with SHUTDOWN or without CIPHER=AES; done means compaction no longer reports a corrupt store header.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.