View Issue Details

IDProjectCategoryView StatusLast Update
0015102CentOS-7glibcpublic2019-07-19 15:08
Status newResolutionopen 
Product Version7.5.1804 
Target VersionFixed in Version 
Summary0015102: NSCD not correctly reporting cache hit statistics
DescriptionNSCD is not reporting cache hits.
Steps To Reproduce1. Install and start nscd
2. Run ping -c 1 <a dns host> twice.
3. run `nscd -g` to show statistics
4. Notice that the cache hits lines are still 0.

* /var/log/nscd.log shows
Wed Jul 25 17:11:58 2018 - 18873: Haven't found "bind.lxc" in hosts cache!
Wed Jul 25 17:11:58 2018 - 18873: add new entry "bind.lxc" of type GETHOSTBYNAME for hosts to cache (first)
Wed Jul 25 17:12:03 2018 - 18873: handle_request: request received (Version = 2) from PID 19471
Wed Jul 25 17:12:03 2018 - 18873: GETFDHST
Wed Jul 25 17:12:03 2018 - 18873: provide access to FD 7, for hosts

The "provide access to FD 7" appears to be output from a cache hit.

A tcp dump also confirms that no dns traffic leaves the box.

Expected behavior: statistics should show 1 cache hit, and 1 cache miss.
Additional InformationRemoving /var/db/nscd so that nscd can not create a persistent db seems to make nscd report correct statistics.
TagsNo tags attached.




2019-07-19 15:08

reporter   ~0034850

The server allows clients to get a handle to the cache and to the lookup themselves, and in this case the hit/miss statistics cannot be updated. There is no API to propagate search result information into a unified set of cache statistics. This is upstream swbz#16104. The simplest thing we could do is add a new "client side searches" count so you can see that this is what is going on.

"Bug 16104 - nscd statistics are inaccurate when local client searches cache."

Issue History

Date Modified Username Field Change
2018-07-25 17:28 chiluk New Issue
2019-07-19 15:08 codonell Note Added: 0034850