Observed named crash crit named[4294]: mem.c:1094: INSIST(ctx-stats[i].gets == 0U) failed

Evan Hunt each at isc.org
Tue Feb 17 16:06:15 UTC 2015


On Tue, Feb 17, 2015 at 08:05:56PM +0530, bhargav p wrote:
> >From the code browsing I can make this assertion failure happend in the
> destroy function(), why the named daemon wants to exit itself, is something
> unexpected happend?

I would guess it was a normal shutdown; if it had been an unexpected
crash, it wouldn't have gotten that far before asserting.

> While it is exiting, named is cleaning up all its structures and stats,
> can someone explain me why we need assertion before freeing up the stats?

The assertion is there to detect memory leaks.  Somewhere, BIND allocated
a block of memory and then didn't free it before exiting; it dumps core
so we have a better chance of figuring out what went wrong.  The assertion
failure itself is harmless; it's just there to catch coding errors.

If you run named with the "-m record" command line option, then it
would print a list of the un-freed memory blocks when it asserted.
(This has some performance impact, so I don't recommend running that
way routinely, but it helps track down what went wrong.)

-- 
Evan Hunt -- each at isc.org
Internet Systems Consortium, Inc.


More information about the bind-users mailing list