#344563 nscd: cache.c:335: prune_cache: Assertion `dh->usable' failed.

Package:
nscd
Source:
glibc
Description:
GNU C Library: Name Service Cache Daemon
Submitter:
Date:
2015-04-17 18:30:04 UTC
Severity:
important
#344563#5
Date:
2005-12-23 19:51:35 UTC
From:
To:
nscd won't stay running - at least on my powerpc machine

nscd consistently terminates almost as soon as it's started

I got this error using the debug option -


fis:~# nscd -d
24423: Reloading "0" in password cache!
nscd: cache.c:335: prune_cache: Assertion `dh->usable' failed.
Aborted
fis:~#


Many thanks for maintaining glibc!

Jack

#344563#10
Date:
2005-12-29 22:15:05 UTC
From:
To:
Hi,

I noticed nscd was not running on my machine either (after upgrade from
sarge to etch), and when I started it manually I got the same error.
After I deleted the deleted the databases in /var/db/nscd/ and started
nscd the problem was gone.

	Greetings Arjan Oosting

#344563#15
Date:
2006-01-23 16:15:41 UTC
From:
To:
Now with another customer, I spend again a whole day on nscd which will not
keep on running. In debugging mode the error is:

"nscd: cache.c:144: cache_add: Assertion `newp->key + newp->len <=
table->head->first_free' failed."

Removing the databases in /var/db/nscd/ resolved the problem.

The database locations are not documented, nor is there any other usefull
documentation on nscd.

#344563#20
Date:
2006-04-09 10:26:55 UTC
From:
To:
this bug is still there. I'm quite surprised as ISTR that I had previous
version of nscd running fine on that box. I may be wrong tho.

Here's the debug output:
# nscd -d
7688: Reloading "oident" in group cache!
7688: Reloading "newsrss.bbc.co.uk" in hosts cache!
7688: Reloading "0" in password cache!
7688: Reloading "tty" in group cache!
7688: Reloading "gdm" in group cache!
7688: Reloading "0" in password cache!
7688: Reloading "lp" in password cache!
7688: Reloading "1" in password cache!
7688: Reloading "110" in password cache!
7688: Reloading "ftp.de.debian.org" in hosts cache!
7688: Reloading "112" in password cache!
7688: Reloading "104" in password cache!
nscd: cache.c:335: prune_cache: Assertion `dh->usable' failed.
Aborted

HTH

#344563#25
Date:
2006-04-27 07:42:12 UTC
From:
To:
So why not just remove old files on nscd package upgrade?..
#344563#30
Date:
2006-05-16 15:02:13 UTC
From:
To:
I tried removing the db files, but it doesn't solve the issue. nscd
starts, but after a while it dies anyway. No message in the logs...

I'm running 2.3.6-7

HTH

T-Bone

#344563#35
Date:
2006-06-10 23:15:19 UTC
From:
To:
[ Sorry, Nikita, private mail was unintentional. ]

Hi,

Deleting the corrupted cache only temporarily fixes the problem.
Unfortunately nscd currently crashes (or exits unexpectedly - we've
never actually  seen it happen "live") in annoyingly regular intervals
and always leaves it's cache in an inconsistent state.

Greetings, Fabian

#344563#40
Date:
2007-03-22 02:30:41 UTC
From:
To:
I have a system where the nscd daemon constantly crashes too.
nscd, libc6, locales, etc is at  version 2.3.6.ds1-13

I've tried  commenting out the user and group caching settings in the /etc/nscd.conf file hoping to avoid the crashes since I only need it to cache host lookups.
This made no difference.
Nor does leaving the entries there and just changing the value of 'enable-cache' for the passwd and group entries to 'no'.

Starting nscd with the -d parameter it starts and runs for about 20 seconds before failing with:

	nscd: cache.c:335: prune_cache: Assertion `dh->usable' failed.
	Aborted

This error usually happens after entries like:

	27822: Reloading "250.186.184.59.sbl-xbl.spamhaus.org." in hosts cache!
	27822: Reloading "164.152.206.86.sbl-xbl.spamhaus.org." in hosts cache!

Clearing the databases like so:

	nscd -i hosts
	nscd -i passwd
	nscd -i group
Doesn't seem to help either.

I then got rid of the following files by moving them elsewhere:

	/var/db/nscd/group
	/var/db/nscd/hosts
	/var/db/nscd/passwd

This seems to at least get things working for a while, but eventually the nscd daemon falls over again.

Regards,

