dbTalk Databases Forums  

a bug of bdb:__db.register:file contents corrupted?

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss a bug of bdb:__db.register:file contents corrupted? in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default a bug of bdb:__db.register:file contents corrupted? - 07-27-2006 , 08:41 AM






I use Berkeley DB in hp-unix.After i kill the application (like:kill -9
××).When restart it.It will open an Env and do some rcover.But some
time when i open the env. Berkeley DB's lib will ouput
"__db.register:file contents corrupted".What make this happen?(why it
say contents corrupted)?
ps:When remove the __db.register file.It will run ok!

please help me!!


Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: a bug of bdb:__db.register:file contents corrupted? - 07-27-2006 , 12:46 PM







demon_32 (AT) 163 (DOT) com wrote:
Quote:
I use Berkeley DB in hp-unix.After i kill the application (like:kill -9
××).When restart it.It will open an Env and do some rcover.But some
time when i open the env. Berkeley DB's lib will ouput
"__db.register:file contents corrupted".What make this happen?(why it
say contents corrupted)?
ps:When remove the __db.register file.It will run ok!

please help me!!
In reviewing the Berkeley DB DB_REGISTER code, I think it's possible
for the registry file to become corrupted, and the DB_REGISTER code to
then return an error to the application, as you described.

This cannot cause data corruption or any other kind of hard failure,
the worst that can happen is for the application to be locked out of
the database environment.

Generally, I don't expect this to happen often, it requires the
operating system deliver the signal or failure in the middle of a write
system call, which isn't likely to happen.

The workaround will be to remove the __db.register file, which will
force recovery to be run by the next process in the application to
attempt to open a DbEnv handle.

We are tracking this problem in our Support Request #14998. I'm happy
to send you a patch for the problem if you would like.

Thank you for reporting this failure to us!

Regards,
--keith

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic
Oracle Corporation
keith.bostic (AT) oracle (DOT) com
keithbosticim (Yahoo IM)



Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: a bug of bdb:__db.register:file contents corrupted? - 07-28-2006 , 06:50 AM



Please send me the patch!thanks


bostic (AT) sleepycat (DOT) com wrote:
Quote:
demon_32 (AT) 163 (DOT) com wrote:
I use Berkeley DB in hp-unix.After i kill the application (like:kill -9
××).When restart it.It will open an Env and do some rcover.But some
time when i open the env. Berkeley DB's lib will ouput
"__db.register:file contents corrupted".What make this happen?(why it
say contents corrupted)?
ps:When remove the __db.register file.It will run ok!

please help me!!

In reviewing the Berkeley DB DB_REGISTER code, I think it's possible
for the registry file to become corrupted, and the DB_REGISTER code to
then return an error to the application, as you described.

This cannot cause data corruption or any other kind of hard failure,
the worst that can happen is for the application to be locked out of
the database environment.

Generally, I don't expect this to happen often, it requires the
operating system deliver the signal or failure in the middle of a write
system call, which isn't likely to happen.

The workaround will be to remove the __db.register file, which will
force recovery to be run by the next process in the application to
attempt to open a DbEnv handle.

We are tracking this problem in our Support Request #14998. I'm happy
to send you a patch for the problem if you would like.

Thank you for reporting this failure to us!

Regards,
--keith

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic
Oracle Corporation
keith.bostic (AT) oracle (DOT) com
keithbosticim (Yahoo IM)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.