Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG] Docker starts "successfully" and loops forever when sqlite database is corrupt

Open
#100 16 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, sqlite
Domain
databases, devops

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
  1. Install container
  2. Corrupt index-v2 sqlite files
  3. 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

Open the contributing guide

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.

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.