nscd crashes upon sudo when hosts caching is enabled (NIS, NFS)

Bug #1403516 reported by Christian Reis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eglibc (Ubuntu)
New
Undecided
Unassigned

Bug Description

We use nscd in our diskless clients, but we've found regular evidence of crashes in our dmesg output, and I've been able to easily reproduce it by running sudo ls while hosts caching is enabled. The debug output when running nscd -d is as follows:

Wed 17 Dec 2014 11:42:48 AM BRST - 3627: handle_request: request received (Version = 2) from PID 3649
Wed 17 Dec 2014 11:42:48 AM BRST - 3627: GETFDPW
Wed 17 Dec 2014 11:42:48 AM BRST - 3627: provide access to FD 5, for passwd
Wed 17 Dec 2014 11:42:48 AM BRST - 3627: handle_request: request received (Version = 2) from PID 3649
Wed 17 Dec 2014 11:42:48 AM BRST - 3627: GETFDGR
Wed 17 Dec 2014 11:42:48 AM BRST - 3627: provide access to FD 7, for group
Wed 17 Dec 2014 11:42:48 AM BRST - 3627: handle_request: request received (Version = 2) from PID 3649
Wed 17 Dec 2014 11:42:48 AM BRST - 3627: GETFDHST
Wed 17 Dec 2014 11:42:48 AM BRST - 3627: provide access to FD 9, for hosts
Wed 17 Dec 2014 11:42:48 AM BRST - 3627: handle_request: request received (Version = 2) from PID 3649
Wed 17 Dec 2014 11:42:48 AM BRST - 3627: GETAI (gasolinux)
Wed 17 Dec 2014 11:42:48 AM BRST - 3627: Haven't found "gasolinux" in hosts cache!

and then it dies.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: nscd 2.19-0ubuntu6.4
ProcVersionSignature: Ubuntu 3.13.0-43.72-generic 3.13.11.11
Uname: Linux 3.13.0-43-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Dec 17 11:45:11 2014
SourcePackage: eglibc
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.nscd.conf: [modified]
mtime.conffile..etc.nscd.conf: 2014-12-17T11:43:58.035583

Revision history for this message
Christian Reis (kiko) wrote :
Revision history for this message
Christian Reis (kiko) wrote :

I've also noticed that with hosts cache enabled that lookups for the same name seem to always be reported as missing; here's the output of subsequent "ping gasolinux" commands:

Wed 17 Dec 2014 11:42:02 AM BRST - 3627: handle_request: request received (Version = 2) from PID 3642
Wed 17 Dec 2014 11:42:02 AM BRST - 3627: GETFDHST
Wed 17 Dec 2014 11:42:02 AM BRST - 3627: provide access to FD 9, for hosts
Wed 17 Dec 2014 11:42:02 AM BRST - 3627: handle_request: request received (Version = 2) from PID 3642
Wed 17 Dec 2014 11:42:02 AM BRST - 3627: GETHOSTBYNAME (gasolinux)
Wed 17 Dec 2014 11:42:02 AM BRST - 3627: Haven't found "gasolinux" in hosts cache!
Wed 17 Dec 2014 11:42:02 AM BRST - 3627: handle_request: request received (Version = 2) from PID 3642
Wed 17 Dec 2014 11:42:02 AM BRST - 3627: GETHOSTBYADDR (192.168.99.14)
Wed 17 Dec 2014 11:42:02 AM BRST - 3627: Haven't found "192.168.99.14" in hosts cache!
Wed 17 Dec 2014 11:42:09 AM BRST - 3627: handle_request: request received (Version = 2) from PID 3643
Wed 17 Dec 2014 11:42:09 AM BRST - 3627: GETFDHST
Wed 17 Dec 2014 11:42:09 AM BRST - 3627: provide access to FD 9, for hosts
Wed 17 Dec 2014 11:42:09 AM BRST - 3627: handle_request: request received (Version = 2) from PID 3643
Wed 17 Dec 2014 11:42:09 AM BRST - 3627: GETHOSTBYNAME (gasolinux)
Wed 17 Dec 2014 11:42:09 AM BRST - 3627: Haven't found "gasolinux" in hosts cache!
Wed 17 Dec 2014 11:42:09 AM BRST - 3627: handle_request: request received (Version = 2) from PID 3643
Wed 17 Dec 2014 11:42:09 AM BRST - 3627: GETHOSTBYADDR (192.168.99.14)
Wed 17 Dec 2014 11:42:09 AM BRST - 3627: Haven't found "192.168.99.14" in hosts cache!

Revision history for this message
Christian Reis (kiko) wrote :

(Ignore the medibuntu hook error, which seems unrelated and caused by bad python in apport-hooks-medibuntu)

Revision history for this message
Christian Reis (kiko) wrote :

To workaround, I'm just disabling hosts caching in /etc/nscd.conf:

- enable-cache hosts yes
+ enable-cache hosts no

FWIW the /var/cache/nscd directory is on NFS, but disabling persistent doesn't change the crash.

Revision history for this message
Christian Reis (kiko) wrote :

Hmm, I wonder if putting this in a tmpfs might work around this.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.