[pkg-db-devel] Bug#652036: Bug#652036: db: Salvaging db_dump triggers endless loop on certain broken databases since Berkeley DB 4.7

Ondřej Surý ondrej at sury.org
Wed Dec 14 12:02:31 UTC 2011


Hi,

could you please try db5.1 (and optionally db5.2 in experimental)?

O.

On Wed, Dec 14, 2011 at 12:55, Stephan Sürken <absurd at debian.org> wrote:
> Source: db
> Severity: normal
> Tags: upstream patch
>
> Dear Maintainer,
>
> when you happen to have a (BTREE) Berkeley DB (w/o environment)
> broken in a certain way [1][2], trying a salvage dump like so
>
> db4.8_dump -r -f database.dump database.db
>
> leads to an endless loop inside libdb in all Berkeley DB
> versions >= 4.7.
>
> This is due to the attached upstream patch [3]; reversing this
> patch "fixes" the issue, and it works again (like in Berkeley DB
> 4.4).
>
> I am not at all into Berkeley DB internals, however I guess the
> introduced loop misses a guard against "pageno"s
> loop-referencing (same two pagenos usually reappear enlessly
> when debugging).
>
> Reverting the patch definitely fixes a regression for my use
> case. Don't know what it might break, though.
>
> Hope you can forward this upstream, and/or maybe considering a
> Debian patch for this.
>
> Thanks!
>
> Stephan
>
> --
> [1] The attached database.db is such an example.
> [2] The attached tar.gz has a program to create "suchly broken"
> dbs -- basically an unclean shutdown after a number of put() and
> del() does the trick. To use it, try
>  ? make
>  ? make find-broken
> [3] The attached patch shows the loop introduced in 4.7 upstream.
>
> -- System Information:
> Debian Release: wheezy/sid
>  APT prefers unstable
>  APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
>
> _______________________________________________
> pkg-db-devel mailing list
> pkg-db-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-db-devel



-- 
Ondřej Surý <ondrej at sury.org>





More information about the pkg-db-devel mailing list