Bug 499404 - enabling online causes ns-slapd to segfault
enabling online causes ns-slapd to segfault
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: slapi-nis (Show other bugs)
9
All Linux
low Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-06 10:52 EDT by Rob Crittenden
Modified: 2009-07-15 10:12 EDT (History)
1 user (show)

See Also:
Fixed In Version: 0.14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-15 04:17:38 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 Rob Crittenden 2009-05-06 10:52:21 EDT
Description of problem:

If I try to set nsslapd-pluginenabled to on ns-slapd segfaults:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xadefdb90 (LWP 1957)]
0x0082d1aa in strcmp () from /lib/libc.so.6
(gdb) where
#0  0x0082d1aa in strcmp () from /lib/libc.so.6
#1  0x00bb5999 in tsearch () at tsearch.c:240
#2  0x0017c401 in plugin_call_func (list=0x92b8ba0, operation=505, 
    pb=0x95ee5d8, call_one=0) at ldap/servers/slapd/plugin.c:1369
#3  0x0017c60e in plugin_call_plugins (pb=0x95ee5d8, whichfunction=505)
    at ldap/servers/slapd/plugin.c:1331
#4  0x00170022 in op_shared_modify (pb=0x95ee5d8, pw_change=0, old_pw=0x0)
    at ldap/servers/slapd/modify.c:855
#5  0x0017151c in do_modify (pb=0x95ee5d8) at ldap/servers/slapd/modify.c:341
#6  0x08058197 in connection_threadmain ()
    at ldap/servers/slapd/connection.c:502
#7  0x00b71f81 in _pt_root (arg=<value optimized out>)
    at ../../../mozilla/nsprpub/pr/src/pthreads/ptthread.c:221
#8  0x0097932f in start_thread (arg=<value optimized out>)
    at pthread_create.c:297
#9  0x0089620e in clone () from /lib/libc.so.6

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

fedora-ds-base-1.2.0-4.fc9.i386
slapi-nis-0.13-1.fc9.i386

How reproducible:

always

Steps to Reproduce:
1. Configure a plugin in DS enabled
2. online modify it to be disabled
3. restart DS
4. online modify it to be enabled
5. boom

I tested this with the 7-bit check plugin and schema compatibility and neither cause the server to core when I enable them online w/ldapmodify.

$ ldapmodify -x -D "cn=directory manager" -w password
dn: cn=NIS Server, cn=plugins, cn=config
changetype: modify
replace: nsslapd-pluginenabled
nsslapd-pluginenabled: off

modifying entry "cn=NIS Server, cn=plugins, cn=config"

# service restart dirsrv

$ ldapmodify -x -D "cn=directory manager" -w password
dn: cn=NIS Server, cn=plugins, cn=config
changetype: modify
replace: nsslapd-pluginenabled
nsslapd-pluginenabled: on

modifying entry "cn=NIS Server, cn=plugins, cn=config"

[ DS has dropped core ]
Comment 1 Nalin Dahyabhai 2009-05-06 13:38:57 EDT
There's a bug here, but I also mis-set expectations a bit -- apparently when you enable or disable a plugin, you're required to restart the server for the enabling or disabling to actually take effect.  The docs aren't exactly clear on this (http://www.redhat.com/docs/manuals/dir-server/8.1/plugin/Plugin_Programming_Guide-Configuring_Plug_ins.html), but in my tests it appears to be a requirement: the nsslapd-pluginenabled setting controls whether or not the plugin is "started" and "closed", but the value is only consulted at startup-time.
Comment 2 Nalin Dahyabhai 2009-05-06 13:55:16 EDT
The fix, then, is either for the plugin to only install its pre- and post-operation hooks when it's actually being "started", or to have the hooks which the initialization function (which is always called) registers check if the plugin has been "started" before doing anything.
Comment 3 Nalin Dahyabhai 2009-05-06 15:34:21 EDT
Going with the latter because that avoids calling initialization functions from inside of startup functions, which might cause other weird things to happen, in 0.14.
Comment 4 Bug Zapper 2009-06-09 23:41:57 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Bug Zapper 2009-07-15 04:17:38 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 6 Nalin Dahyabhai 2009-07-15 10:12:35 EDT
We pushed 0.15-1 to fix this; apologies for marking it incorrectly.  Changing resolution from wontfix to currentrelease.

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