[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Seeking clarification for nscd invalidation



[is the glibc maintainers mailing list still the correct venue?]

Hi,

I really appreciate your help, it is insightful.

On Wed, Jul 06, 2022 at 04:57:47PM -0400, Carlos O'Donell wrote:
> On Wed, Jul 6, 2022 at 10:10 AM Marc Haber <mh+debian-glibc@zugschlus.de> wrote:
> > On Wed, Jul 06, 2022 at 09:29:22AM -0400, Carlos O'Donell wrote:
> > > You can verify that nscd is catching the cases you care about by running
> > > it in '--debug' mode to let you see the cache invalidation.
> >
> > I regret to say that I don't use nscd in any of my installations. My
> > last superficial contact to nscd was like two decades ago.
> >
> > Would it help with an educated guess to install nscd, let it run in
> > --debug mode, run our test suite and compare nscd's output with the
> > output it generates running our test suite without the explicit
> > invalidation?
> 
> That sounds like a good approach. You should be able to compare
> the logs of both runs looking for the missing explicit invalidation
> and you should see that nscd detects the database changes.

I have uploaded two typescripts from nscd -d with debug_level 0 to
https://q.bofh.de/~mh/stuff/ - one with the invalidation code in adduser
in place, one with the invalidation code removed. Both logs show the
adduser test suite running.

Unfortunately, that doesnt look like I can make any sense from that. I
see nscd seeing changes to /etc/passwd and /etc/group, so I guess that
what we do is correctly reflected by nscd even without the explicit
invalidation. Additionally, I guess that adduser is invalidating caches
that don't need invalidation (logs showing explicit invalidations
without the software noticing changed files).

I am wondering about the following though:

monitored file `/etc/group` was deleted, removing watch
monitored file `/etc/group` was created, adding watch

without seeing actual caches being invalidated. Could it be possible
that /etc/group is rewritten and renamed and that nscd is only watching
for changes? Or am I missing something here?

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany    |  lose things."    Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature |  How to make an American Quilt | Fax: *49 6224 1600421


Reply to: