Bug 189750 - nscd reload (HUP) kills nscd if hosts cache disabled
Summary: nscd reload (HUP) kills nscd if hosts cache disabled
Status: CLOSED DUPLICATE of bug 189978
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc (Show other bugs)
(Show other bugs)
Version: 3.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2006-04-24 11:53 UTC by Aryeh Selekman
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-04-26 13:04:51 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Aryeh Selekman 2006-04-24 11:53:39 UTC
Description of problem:
If hosts caching disabled in nscd config file:
enable-cache            hosts           no

a 'service nscd reload' (which sends HUP to nscd) causes nscd to seg fault.  If
hosts cache is enabled, the process stays running with a reloaded cache.  From
my testing, this affect RHEL3 and RHEL4.

debug output when running 'nscd -d' and interactively sending HUP to nscd's process:
5182: provide access to FD 5, for passwd
5182: remove GETPWBYUID entry "#"
5182: remove GETGRBYNAME entry "XXXXX"
5182: remove GETGRBYGID entry "#"
5182: remove GETGRBYNAME entry "XXXXX"
5182: remove INITGROUPS entry "XXXXXX"
Segmentation fault

When running 'strace nscd -d':
stat64("/etc/group", {st_mode=S_IFREG|0644, st_size=17507, ...}) = 0
getpid()                                = 14541
write(2, "14541: remove GETGRBYGID entry \""..., 3514541: remove GETGRBYGID
entry "0"
) = 35
stat64("/etc/hosts", {st_mode=S_IFREG|0644, st_size=386, ...}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Version-Release number of selected component (if applicable):

How reproducible:
Disable host cache in nscd configuration file, send a HUP signal to the running
nscd process.  

Steps to Reproduce:
1. Set  "enable-cache            hosts           no"
in /etc/nscd.conf
2. service nscd start (or restart if already running)
3. service nscd reload
Actual results:
[root ~]# service nscd status
nscd dead but subsys locked

Expected results:
nscd running with reloaded/fresh cache

Additional info:

Comment 1 Sam Knuth 2006-04-24 12:25:19 UTC
I can reproduce this on a RHEL 3 U7 box. Following the reproduce steps above I
get the following after doing the reload:

[root@xander root]# service nscd status                  [  OK  ]
nscd dead but pid file exists

If I start the service with the host cache enabled, the service reloads fine.


Comment 3 Jakub Jelinek 2006-04-26 13:04:51 UTC

*** This bug has been marked as a duplicate of 189978 ***

Note You need to log in before you can comment on or make changes to this bug.