Bug 189750 - nscd reload (HUP) kills nscd if hosts cache disabled
nscd reload (HUP) kills nscd if hosts cache disabled
Status: CLOSED DUPLICATE of bug 189978
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc (Show other bugs)
3.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-24 07:53 EDT by Aryeh Selekman
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description Aryeh Selekman 2006-04-24 07:53:39 EDT
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 Folk-Williams 2006-04-24 08:25:19 EDT
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.

-Sam
Comment 3 Jakub Jelinek 2006-04-26 09:04:51 EDT

*** 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.