[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#6030) slapd segfaults when loading already present module



HEAD has been changed to silently ignore these cases, please test.

(I guess we could log something at LDAP_DEBUG_CONFIG level but that seems 
unnecessary at the moment.)

luca@OpenLDAP.org wrote:
> Full_Name: Luca Scamoni
> Version: RE24/HEAD
> OS: any
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (82.63.140.131)
>
>
> When loading a module through cn=config or slapd.conf moduleload directive, if
> the module has already been loaded, slapd segfaults. Since it correctly finds
> out the module is already registered shouldn't it refuse the modification when
> the operation is attempted through cn=config or simply refuse to start when done
> through slapd.conf?
>
> Last log lines (-d -1):
> line 20 (moduleload     syncprov.la)
> loaded module syncprov.la
> Control 1.3.6.1.4.1.4203.1.9.1.1 already registered.
> syncprov_init: Failed to register control -9
> Segmentation fault
>
> backtrace:
> #0  0x0000000b in ?? ()
> No symbol table info available.
> #1  0x080dcb94 in module_load (file_name=0x89746bb "syncprov.la", argc=0,
> argv=0x0)
>      at module.c:218
>          module = (module_loaded_t *) 0x8976718
>          error = 0x0
>          rc = -9
>          initialize = (MODULE_INIT_FN) 0x5f6936<init_module>
> #2  0x0805bd1c in config_generic (c=0x8967970) at bconfig.c:1940
>          i = 11784196
>          __PRETTY_FUNCTION__ = "config_generic"
> #3  0x0806a586 in config_set_vals (Conf=0x8168160, c=0x8967970) at config.c:314
>          rc = 0
>          arg_type = -2013265890
>          ptr = (void *) 0x0
> #4  0x0806aa68 in config_add_vals (Conf=0x8168160, c=0x8967970) at config.c:383
>          rc = 0
>          arg_type = -2013265890
> #5  0x0806ba42 in read_config_file (fname=0x8932308
> "/usr/local/openldap/etc/slapd.conf",
>      depth=0, cf=0x0, cft=0x8167bc0) at config.c:736
>          fp = (FILE *) 0x89692f8
>          ct = (ConfigTable *) 0x8168160
>          c = (ConfigArgs *) 0x8967970
>          rc = 0
>          s = {st_dev = 64768, __pad1 = 0, st_ino = 172196293, st_mode = 33152,
> st_nlink = 1,
>    st_uid = 0, st_gid = 0, st_rdev = 0, __pad2 = 0, st_size = 1087, st_blksize =
> 4096,
>    st_blocks = 8, st_atim = {tv_sec = 1237802811, tv_nsec = 0}, st_mtim = {tv_sec
> = 1237802556,
>      tv_nsec = 0}, st_ctim = {tv_sec = 1237802556, tv_nsec = 0}, __unused4 = 0,
> __unused5 = 0}
> #6  0x08061626 in read_config (fname=0x8932308
> "/usr/local/openldap/etc/slapd.conf", dir=0x0)
>      at bconfig.c:3613
>          be = (BackendDB *) 0x8967800
>          cfb = (CfBackInfo *) 0x816c340
>          cfdir = 0x11f0bc ""
>          cfname = 0x8932308 "/usr/local/openldap/etc/slapd.conf"
>          rc = 0
>          __PRETTY_FUNCTION__ = "read_config"
> #7  0x08057a5d in main (argc=5, argv=0xbfc1ce24) at main.c:754
>          i = -1
>          no_detach = 0
>          rc = 0
>          urls = 0x89323f0 "ldap://:9000";
>          username = 0x0
>          groupname = 0x0
>          sandbox = 0x0
>          syslogUser = 160
>          g_argc = 5
>          g_argv = (char **) 0xbfc1ce24
>          configfile = 0x8932308 "/usr/local/openldap/etc/slapd.conf"
>          configdir = 0x0
>          serverName = 0xbfc1eb66 "slapd"
>          serverMode = 1
>          scp = (struct sync_cookie *) 0x0
>          scp_entry = (struct sync_cookie *) 0x0
>          debug_unknowns = (char **) 0x0
>          syslog_unknowns = (char **) 0x0
>          serverNamePrefix = 0x811b537 ""
>          l = 1347407256
>          slapd_pid_file_unlink = 0
>          slapd_args_file_unlink = 0
>          firstopt = 0
>          __PRETTY_FUNCTION__ = "main"
>
>
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/