I have specified Maximum Concurrent Jobs = 4 in my director config, and when I manually start 4 jobs in a sequence, that setting is obeyed - I get 4 running jobs and the rest are 'awaiting execution'. When I have them all set to start on a schedule, I get all 8 running at once, which overloads my network and causes all sorts of other problems (a xen bug I think). I have had a _very_ quick look at the code, and I think I can see a race in the code to create a new thread - num_workers is only being incremented once the thread starts, so if the new thread doesn't get a chance to execute yet because lots of threads are being created at once, the 'num_workers < max_workers' check is always true.
setdebug doesn't seem to be doing its thing so I can't turn on debugging to check, but does that sound plausible? I think we need to move num_workers++ to just before the pthread_create, and decrement it if the pthread_create fails. I'll try that now... James ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
