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

moduleload is buggy because of libltdl

I used the newest version, i.e., OpenLDAP-2.4.30, my OS is ubuntu 10.04, and the libltdl version is 2.2.6b-2ubuntu1.

I used the following configuration setting in my slapd.conf, trying to load a module.

moduleload /home/tianyin/openldap-2.4.30/module/mod_info.so

start slapd, and the log shows that:

Mar 24 22:06:49 tianyin-desktop slapd[7952]: lt_dlopenext failed: (/home/tianyin/openldap-2.4.30/module/mod_info.so) file not found

I'm sure that I used the correct path by ls the path (i'm not stupid)

# ll /home/tianyin/openldap-2.4.30/module/mod_info.so
-rwxr-xr-x 1 tianyin tianyin 194708 2012-03-24 21:05 /home/tianyin/openldap-2.4.30/module/mod_info.so*

use gdb to trace the code. I find the problem is caused by libltdl:

        if ((module->lib = lt_dlopenext(file)) == NULL) {
                error = lt_dlerror();
                strcpy( ebuf, error );
                __etoa( ebuf );
                error = ebuf;
=>     Debug(LDAP_DEBUG_ANY, "lt_dlopenext failed: (%s) %s\n", file_name,
                        error, 0);

the call chain is as follows:

#0  module_load (file_name=0x91507b "/home/tianyin/openldap-2.4.30/module/mod_info.so", argc=0, argv=0x0) at module.c:190
#1  0x0000000000421284 in config_generic (c=0x915760) at bconfig.c:2021
#2  0x0000000000433a00 in config_set_vals (Conf=0x814a40, c=0x915760) at config.c:345
#3  0x0000000000433f5f in config_add_vals (Conf=0x814a40, c=0x915760) at config.c:418
#4  0x00000000004351b3 in read_config_file (fname=0x5a0a98 "/home/tianyin/openldap-2.4.30/etc/openldap/slapd.conf", depth=0, cf=0x0, cft=0x8140c0) at config.c:783
#5  0x000000000042846b in read_config (fname=0x0, dir=0x0) at bconfig.c:4213
#6  0x000000000041c217 in main (argc=1, argv=0x7fffffffe2f8) at main.c:792

error returned by lt_dlerror() is a misleading log message, which is really annoying. 


Tianyin XU,