View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0015102||CentOS-7||glibc||public||2018-07-25 17:28||2019-07-19 15:08|
|Target Version||Fixed in Version|
|Summary||0015102: NSCD not correctly reporting cache hit statistics|
|Description||NSCD is not reporting cache hits.|
|Steps To Reproduce||1. 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 Information||Removing /var/db/nscd so that nscd can not create a persistent db seems to make nscd report correct statistics.|
|Tags||No tags attached.|
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."