You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Sander Striker <st...@apache.org> on 2003/05/26 14:34:46 UTC

FW: FW: Berkeley DB error while opening `changes' table for filesystem [#8143]

[Forwarded to the dev@ list with permission]

Sander

-----Original Message-----
From: Keith Bostic [mailto:bostic@abyssinian.sleepycat.com]
Sent: Saturday, May 24, 2003 4:45 PM
To: striker@apache.org
Cc: support@sleepycat.com
Subject: Re: FW: Berkeley DB error while opening `changes' table for
filesystem [#8143]

http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=38046

> We seem to see a lot of these with db 4.1.25.  Whether it is our
> usage pattern or a plain 'ol bug in db 4.1.25 (the 4.0 series doesn't
> show this at all) I don't know.

How easy is it to reproduce this problem?

If you run recovery on this same repository again, does it fail
in the same way each time?  If running recovery on this same
repository reproduces the error, and the databases and log files
aren't too large, can you please compress and archive them, and
upload them to:

	ftp.sleepycat.com/incoming

and send me the name of the archive?

Otherwise, what I'll probably need is a copy of the databases
and logs that result in this error -- preferably, before
recovery is run, but that's not a requirement if it's hard to
do.

Also, Berkeley DB should always be outputting additional error
information whenever when it returns EINVAL, do you configure
your systems to log those additional errors?  That might give
us more information to to work with, as well.  If you're not
familiar with the additional error information messages, see the
DB_ENV->set_errfile and DB->set_errfile method documentation.

Regards,
--keith

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic			bostic@sleepycat.com
Sleepycat Software Inc.		keithbosticim (ymsgid)
118 Tower Rd.			+1-781-259-3139
Lincoln, MA 01773		http://www.sleepycat.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FW: FW: Berkeley DB error while opening `changes' table for filesystem [#8143]

Posted by "Jamin W. Collins" <jc...@asgardsrealm.net>.
On Mon, May 26, 2003 at 04:34:46PM +0200, Sander Striker wrote:
> [Forwarded to the dev@ list with permission]
> 
> Sander
> 
> -----Original Message-----
> From: Keith Bostic [mailto:bostic@abyssinian.sleepycat.com]
> Sent: Saturday, May 24, 2003 4:45 PM
> To: striker@apache.org
> Cc: support@sleepycat.com
> Subject: Re: FW: Berkeley DB error while opening `changes' table for
> filesystem [#8143]
> 
> http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=38046
> 
> > We seem to see a lot of these with db 4.1.25.  Whether it is our
> > usage pattern or a plain 'ol bug in db 4.1.25 (the 4.0 series doesn't
> > show this at all) I don't know.
> 
> How easy is it to reproduce this problem?

I've only had it happen the one time.  From the discussion on IRC and
reading the list archives, it appears that the exact cause is still
unknown.

> If you run recovery on this same repository again, does it fail in the
> same way each time?  

Subversion's recover fails every time with the error referenced in the
list archive link.  Berkeley db_recover appears to complete (both normal
and catastrophic).  However, the db itself remains unusable.  db_verify
on the other hand does indicate a problem.

> If running recovery on this same repository reproduces the error, and
> the databases and log files aren't too large, can you please compress
> and archive them, and upload them to:
> 
> 	ftp.sleepycat.com/incoming

The archive has been uploaded, it's called coding-horked-20030523.tar.gz

-- 
Jamin W. Collins

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FW: FW: Berkeley DB error while opening `changes' table for filesystem [#8143]

Posted by "Glenn A. Thompson" <gt...@cdr.net>.

kfogel@collab.net wrote:

>"Glenn A. Thompson" <gt...@cdr.net> writes:
>  
>
>>Currently, in my document, I don't detail what I want to develop for
>>the logging feature.  I can spend a little time to propose something
>>here on the list or I can put it in my Pluggable-DB document.  Which
>>do you prefer?
>>    
>>
>
>I think what I'd most prefer is a patch that gets us better error
>logging in the fs we currently use :-) (but which I'm not in a
>position to implement right now).  Pluggable DB is great, but a bit
>far in the future to help w/ Berkeley DB problems in the here-and-now.
>
I don't see the fix being part of the pluggable-db.
It can live by itself.  I was merely asking if you wanted me to 
elaborate on a logging feature and where to do it.
If you are looking for a quick fix than perhaps my document is the right 
place, as it will cut down on near term traffic and I don't see logging 
as being a quick fix.

As far as patches are concerned, I'm happy to supply them:  will you 
apply them unconditionally?

I didn't think so:-)

gat



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FW: FW: Berkeley DB error while opening `changes' table for filesystem [#8143]

Posted by kf...@collab.net.
"Glenn A. Thompson" <gt...@cdr.net> writes:
> Currently, in my document, I don't detail what I want to develop for
> the logging feature.  I can spend a little time to propose something
> here on the list or I can put it in my Pluggable-DB document.  Which
> do you prefer?

I think what I'd most prefer is a patch that gets us better error
logging in the fs we currently use :-) (but which I'm not in a
position to implement right now).  Pluggable DB is great, but a bit
far in the future to help w/ Berkeley DB problems in the here-and-now.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FW: FW: Berkeley DB error while opening `changes' table for filesystem [#8143]

