Re: driver: error (fatal): assert: dumper->job is false: file driver.c, line 2107

Jean-Louis Martineau <[email protected]> Wed, 26 Jul 2017 09:54:27 -0400
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
Mark,

Your patch looks good, but I prefer to write it like:
    (!dumper->job || dumper->job->sched != sp)
which means, if the dumper have no job or it is not the job we search.

Do you tried to compile amanda with your patch to try it?

Jean-Louis


On 26/07/17 09:09 AM, Mark Ruys wrote:
> Hi,
>
> I run a Amanda 3.4.5 instance which since a few days crashes during 
> the dumping process. This is what gets logged:
>
> driver: error (fatal): assert: dumper->job is false: file driver.c, 
> line 2107
>
> Looking at the source 
> <https://sourceforge.net/p/amanda/code/HEAD/tree/amanda/trunk/server-src/driver.c#l2103>, 
> this is where the assertion fails:
>
> static void
> continue_port_dumps(void)
> {
>     GList *slist, *slist_next;
>     sched_t *sp;
>     job_t   *job = NULL;
>     assignedhd_t **h;
>     int active_dumpers=0, busy_dumpers=0, i;
>     dumper_t *dumper;
>
>     /* First we try to grant diskspace to some dumps waiting for it. */
>     for (slist = roomq.head; slist != NULL; slist = slist_next) {
> slist_next = slist->next;
>         sp = get_sched(slist);
>         /* find last holdingdisk used by this dump */
>         for (i = 0, h = sp->holdp; h[i+1]; i++) {
> (void)h; /* Quiet lint */
>         }
>         /* find more space */
>         h = find_diskspace(sp->est_size - sp->act_size,
>            &active_dumpers, h[i]);
>         if( h ) {
>             for (dumper = dmptable; dumper < dmptable + inparallel &&
> dumper->job &&
> dumper->job->sched != sp; dumper++) {
> (void)sp; /* Quiet lint */
>             }
> assert(dumper < dmptable + inparallel);
>           assert(dumper->job);
> sp->activehd = assign_holdingdisk(h, sp);
> chunker_cmd(dumper->job->chunker, CONTINUE, sp, NULL);
> amfree(h);
> remove_sched(&roomq, sp);
>         }
>     }
>     …
> }
>
> As I understand it, we have a slot in roomq, we have a holdingdisk 
> with enough space, but the dumper table has a record with no job 
> (false) before the record we're looking for.
>
> Shouldn't the for loop be this:
>
>             for (dumper = dmptable; dumper < dmptable + inparallel &&
> ! (dumper->job && dumper->job->sched == sp); dumper++) {
> (void)sp; /* Quiet lint */
>             }
>
> How can I get our Amanda dumps run stable again?
>
> Cheers,
>
> Mark
>
> ---
> Oudenhof 4c, 4191NW Geldermalsen, The Netherlands
> Web site and travel directions: www.peercode.nl 
> <http://peercode.nl>
This message is the property of CARBONITE, INC. and may contain confidential or privileged information.
If this message has been delivered to you by mistake, then do not copy or deliver this message to anyone.  Instead, destroy it and notify me by reply e-mail