Issue 4830 - test030-relay fails with back-meta
Summary: test030-relay fails with back-meta
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-02 16:03 UTC by andreas@canonical.com
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description andreas@canonical.com 2007-02-02 16:03:43 UTC
Full_Name: Andreas Hasenack
Version: 2.3.33
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (200.140.247.99)


Hello,

while running make test on a 2.3.33 build, I get an error in
test030-relay when using the meta backend:

(...)
Using meta backend...

Starting slapd on TCP/IP port 9011...
Using ldapsearch to check that slapd is running...
Using ldapadd to populate the database...
Searching base="dc=example,dc=com"...
Searching base="o=Example,c=US"...
Search failed (255)!
./scripts/relay: line 78: kill: (31577) - Processo inexistente
>>>>> ./scripts/test030-relay failed (exit 255)
make: ** [bdb-yes] Erro 255

The log shows:
$ tail testrun/slapd.1.log
conn=3 op=1 >>> meta_search_dobind_init[0]
conn=3 op=1 <<< meta_search_dobind_init[0]=1
==> rewrite_context_apply [depth=1] string='o=Example,c=US'
==> rewrite_rule_apply rule='((.+),)?o=Example,[ ]?c=US$'
string='o=Example,c=US' [1 pass(es)]
==> rewrite_context_apply [depth=1] res={0,'dc=example,dc=com'}
[rw] searchBase: "o=Example,c=US" -> "dc=example,dc=com"
==> rewrite_context_apply [depth=1] string='(objectClass=*)'
==> rewrite_context_apply [depth=1] res={0,'NULL'}
[rw] searchFilter: "(objectClass=*)" -> "(objectClass=*)"
/home/andreas/updates-svn/openldap/BUILD/openldap-2.3.33/servers/slapd/.libs/lt-slapd:
symbol lookup error:
+../servers/slapd/back-meta/.libs/back_meta-2.3.so.0: undefined symbol:
ldap_back_proxy_authz_ctrl

Comment 1 andreas@canonical.com 2007-02-14 14:00:27 UTC
On Fri, Feb 02, 2007 at 04:03:43PM +0000, ahasenack@terra.com.br wrote:
> ==> rewrite_context_apply [depth=1] string='(objectClass=*)'
> ==> rewrite_context_apply [depth=1] res={0,'NULL'}
> [rw] searchFilter: "(objectClass=*)" -> "(objectClass=*)"
> /home/andreas/updates-svn/openldap/BUILD/openldap-2.3.33/servers/slapd/.libs/lt-slapd:
> symbol lookup error:
> +../servers/slapd/back-meta/.libs/back_meta-2.3.so.0: undefined symbol:
> ldap_back_proxy_authz_ctrl