Posted by "Glenn A. Thompson" <gt...@cdr.net>.
Hey,

>If we call DB_ENV->set_errfile(), what FILE * do we pass it?  Do we
>open a unique filename (perhaps with a timestamp in its name) for
>every time we open a BDB environment, and clean up the file if there
>are no errors?
>  
>

A little more ammo for deleting set_berkeley_errcall from the FS API ;-)

In my Pluggable-DB document I propose deleting set_berkeley_errcall.  In 
its place I want to develop an FS logging feature.
set_berkeley_errcall uses set_errcall.  I believe that set_errcall 
should be used instead of set_errfile.  It can then be integrated into 
an FS logging feature.  THE set_errcall callback function SHOULD NOT BE 
PASSED AS PART OF THE FS API   IMNHO:-)

Currently, in my document, I don't detail what I want to develop for the 
logging feature.  I can spend a little time to propose something here on 
the list or I can put it in my Pluggable-DB document.  Which do you prefer?

gat


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FW: FW: Berkeley DB error while opening `changes' table for filesystem [#8143]

Posted by "Glenn A. Thompson" <gt...@cdr.net>.
Hey,

kfogel@collab.net wrote:

>"Sander Striker" <st...@apache.org> writes:
>  
>
>>[Forwarded to the dev@ list with permission]
>>
>>-----Original Message-----
>>From: Keith Bostic [mailto:bostic@abyssinian.sleepycat.com]
>>
>>Also, Berkeley DB should always be outputting additional error
>>information whenever when it returns EINVAL, do you configure
>>your systems to log those additional errors?  That might give
>>us more information to to work with, as well.  If you're not
>>familiar with the additional error information messages, see the
>>DB_ENV->set_errfile and DB->set_errfile method documentation.
>>    
>>
>
>  
>
OK so now I have guilt:-)

I was about to start a patch that provided error logging and involved 
sneaking in some of my evil plans for configs.
I wanted to pass the svn_fs_t structure to the db_errcall_fcn.  But, I'm 
thinking it's badness to slip an opaque reference in there considering 
it's a const char *.  ;-)  So I stopped.

However, there is a cheap and dirty way to add logging using 
DB_ENV->set_errcall or DB->set_errcall instead of set_errfile.

Install a "db_errcall_fcn that:
     1.  Opens a unique file using some time stamp scheme and uses apr 
functions to create and open the file. (We can prefix it with the errpfx).
     2.  Writes the message to the file.
     3.  Closes the file.

Pros:
     1.  No need to create or clean up a file.
     2.  Never gets involved unless additional error info is available.
     3.  I stop working on my ever growing document.
     4.  ???
Cons:
     1.  One file per error message.
     2.  May be unable to open the file at that time.  (Not a huge deal).
     3.  ???

Would you like a patch for this?

gat


Hmmm: I could still put in some config changes to turn this feature on 
and off:-)




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: FW: FW: Berkeley DB error while opening `changes' table for filesystem [#8143]

Posted by kf...@collab.net.
"Sander Striker" <st...@apache.org> writes:
> [Forwarded to the dev@ list with permission]
>
> -----Original Message-----
> From: Keith Bostic [mailto:bostic@abyssinian.sleepycat.com]
>
> Also, Berkeley DB should always be outputting additional error
> information whenever when it returns EINVAL, do you configure
> your systems to log those additional errors?  That might give
> us more information to to work with, as well.  If you're not
> familiar with the additional error information messages, see the
> DB_ENV->set_errfile and DB->set_errfile method documentation.

Hmmm.  We're not doing this anywhere, and we probably should.

The simplest thing would be to just call DB_ENV->set_errfile().  From 
http://www.sleepycat.com/docs/api_c/db_set_errfile.html:

   When an error occurs in the Berkeley DB library, a Berkeley DB
   error or an error return value is returned by the function. In some
   cases, however, the errno value may be insufficient to completely
   describe the cause of the error especially during initial
   application debugging.

   The DB_ENV->set_errfile and DB->set_errfile methods are used to
   enhance the mechanism for reporting error messages to the
   application by setting a C library FILE * to be used for displaying
   additional Berkeley DB error messages. In some cases, when an error
   occurs, Berkeley DB will output an additional error message to the
   specified file reference.

   The error message will consist of the prefix string and a colon
   (":") (if a prefix string was previously specified using
   DB->set_errpfx or DB_ENV->set_errpfx), an error string, and a
   trailing <newline> character.

   This error logging enhancement does not slow performance or
   significantly increase application size, and may be run during
   normal operation as well as during application debugging.

   For DB handles opened inside of Berkeley DB environments, calling
   the DB->set_errfile method affects the entire environment and is
   equivalent to calling the DB_ENV->set_errfile method.

   The DB->set_errfile interface may be called at any time during the
   life of the application.

If we call DB_ENV->set_errfile(), what FILE * do we pass it?  Do we
open a unique filename (perhaps with a timestamp in its name) for
every time we open a BDB environment, and clean up the file if there
are no errors?

Thoughts welcome.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org