Bacula-users

Re: [Bacula-users] Getting err=22 message in dbcheck

2012-06-15 07:55:38
Subject: Re: [Bacula-users] Getting err=22 message in dbcheck
From: "Steven A. Falco" <safalco AT optonline DOT net>
To: Marco van Wieringen <mvw AT planets.elm DOT net>
Date: Fri, 15 Jun 2012 07:53:27 -0400
On 06/15/2012 04:36 AM, Marco van Wieringen wrote:
> Steven A. Falco <safalco <at> optonline.net> writes:

>> In other words, the call to rwl_writelock_p is returning EINVAL
>> because the rwl is not valid.  (I added a printf right before
>> the return statement, so I am sure that this is the place the
>> EINVAL (err 22) comes from.)
>>
>> Again, dbcheck puts out good data; it just has problems cleaning
>> up at the end.  And everything else works - I can run backups,
>> do restores, etc.  It is just the catalog backup that has problems.
>>
>> I'm not really sure where to go from here.  I've hacked around the
>> problem by hard-coding the appropriate strings into the perl script
>> and bypassing dbcheck entirely.  But I'd surely like to fix it
>> properly...
>>
>> Thoughts?
>>
> Log a bug on bugs.bacula.org ?

Sure, but I wanted to be sure I wasn't doing something stupid
before wasting your time with a bogus bug report. :-)

> I did it for you see:
> 
> http://bugs.bacula.org/view.php?id=1893

Thank you!  I appreciate that.

> The fix is rather simple, only dbcheck does a db_init_database and
> never an db_open_database (which is also not needed for printing the
> database info) but the db_close_database method calls the db_end_transaction
> method which does a db_lock which uses the rwl_lock which is still invalide
> as it only gets initialized in db_open_database. So the workaround is to
> never call db_end_transaction on a non-open database (makes no sense anyhow
> as there never will be a transaction when the database is not opened)
> and an extra check in the rwl_lock tear down to check if it even is
> initialized. Thanks for the analyze however it made my life a lot easier.

Glad to help!

        Steve

> 
> I have assigned the bug to me and will be pushing a fix to the next version.
> 
> Marco
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users