#344563#45
Date:
2007-03-22 09:54:57 UTC
From:
To:
  A backtrace would really be of help. Please install the -dbg package
for the libc, and try to have one so that we can know which codepath
generates the issue.

  Also be warned that hosts caching in nscd sucks, it's not really built
to deal with DNS caching that other tools like dnsmasq or even bind
really deal with better.

#344563#50
Date:
2007-04-25 19:20:00 UTC
From:
To:
  Does nscd from libc 2.5 fixes the problem ?
#344563#55
Date:
2007-08-07 19:37:03 UTC
From:
To:
Hi

I have the same problem om etch installation and i686.

nscd 2.3.6.ds1-13

Removing the files in /var/db/nscd/ solved the problem, at
least temporarily. I think it would be good if it either removes
these files on this failure, or that it tries to recover from
the situation instead of just dying.

Regards,

// Ola

#344563#60
Date:
2007-11-21 07:54:02 UTC
From:
To:
well yes: the "nscd: cache.c:335: prune_cache: Assertion `dh->usable' failed."
bug still exists on current etch.

actually it just re-occured; i haven't experienced it for a while.
the only notable change on my side was that i did a security-upgrade the day
before yesterday, which - according to the logs - included perl and horde3.
so i don't think this is related.

deleting the db-files in /var/db/nscd/ seems to have solved the problem.

btw, this is the last request that was made when running "nscd -d" before it crashed:
29453: Reloading "10001243920.0000020425.acesso.oni.pt" in hosts cache!
nscd: cache.c:335: prune_cache: Assertion `dh->usable' failed.
Aborted

it crashed 2 times in a row just after this request.
then i deleted the db-files and the problem was gone.

so i guess the db-file was corrupted just at the mentioned host-entry.

mfgas.dr
IOhannes

#344563#65
Date:
2008-09-03 14:34:59 UTC
From:
To:
today I noticed a failure of nscd, restarting in debug mode
yields to the famous "nscd: cache.c:335: prune_cache: Assertion `dh->usable' failed."
Cleaning the cache files in /var/db/nscd helped for the moment. So yes,
this bug is still in the latest etch update.

Btw., Bug#443475 and Bug#424723 are probably duplicates of this.

Greetings
  Hermann

#344563#74
Date:
2015-04-17 18:26:26 UTC
From:
To:
Lieber Bewerber,

die Arbeitsvermittlung stellt Ihnen nachfolgend eine interessante Stelle in einem internationalen Team von zu Hause aus vor, ohne Fahrtkosten, ohne Anfahrtswege, ohne Stau:

Wir bieten qualifizierte und attraktive Arbeitsplätze auch in ländlichen Regionen im ganzen europäischen Raum und bieten gleichzeitig hochwertige Qualität für unsere Kunden.

Ab sofort suchen wir:
Mitarbeiter (m/w) für Home Office Tätigkeit im Bereich Telekommunikation und Büroarbeit

Ihre Aufgaben wären:

- Unterlagen empfangen, bearbeiten und weiterleiten
- Dokumente einscannen/kopieren
- E-Mails beantworten
- Tätigkeit im Home Office in freien Zeiteinteilung
- Umgang mit zur Verfügung gestellten Büroausstattungen

Wir erwarten:

- Problemloser Umgang mit Email, PC und Internet
- Deutsch fließend, Fremdsprachen sind von Vorteil
- zuverlässiges Arbeiten im Team
- Genauigkeit und Zielstrebigkeit

Wir bieten Ihnen einen Arbeitsplatz in Festanstellung oder als Freiberufler mit einem Stundenlohn von 20 € Brutto die Stunde in eigenverantwortlichen Arbeitsweise und einer modernen Beschäftigungsform, sowie eine abwechslungsreiche Tätigkeit ohne Fahrzeit mit flexiblen Arbeitszeiten.

Es werden keine Fachkenntnisse vorausgesetzt. Die Einarbeitung findet detailliert durch professionelle Mitarbeiten statt. Die nötige technische Ausstattung stellen wir Ihnen ohne weitere Kosten zur Verfügung. Die Stelle kann gerne nebenberuflich besetzt werden sowie von Rentnern und Hausfrauen.

Sie sind offen für flexible Arbeitszeitmodelle und die Arbeit im Home Office? Wenn wir Ihr Interesse geweckt haben, senden Sie uns Ihre Bewerbung per E-Mail an: NelsonFradehelm@bartender.net


Wir freuen uns auf Ihre Antwort.

Es grüßt Sie Ihre

Benen LTD