Re: [Nolug] Named problem

From: Judson Lester <jlester_at_tulane.edu>
Date: Tue, 27 May 2003 11:23:55 -0500
Message-Id: <9CCEC506-905F-11D7-AA84-0003937ABD66@tulane.edu>

>
> May 27 06:10:46 lajeffelx01 named[17764]: general: task.c:395:
> REQUIRE((((task) != ((void *)0)) && (((const isc__magic_t
> *)(task))->magic
> == ((('T') << 24 | ('A') << 16 | ('S') << 8 | ('K')))))) failed
> May 27 06:10:46 lajeffelx01 named[17764]: general: exiting (due to
> assertion
> failure)
>

It's an assertion failure - which should never happen in production
software. Congratulations, you've found a bug. You can a> bitch to
the named dev team (providing everything useful that you can (which
will be kind of appreciated, but mostly get you a "well, it doesn't
happen on our machines") or you can go to line 395 of task.c and break
that useless complex REQUIRE macro into something like:

REQUIRE ((task) != ((void *)0)); //task isn't NULL
if((((const isc__magic_t *)(task))->magic != ((('T') << 24 | ('A') <<
16 | ('S') << 8 | ('K'))))))
{
char [1000]errmsg;
isc__magic_t* tmn = ((const isc__magic_t *)(task))->magic;
snprintf(errmsg, 1000, "task MN = %c%c%c%c", tmn >> 24, (tmn >> 16) &
0xFF, (tmn>>8) & 0xFF, tmn & 0xFF);
syslog(errmsg);
REQUIRE(0);
}

That's off the top of my head, so you'll probably want to check the
operands of snprintf(mainly just for order) and syslog(not at all
sure). Eh, you might be able to get away without the 0xFF masking, but
you might also need to explicitly cast the char.

Won't fix the problem, but next time you'll have a much better idea why
it happened.

___________________
Nolug mailing list
nolug@nolug.org
Received on 05/27/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST