=== operating system

   iLinux (our own linux company distribution)
   gcc          3.4.6
   glibc        2.3.6
   mysql                5.0.45
   openssl      0.9.8g
   kernel       2.6.21.3


=== version of Bacula

   bacula 2.2.5, compiled and installed from sources

./configure --prefix=/usr/local/bacula-2.2.5
--sbindir=/usr/local/bacula-2.2.5/sbin
--with-scriptdir=/usr/local/bacula-2.2.5/bin
--mandir=/usr/local/bacula-2.2.5/man
--sysconfdir=/usr/local/bacula-2.2.5/etc
--with-working-dir=/usr/local/bacula-2.2.5/var/working
--with-pid-dir=/usr/local/bacula-2.2.5/var/run
--with-subsys-dir=/usr/local/bacula-2.2.5/var/run/subsys
--with-openssl=/usr/local/openssl --with-mysql=/usr/local/mysql
--disable-conio --enable-readline --with-readline=/usr/include/readline
--with-dir-user=bacula --with-dir-group=bacula --with-sd-user=bacula
--with-sd-group=bacula --with-fd-user=root --with-fd-group=root
--enable-ipv6 --enable-bat --with-qwt=/usr/local/qwt


=== description of the problem

   when i start at the same time 2 jobs :
     - as i use only one "File" storage, the second job waits for the
first to be completed (this is normal)
     - on this second job, i have set a "Max Run Time = 2 minutes"
     - the first job takes more than 2 minutes (no problem for it,
because i have no "Max Run Time" on it)
     - **the problem is** that during the first job is running the
second is canceled for this reason "Fatal error: Max run time exceeded.
Job canceled." whereas it was not running (because waiting for the first
to be completed).


=== explications and workaround

   after some C reading, it seems that in the function
job_check_maxruntime in src/dird/job.c the code does not check if the
job is running or not. So as "jcr->start_time" is set when job is
created, then the test

if ((watchdog_time - jcr->start_time) < jcr->job->MaxRunTime) {
       Dmsg3(200, "Job %p (%s) with MaxRunTime %d not expired\n",
             jcr, jcr->Job, jcr->job->MaxRunTime);
       return false;
    }

   fails whereas the job was not running.

   I think about a patch in this function like :

--- src/dird/job.c.orig 2007-11-14 14:45:08.000000000 +0100
+++ src/dird/job.c      2007-11-14 14:46:31.000000000 +0100
@@ -556,7 +556,7 @@
   */
  static bool job_check_maxruntime(JCR *control_jcr, JCR *jcr)
  {
-   if (jcr->job->MaxRunTime == 0 || job_canceled(jcr)) {
+   if (jcr->job->MaxRunTime == 0 || job_canceled(jcr) || jcr->JobStatus
!= JS_Running) {
        return false;
     }
     if ((watchdog_time - jcr->start_time) < jcr->job->MaxRunTime) {



   I have see a bug that matches this problem
(http://bugs.bacula.org/view.php?id=621) but it seems to be "resolved"
for a reason that i don't understand whereas the problem still presents.



   Do you think it's a bug ?
   Would you like me to open this bug and submit the patch in Mantis ?

   Best regards,
   Alex.


-- 
Alexandre SIMON
Cellule (R)éseau StanNet/Lothaire

C.I.R.I.L.            | Perm. réseau : +33 (0)3.83.68.24.24
Château du Montet     | Tél.  direct : +33 (0)3.83.68.24.32
Rue du Doyen Roubault | Fax          : +33 (0)3.83.68.24.01
F - 54500 VANDOEUVRE  | Email        : [EMAIL PROTECTED]




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to