#826859 sqlite3 quickly corrupts its own database

Package:
libsqlite3-0
Source:
sqlite3
Description:
SQLite 3 shared library
Submitter:
Christoph Egger
Date:
2026-11-01 10:03:02 UTC
Severity:
important
#826859#5
Date:
2016-06-09 14:55:41 UTC
From:
To:
Hi!

  This is the second time sqlite managed to corrupt its database in
the last week on this system. The sqlite is located on a ext3
filesystem with lots of free space. Unfortunately the corrupted
sqlite3 contains private keys so I can't provide the database or one
of the daily backups.

  Christoph

# sqlite3 asdf1234 vacuum
Error: database disk image is malformed

#826859#10
Date:
2016-06-10 06:39:57 UTC
From:
To:
Hi Cristoph,
 May you give me pointers? Is it a big database, uses concurrent
access, is the CPU load high? Any chance you may reproduce it with a
non-confidental dataset?
I think the best would be to subscribe to the SQLite3 users list[1];
upstream may help without giving out your data.

Regards,
Laszlo/GCS
[1] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

#826859#15
Date:
2016-06-10 09:58:06 UTC
From:
To:
Hi!

"László Böszörményi (GCS)" <gcs@debian.org> writes:

~1.3 MiB

There's two processes accessing the database. It also currently runns in
WAL mode.

CPU can get max'ed. This is just a 900MHz mipsel and it's some things
that require quite some computation

I can try. Not in the next 2 weeks though, sorry.

  Christoph

#826859#20
Date:
2026-11-01 09:03:47 UTC
From:
To:
In the meantime, another serious sqlite corruption bug has been found
for DBs running in wal mode, which I have been reported against Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/sqlite3/+bug/2171337.

Maybe it should get fixed in Debian as well.

On Fri, 10 Jun 2016 11:58:06 +0200 Christoph Egger
<christoph@christoph-egger.org> wrote:

 > Hi!
 >
 > "László Böszörményi (GCS)" <gcs@debian.org> writes:
 > > On Thu, Jun 9, 2016 at 4:55 PM, Christoph Egger
<christoph@debian.org> wrote:
 > >> This is the second time sqlite managed to corrupt its database in
 > >> the last week on this system. The sqlite is located on a ext3
 > >> filesystem with lots of free space. Unfortunately the corrupted
 > >> sqlite3 contains private keys so I can't provide the database or one
 > >> of the daily backups.
 >
 > > May you give me pointers?
 > > Is it a big database,
 >
 > ~1.3 MiB
 >
 > > uses concurrent access,
 >
 > There's two processes accessing the database. It also currently runns in
 > WAL mode.
 >
 > > is the CPU load high?
 >
 > CPU can get max'ed. This is just a 900MHz mipsel and it's some things
 > that require quite some computation
 >
 > > Any chance you may reproduce it with a non-confidental dataset?
 >
 > I can try. Not in the next 2 weeks though, sorry.
 >
 > Christoph
 >
 > --
 > 9FED 5C6C E206 B70A 5857 70CA 9655 22B9 D49A E731
 > Debian Developer | Lisp Hacker | CaCert Assurer
 >
 >

#826859#25
Date:
2026-11-01 10:02:01 UTC
From:
To:
Hi Matthias,
 Thanks for the heads-up. Is there any test case to check if the bug
is fixed or not?
 It seems the fix is intrusive, a full package backport would be
better. Does it affect samba in any way?

Regards,
Laszlo/GCS