[Samba] cache_traverse_validate_fn: unknown cache entry

L.P.H. van Belle
Fri, 20 Jul 2018 15:05:44 -0000

Hai,

Thanks for the reply.

I've 2 servers i've tested now.

! MEMBER SERVERS !
Below, without the company's output, just repeat this, if you want to check
what it is.

net cache list | cut -d"/" -f1 | sort | uniq
Key: AD_SITENAME
Key: CURRENT_DCNAME
Key: DCINFO
Key: IDMAP
Key: NAME2SID
Key: NBT
Key: RA
Key: SAF
Key: SID2NAME

SID2NAME shows SID with values DOM\users and DOM\Groups
NAME2SID shows DOM\users and DOM\Groups  value SID
So this looks ok too me.

Stretch with, Samba 4.8.2 , with 1 user in the log ( the same one is in every
servers log ).
net cache list | grep -i username   Does show the offending user as shown in the
logs.
Key: NAME2SID/DOM\USERNAME          Value: S-1-5-21-
Key: SID2NAME/S-1-5-21-			Value: NAME2SID/DOM\USERNAME

The logpart
[2018/07/20 15:42:00.422512,  0]
../source3/winbindd/winbindd_cache.c:4053(cache_traverse_validate_fn)
  cache_traverse_validate_fn: unknown cache entry
  key :
[2018/07/20 15:42:00.422629,  0] ../lib/util/util.c:514(dump_data)
This part does show the :  SN/S-1-5 -21-2934....

[2018/07/20 15:42:00.422707,  0]
../source3/winbindd/winbindd_cache.c:4055(cache_traverse_validate_fn)
  data :
[2018/07/20 15:42:00.422730,  0] ../lib/util/util.c:514(dump_data)
This part does show the DOM.username

So the dump does show the SID and DOM.username also.

Now net cache flush
No change.

Repeat on a Debian Jessie, 4.6.15 samba.
net cache list | grep -i username   Does NOT show the offending user.
And no messages in the logs.
Restarted winbind, still ok.
net cache flush
And same log is ok, nothing mentioned.

Other server. Stretch samba 4.7.8, already upgraded to 4.8.3
But i noticed there that at 11:21 ( before the upgrade ) the same message exits
in the logs.
[2018/07/20 11:21:00.827566,  0]
../source3/winbindd/winbindd_cache.c:4069(cache_traverse_validate_fn)

2018-07-20 11:39:12 upgrade samba-common:all 2:4.7.8+nmu-1~deb9 2:4.8.3+nmu-1
So it was also in 4.7.8..
I'll have to look for an older server, but thats up for Monday...

Have a nice    WEEEKEEENDD  :-)   everybody ..

Greetz,

Louis





> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens
> Rowland Penny via samba
> Verzonden: vrijdag 20 juli 2018 15:11
> Aan: samba at lists.samba.org
> Onderwerp: Re: [Samba] cache_traverse_validate_fn: unknown cache entry
>
> On Fri, 20 Jul 2018 14:09:14 +0200
> "L.P.H. van Belle via samba" <samba at lists.samba.org>
wrote:
>
> > Hi,
> >
> > I tested the following.
> >
> > stop winbind
> > rm /var/lib/samba/winbindd_cache.*
> > start winbind
> >
> > And the error is gone.
>
> Well it would be, the cache is empty and the user would be obtained
> from AD and then stored in the cache.
>
> >
> > I did notice the following, before and while having the log
> message.
> > running : net cache list | grep username
> > That shows the user.
> >
> > Now after stoping , remove the cache.tdb files and starting i tested
> > it again.
> > net cache list | grep username
> > ! This did NOT show the user, but ...
> >
> > net cache list | grep USERNAME
> > Does show the user.
>
> Now this is interesting, when I examine the output of 'net
> cache list',
> I do not see any usernames or groupnames, just SID's etc
>
> >
> > wbinfo -u  && wbinfo -g
> > net cache list | grep username
> > And it shows the user again, no errors any more in the logs.
> >
> > I cant explain why you ( and i ) see a message :
> > cache_traverse_validate_fn: unknown cache entry
>
> I can, it is what the code is setup to do if the user isn't found.
>
> > i dont thinks it was
> > an corruption in the cache tdb database, because this exist
> on all my
> > member servers. imo, it is a bug some, that might have been fixed
> > already. I did check in bugzilla, but I did not find any related, as
> > far i can tell.
> >
> https://bugzilla.samba.org/buglist.cgi?bug_status=__all__&cont
> ent=cache_traverse_validate_fn&no_redirect=1&order=Importance&
> product=&query_format=specific
> >
>
> If you can confirm that it didn't happen on 4.8.2, but does on 4.8.3,
> then there must be a bug.
>
> Rowland
>
>
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>
>