NSCD crashes with SIGABRT when using LDAP authentication

Bug #1085957 reported by Mattias Andersson on 2012-12-03
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
eglibc (Ubuntu)
Undecided
Unassigned

Bug Description

I'm running 64-bit Ubuntu Desktop 12.04.1, with kernel version 3.2.0-32-generic.

I have configured PAM LDAP authentication for several clients and this problem is reproducible on each client system.

If I'm not running the name service cache daemon (nscd), I'm getting the following errors when I attempt to start either 'acroread' or 'thunderbird':

(acroread:11520): GLib-WARNING **: getpwuid_r(): failed due to unknown user id (537)
(thunderbird:11298): GLib-WARNING **: getpwuid_r(): failed due to: Connection refused.

The solution so far has been to always keep the nscd service running.

However, after a recent update, nscd is now crashing each time it is started.

Here is the output when running "strace nscd -d -d -d":

getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=4*1024}) = 0
epoll_create(100) = 13
epoll_ctl(13, EPOLL_CTL_ADD, 12, {EPOLLRDNORM, {u32=12, u64=12}}) = 0
epoll_ctl(13, EPOLL_CTL_ADD, 3, {EPOLLRDNORM, {u32=3, u64=3}}) = 0
epoll_wait(13, Mon 03 Dec 2012 02:02:00 PM CET - 11145: pruning passwd cache; time 1354539720
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "0", timeout 1354538746
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "0", timeout 1354510222
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "0", timeout 1354280394
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "1000000", timeout 1354279029
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "120", timeout 1354274881
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYNAME entry "www-data", timeout 1354280394
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYNAME entry "perot", timeout 1354538746
Mon 03 Dec 2012 02:02:00 PM CET - 11145: Reloading "perot" in password cache!
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYNAME entry "perot", timeout 1354513978
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "102", timeout 1354274882
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "537", timeout 1354536515
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYNAME entry "sshd", timeout 1354520294
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "537", timeout 1354513978
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYNAME entry "sshd", timeout 1354281436
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "2", timeout 1354253870
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYNAME entry "webuser", timeout 1354253813
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "111", timeout 1354274889
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "103", timeout 1354274888
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYNAME entry "testuser", timeout 1354279029
Mon 03 Dec 2012 02:02:00 PM CET - 11145: considering GETPWBYUID entry "h", timeout 1354253781
nscd: pwdcache.c:531: readdpwbyuid: Assertion `*(db->data + he->key) != '\0' && *ep == '\0'' failed.
 <unfinished ...>
+++ killed by SIGABRT (core dumped) +++
Aborted (core dumped)

description: updated
summary: - NSCD crashes with SIGABRT when using LDAP
+ NSCD crashes with SIGABRT when using LDAP authentication
Mattias Andersson (mattias-5n) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in eglibc (Ubuntu):
status: New → Confirmed
Valentijn Sessink (valentijn) wrote :

On my 64 bit system nscd still seems to work. Have you tried to invalidate the nscd caches?
nscd -i group; nscd -i passwd; nscd -i services

Mattias Andersson (mattias-5n) wrote :

I had uninstalled nscd, but after I reinstalled it, I could no longer reproduce this error. Maybe this bug report should be closed?

Murz (murznn) wrote :

After reinstalling nscd this but is reproducible some times, for example one time of 20 starts, so this is not full solution, this is only workaround.

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

Other bug subscribers