Bacula-users

Re: [Bacula-users] Deadlock error

2015-08-04 19:58:18
Subject: Re: [Bacula-users] Deadlock error
From: Craig Shiroma <shiroma.craig.2 AT gmail DOT com>
To: Bacula Users <bacula-users AT lists.sourceforge DOT net>
Date: Tue, 4 Aug 2015 13:56:38 -1000
BTW, I suppose there could've been two jobs for the host(s) in scheduling queue.  If this was the case, is there a way to find out after the fact?  If this did actually happen, what could cause duplicate jobs to be scheduled on the same day at the same time?  I know no one manually ran the jobs in question.  Again, this only was a problem for a few of the jobs that ran last night, not all of them and some to do accurate backup and some not.

Regards,
-craig

On Tue, Aug 4, 2015 at 9:27 AM, Craig Shiroma <shiroma.craig.2 AT gmail DOT com> wrote:
Hello,

I had a few backups fail last night with the following error:

2015-08-03 18:02:46bacula-dir JobId 123984: b INTO File (FileIndex, JobId, PathId, FilenameId, LStat, MD5, DeltaSeq) SELECT batch.FileIndex, batch.JobId, Path.PathId, Filename.FilenameId,batch.LStat, batch.MD5, batch.DeltaSeq FROM batch JOIN Path ON (batch.Path = Path.Path) JOIN Filename ON (batch.Name = Filename.Name): ERR=Deadlock found when trying to get lock; try restarting transaction

The only thing I did yesterday was switch a bunch of backups to use Accurate backup and restart bacula-dir and bacula-sd after that.  However, the above problem also occurred on some hosts that was not set to use Accurate backup.  From the log, it seems like two jobs for this host was scheduled to run at 18:00 because the second job started and found a duplicate job (job 123984) and canceled the backup.  I know there were no jobs running before 18:00 so 123984 was not an old job still running.  Same with the other jobs that were canceled because of the above situation.

Anyway, does anyone have an idea what would cause this, especially how the second job got shot into the system.  After the deadlock error, Bacula said it would reschedule the job.  However the second job started right after the deadlock error instead of one hour later which makes me think that there were two jobs for this host scheduled to run at 18:00.

Thank you in advance,
-craig

------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users