[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: a new tack on figuring out 'invalid argument' bdb errs

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-07-27 22:04:53 CEST

On Tue, 2004-07-27 at 14:27, Ben Collins-Sussman wrote:

> 1. create a new branch from the 1.0.6 tag.
> 2. register a callback with DB_ENV->set_errcall() that just prints to
> stdout.
> 3. build a static 'svnadmin' from this branch for a couple of
> platforms (intel linux, OSX) against db4.2.

Hm, well, I tried the simplest possible patch I could come up with for
'svnadmin':

------------------------------------------------------

* svnadmin/main.c
  (error_func): new func, print error to stdout.
  (open_repos): register the error callback with BDB.

Index: subversion/svnadmin/main.c
===================================================================
--- subversion/svnadmin/main.c (revision 10429)
+++ subversion/svnadmin/main.c (working copy)
@@ -118,6 +118,12 @@
   svn_handle_error (err, stderr, FALSE);
 }
 
+/* Custom function for printing detailed BDB errors. */
+static void
+error_func (const char *errprefix, char *msg)
+{
+ printf ("BDB ERROR: %s : %s\n", errprefix, msg);
+}
 
 /* Helper to open a repository and set a warning func (so we don't
  * SEGFAULT when libsvn_fs's default handler gets run). */
@@ -128,6 +134,7 @@
 {
   SVN_ERR (svn_repos_open (repos, path, pool));
   svn_fs_set_warning_func (svn_repos_fs (*repos), warning_func, NULL);
+ SVN_ERR (svn_fs_set_berkeley_errcall (svn_repos_fs (*repos), error_func));
   return SVN_NO_ERROR;
 }
 
-----------------------------------------------------

Unfortunately, I'm not getting any more detail with this patch. I
opened my 'nodes' table in emacs, and changed one byte within a skel
structure. Then I try to verify with the patched svnadmin:

$ svnadmin verify deadrepos
subversion/libsvn_fs_base/bdb/bdb-err.c:62: (apr_err=160029)
svn: Berkeley DB error while opening 'nodes' table for filesystem
deadrepos/db:
Invalid argument

Still no detail. >:-(

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 27 22:06:09 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.