Howard debugged this on IRC and it turns out that our (mine and
_ranger_'s) libunixodbc has lt_dl* symbols in it. Relinking slapd
without the unixodbc lib fixes it.

Comment 2 Howard Chu 2007-02-14 14:18:53 UTC
ahasenack@terra.com.br wrote:
> On Fri, Feb 02, 2007 at 04:03:43PM +0000, ahasenack@terra.com.br wrote:
>> ==> rewrite_context_apply [depth=1] string='(objectClass=*)'
>> ==> rewrite_context_apply [depth=1] res={0,'NULL'}
>> [rw] searchFilter: "(objectClass=*)" -> "(objectClass=*)"
>> /home/andreas/updates-svn/openldap/BUILD/openldap-2.3.33/servers/slapd/.libs/lt-slapd:
>> symbol lookup error:
>> +../servers/slapd/back-meta/.libs/back_meta-2.3.so.0: undefined symbol:
>> ldap_back_proxy_authz_ctrl
> 
> Howard debugged this on IRC and it turns out that our (mine and
> _ranger_'s) libunixodbc has lt_dl* symbols in it. Relinking slapd
> without the unixodbc lib fixes it.

Yes, so there are two potential issues - the unixodbc shared library seems to 
be statically linked with an older version of libltdl. I didn't run into this 
problem on my build because I don't have that odbc library. Anyway, due to 
the link order of the libraries, the lt_dlopen in this library gets used 
before the linker resolves to the system's libltdl.so, and it seems that this 
version of lt_dlopen doesn't automatically export the symbols of modules that 
it loads.

I'm guessing the reason this is a problem in 2.3.33 and not in 2.3.32 is 
because there is a new dependency in 2.3.33 between back-meta and back-ldap.

The other part of this is that the slapd binary should not be getting linked 
against -lodbc when back_sql is built as a module.

Although, if back-sql is built statically, and other backends are dynamic, 
this problem may still crop up. It seems that fixing -lodbc would be required 
then.
-- 
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc
   Chief Architect, OpenLDAP     http://www.openldap.org/project/

Comment 3 Howard Chu 2007-02-16 03:38:49 UTC
changed notes
changed state Open to Release
moved from Incoming to Build
Comment 4 Howard Chu 2007-02-17 01:02:40 UTC
changed notes
Comment 5 Howard Chu 2007-02-18 16:02:09 UTC
changed notes
changed state Release to Closed
Comment 6 Gavin Henry 2007-05-03 22:19:43 UTC
<quote who="hyc@symas.com">
> ahasenack@terra.com.br wrote:
>> On Fri, Feb 02, 2007 at 04:03:43PM +0000, ahasenack@terra.com.br wrote:
>>> ==> rewrite_context_apply [depth=1] string='(objectClass=*)'
>>> ==> rewrite_context_apply [depth=1] res={0,'NULL'}
>>> [rw] searchFilter: "(objectClass=*)" -> "(objectClass=*)"
>>> /home/andreas/updates-svn/openldap/BUILD/openldap-2.3.33/servers/slapd/.libs/lt-slapd:
>>> symbol lookup error:
>>> +../servers/slapd/back-meta/.libs/back_meta-2.3.so.0: undefined symbol:
>>> ldap_back_proxy_authz_ctrl
>>
>> Howard debugged this on IRC and it turns out that our (mine and
>> _ranger_'s) libunixodbc has lt_dl* symbols in it. Relinking slapd
>> without the unixodbc lib fixes it.
>
> Yes, so there are two potential issues - the unixodbc shared library seems
> to
> be statically linked with an older version of libltdl. I didn't run into
> this
> problem on my build because I don't have that odbc library. Anyway, due to
> the link order of the libraries, the lt_dlopen in this library gets used
> before the linker resolves to the system's libltdl.so, and it seems that
> this
> version of lt_dlopen doesn't automatically export the symbols of modules
> that
> it loads.
>
> I'm guessing the reason this is a problem in 2.3.33 and not in 2.3.32 is
> because there is a new dependency in 2.3.33 between back-meta and
> back-ldap.
>
> The other part of this is that the slapd binary should not be getting
> linked
> against -lodbc when back_sql is built as a module.
>
> Although, if back-sql is built statically, and other backends are dynamic,
> this problem may still crop up. It seems that fixing -lodbc would be
> required
> then.

I've hit this same problem tonight (no sql though):

./scripts/test030-relay: line 78: kill: (7779) - No such process
>>>>> ./scripts/test030-relay failed (exit 255)
make[2]: *** [bdb-mod] Error 255
make[2]: Leaving directory `/home/suretec/src/openldap-2.3.35/tests'
make[1]: *** [test] Error 2
make[1]: Leaving directory `/home/suretec/src/openldap-2.3.35/tests'
make: *** [test] Error 2

slapd.1.log:

/home/suretec/src/openldap-2.3.35/servers/slapd/.libs/lt-slapd: symbol
lookup error: ../servers/slapd/back-meta/.libs/back_meta-2.3.so.0:
undefined symbol: ldap_back_proxy_authz_ctrl

Config options were:

env CC=/usr/local/bin/gcc CPPFLAGS="-I/usr/local/ssl/include
-I/usr/local/BerkeleyDB.4.2/include -I/usr/local/include/sasl" \
LDFLAGS="-L/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib
-L/usr/local/lib/sasl2" \
LIBS="-ldl" \
LD_LIBRARY_PATH="/usr/local/ssl/lib /usr/local/BerkeleyDB.4.2/lib
/usr/local/lib/sasl2" ./configure \
--prefix=/usr/local --enable-slapd --enable-syslog \
--enable-dynamic --enable-rewrite --disable-sql --disable-ipv6
--disable-shell \
--with-threads --enable-modules --enable-backends=mod \
--enable-overlays=mod --with-tls --enable-wrappers

On Debian Sarge 3.1 with custom compiled:

openssl-0.9.8e
cyrus-sasl-2.1.22
db-4.2.52
heimdal-0.8.1

I can't get past it. Any debug advice?

Thanks.

-- 
Kind Regards,

Gavin Henry.
Managing Director.

T +44 (0) 1224 279484
M +44 (0) 7930 323266
F +44 (0) 1224 824887
E ghenry@suretecsystems.com

Open Source. Open Solutions(tm).

http://www.suretecsystems.com/

Comment 7 Howard Chu 2009-02-17 07:03:30 UTC
moved from Build to Archive.Build
Comment 8 OpenLDAP project 2014-08-01 21:05:12 UTC
fixed in HEAD/RE23/RE24
same as ITS#4713