Bug 388435

Summary: nscd segfaults
Product: [openSUSE] openSUSE 11.0 Reporter: Casual J. Programmer <casualprogrammer>
Component: NetworkAssignee: Petr Baudis <pbaudis>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: andrea.turrini
Version: Final   
Target Milestone: ---   
Hardware: x86   
OS: openSUSE 11.0   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: core dump of nscd daemon
another nscd core dump on segfault

Description Casual J. Programmer 2008-05-08 20:01:08 UTC
After clean install & update from factory /var/log/messages contains nscd errors


cat /var/log/messages | grep nscd
May  6 08:20:26 linux klogd: type=1505 audit(1210062017.523:9): operation="profile_load" name="/usr/sbin/nscd" name2="default" pid=1747
May  6 08:58:11 linux klogd: type=1505 audit(1210057083.963:9): operation="profile_load" name="/usr/sbin/nscd" name2="default" pid=1834
May  6 09:12:12 linux klogd: type=1505 audit(1210057925.180:9): operation="profile_load" name="/usr/sbin/nscd" name2="default" pid=1826
May  6 10:15:06 linux klogd: type=1505 audit(1210061698.295:9): operation="profile_load" name="/usr/sbin/nscd" name2="default" pid=1750
May  7 10:19:21 linux klogd: type=1505 audit(1210148353.947:7): operation="profile_load" name="/usr/sbin/nscd" name2="default" pid=1707
May  8 08:41:17 linux klogd: type=1505 audit(1210228870.004:9): operation="profile_load" name="/usr/sbin/nscd" name2="default" pid=1751
May  8 09:43:37 reached klogd: nscd[4224]: segfault at ffd1f0e8 ip b80e33ba sp afd1efd8 error 6 in nscd[b80d3000+1c000]
May  8 19:22:28 workstation6l klogd: nscd[3957]: segfault at fffde10d ip b80623ba sp afc9dfe0 error 6 in nscd[b8052000+1c000]

Notebook: Fujitsu Siemens Amilo Si 1520
Graphics: Fujitsu Siemens Mobile 945GM/GMS/GME, 943/940GML Express
Monitor:  QUANTADISPLAY LCD Monitor 1280x800@60Hz
Wireless: Intel PRO/Wireless 3945ABG Network Connection
Sound:    82801G (ICH7 Family) High Definition Audio Controller
Desktop:  gnome-desktop-2.22.1-14
YaST GUI: yast2-qt-2.16.45-2
OS:       openSUSE 11.0 (i586) Beta2 VERSION = 11.0
Kernel:   2.6.25-26-pae

libnscd-2.0.2-76
nscd-2.8-9
Comment 1 Andrea Turrini 2008-06-25 09:03:24 UTC
I can confirm this fact:

orodruin:~ # grep nscd /var/log/messages
Jun 20 23:24:57 orodruin kernel: nscd[3004]: segfault at b7ffa10c ip b7f957dc sp afdd2ff0 error 4 in nscd[b7f85000+1c000]
Jun 23 09:11:52 orodruin kernel: nscd[3058]: segfault at 2120d937 ip b80e999d sp afd24180 error 4 in nscd[b80da000+1c000]
Jun 24 10:05:37 orodruin kernel: nscd[2908]: segfault at b7fc82f8 ip b7f3b7bb sp afb75004 error 4 in nscd[b7f2b000+1c000]
Jun 25 08:59:20 orodruin kernel: nscd[3480]: segfault at 9b0 ip b80727c1 sp afcab014 error 4 in nscd[b8062000+1c000]

OS: openSUSE 11.0 GM (i586)
Kernel: 2.6.25.5-1.1-default
nscd's rpms: nscd-2.8-14.1, libnscd-2.0.2-81.1

Fresh installation, no update from 10.3.

Comment 2 Casual J. Programmer 2008-06-25 09:15:08 UTC
Doesn't seem to happen here anymore:

nscd-2.8-14.1
libnscd-2.0.2-81.1

# cat /var/log/messages | grep nscd
Jun 24 18:08:19 workstation6l kernel: type=1505 audit(1214323691.502:9): operation="profile_load" name="/usr/sbin/nscd" name2="default" pid=1838
Jun 25 07:02:10 workstation6l kernel: type=1505 audit(1214370121.783:9): operation="profile_load" name="/usr/sbin/nscd" name2="default" pid=1802
Comment 3 Petr Baudis 2008-06-25 23:26:15 UTC
Andrea, can you collect and provide some nscd cores, please? (E.g. ulimit -c unlimited; nscd.)
Comment 4 Andrea Turrini 2008-06-26 06:48:05 UTC
I can try, but the segfault appears very randomly.

I'm not familiar with process segfaults, so it is better if you tell me exactly what commands I must use to collect informations you need (and where such informations are stored).

Now I've launched the "ulimit -c unlimited;nscd" command, and I hope nscd generates a segfault.
Comment 5 Petr Baudis 2008-06-26 08:40:54 UTC
Yes (please make sure nscd was not running before; maybe to be sure, run nscd -d instead of just nscd). When nscd segfaults, you should find some core* file in the currrent directory, please gzip it and attach it in this bug.
Comment 6 Andrea Turrini 2008-06-26 12:08:13 UTC
Created attachment 224540 [details]
core dump of nscd daemon

Finally I've obtained the segfault for nscd -d daemon.

Last lines printed by nscd are (where ori and 1000 are the ids of my user):

4678: remove GETPWBYUID entry "1000"
4678: remove GETPWBYNAME entry "ori"
nscd: mem.c:392: gc: Assertion `off_alloc == off_allocend' failed.
Aborted (core dumped)

I do not know how much time is passed between the last remove and the failed assertion.
Comment 7 Andrea Turrini 2008-06-26 14:35:04 UTC
Created attachment 224580 [details]
another nscd core dump on segfault

Another segfault core dump.

This time, last output lines are:
7931: remove GETPWBYUID entry "0"
7931: remove GETPWBYNAME entry "root"
nscd: mem.c:392: gc: Assertion `off_alloc == off_allocend' failed.

Next time I want to try with --debug option
Comment 8 Andrea Turrini 2008-06-26 14:38:49 UTC
Ops... -d and --debug are the same option...

Anyway, I've started nscd again and the first printed message is:

8736: invalid persistent database file "/var/run/nscd/passwd": verification failed
Comment 9 Petr Baudis 2008-06-27 00:38:11 UTC
Thanks. This looks to be the same as bug 387202, I think I know what the culprit is; I will prepare a patch.

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