[BUG] Docker starts "successfully" and loops forever when sqlite database is corrupt
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start by reproducing the restart with corrupted index-v2 SQLite files and review the resulting container logs. Trace how the startup path handles the reported database-open error; done means the container exits with failure instead of repeatedly restarting or looping.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I had a hard container shutdown (on Unraid) and my sqlite database got corrupted somehow. When the container restarted it started "successfully" but actually was looping this error forever:
2026-02-03 10:38:41 INF syncthing v2.0.14 "Hafnium Hornet" (go1.24.12 linux-amd64) root@buildkitsandbox 2026-02-03 09:33:54 UTC [modernc-sqlite, noupgrade] (log.pkg=main) 2026-02-03 10:38:41 ERR Error opening database (error="openbase (PRAGMA optimize = 0x10002): database disk image is malformed (11)" log.pkg=main)
Expected Behavior
Container should fail to start instead of getting stuck in an error loop.
Steps To Reproduce
- Install container
- Corrupt index-v2 sqlite files
- Restart container
Environment
- Unraid 7.2.3
- Syncthing v2.0.14, Linux (64-bit Intel/AMD Container)
- Docker installed via Community Applications
CPU architecture
x86-64
Docker creation
Community Application template defaults
Container logs
2026-02-03 10:38:41 INF syncthing v2.0.14 "Hafnium Hornet" (go1.24.12 linux-amd64) root@buildkitsandbox 2026-02-03 09:33:54 UTC [modernc-sqlite, noupgrade] (log.pkg=main)
2026-02-03 10:38:41 ERR Error opening database (error="openbase (PRAGMA optimize = 0x10002): database disk image is malformed (11)" log.pkg=main)
- Dominant language
- Dockerfile
- Stars
- 372
- Forks
- 51
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
AstrBotDevs/AstrBot#10205 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OHDSI/Data2Evidence#3394 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100