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

Re: cross-DB aliases leave me dangling (ITS#65)



This is a multi-part message in MIME format.
--------------2C93A3F6D7956F7F2E09ACCE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I find the following gdb output puzzling, as it indicates calls to
pthread_create. I compiled without threads. Here is the script I
ran to set my env and call configure, followed by the gdb backtrace.
The diagnostic from slapd -d 133 is attached. 

##################
## WITHOUT THREADS
CC=gcc
export CC
CPPFLAGS="-I/u1/serverHOMES/db/sleepycat/db-2.3.16/include/
-DSLAPD_ALIAS_DEREF"
export CPPFLAGS
## DEBUG
CFLAGS="-g"
## OPTIMIZED
## CFLAGS="-O2"
export CFLAGS
LDFLAGS=-L/u1/serverHOMES/db/sleepycat/db-2.3.16/lib/
export LDFLAGS
./configure --prefix=/u1/serverHOMES/directory/openLDAP/1.2beta
--without-threads --enable-phonetic --with-gnu-ld --enable-aclgroups
--with-ldbm-api=db2 --disable-kerberos --disable-ldapd
--disable-x-compile

And here is the gdb output.  

GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `slapd -d 133'.
Program terminated with signal 11, Segmentation fault.
find_solib: Can't read pathname for load map: Input/output error

#0  0x80686f6 in derefAlias_r (be=0x80b4d88, conn=0x80beca0,
op=0x80cf278, 
    e=0x0) at alias.c:46
46                ( depth < be->be_maxDerefDepth );
(gdb) bt
#0  0x80686f6 in derefAlias_r (be=0x80b4d88, conn=0x80beca0,
op=0x80cf278, 
    e=0x0) at alias.c:46
#1  0x8068dd9 in derefDN (be=0x80b4d88, conn=0x80beca0, op=0x80cf278, 
    dn=0x80c96b8 "CN=YAYA PAUL J 95TB,OU=CHIEF INFORMATION
OFFICER,OU=NATIONAL OFFICE,OU=ORGANIZATION,OU=INTERNAL REVENUE
SERVICE,OU=DEPARTMENT OF THE TREASURY,O=U.S. GOVERNMENT,C=US") at
alias.c:218
#2  0x806789d in ldbm_back_search (be=0x80b4d88, conn=0x80beca0,
op=0x80cf278, 
    base=0x80c96b8 "CN=YAYA PAUL J 95TB,OU=CHIEF INFORMATION
OFFICER,OU=NATIONAL OFFICE,OU=ORGANIZATION,OU=INTERNAL REVENUE
SERVICE,OU=DEPARTMENT OF THE TREASURY,O=U.S. GOVERNMENT,C=US", scope=0,
deref=2, slimit=1500, tlimit=70, 
    filter=0x80ab258, filterstr=0x80cc460 "(objectclass=*)",
attrs=0x80cf118, 
    attrsonly=0) at search.c:83
#3  0x804e366 in do_search (conn=0x80beca0, op=0x80cf278) at
search.c:149
#4  0x804d7f6 in connection_operation (arg_v=0x80d41d0) at
connection.c:74
#5  0x8074fa9 in pthread_create (tid=0x80cf2a0, attr=0xbffff9cc, 
    func=0x804d5ec <connection_operation>, arg=0x80d41d0) at
thread.c:534
#6  0x804ddab in connection_activity (conn=0x80beca0) at
connection.c:225
#7  0x804d336 in slapd_daemon (port=0x185) at daemon.c:374
#8  0x8074fa9 in pthread_create (tid=0x80ab11c, attr=0x0, 
    func=0x804a794 <slapd_daemon>, arg=0x185) at thread.c:534
#9  0x804a2dd in main (argc=3, argv=0xbffffcdc) at main.c:194

--
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|
# Larry Bartz                           |                              |
#  lbartz@parnelli.indy.cr.irs.gov      | Ooo, ooo,                    |
#                                       | Ooo, ooo, oooooo!            |
#                                       | I've got a gnu attitude!     |
#  voice (317) 226-7060                 |                              |
#  FAX   (317) 226-6378                 |                              |
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|

"Kurt D. Zeilenga" wrote:
> 
> At 07:45 PM 2/2/99 GMT, lbartz@parnelli.indy.cr.irs.gov wrote:
> >Full_Name: Larry Bartz
> >Version: 1.2beta
> >OS: Linux 2.0.35 (Redhat 5.1)
> >URL: ftp://ftp.openldap.org/incoming/
> >Submission from: (NULL) (209.49.118.18)
> >
> >
> >I've configured and loaded multiple databases (Sleepycat 2.3.16) under a
> >single slapd instance. As per required practice, the slapd and the DB are
> >compiled without threads, and with the define for alias dereferencing.
> >
> >The suffix(s) of the databases are all siblings under a common parent DN.
> >The parent of all the siblings has its own DB, which is (per the UMICH Admin
> >Guide) last in the list.
> >
> >The databases contain alias entries in which the aliasedObjectName is
> >the DN of an entry in another database.
> >
> >BEHAVIOR I GOT:
> >
> >    "ldif2ldbm -n [dbnumber]" loads the separate databases just fine
> >
> >    slapd starts and runs just fine
> >
> >    client access, using any of the defined rootdn(s) as base is fine, until...
> >
> >    ALIAS DEREFERENCING:
> >                         slapd, as observed via "-d 255"
> >
> >                         1. checks current database (in which the alias
> >resides)
> >                            for the ID of the referenced DN
> >                            - finds nothing - dn2id NOID
> >                         2. parses back through the RDNs of the referenced DN,
> >                            checking each against the current DB, looking for
> >                            a branch to follow
> >                            - finds no match, because the DN couldn't possibly
> >                              be in this DB - dn2id NOID, until the RDNs are
> >                              exhausted
> >                         3. returns "DANGLING ALIAS" error AND dumps core!
> 
> Of course, the crash shouldn't occur, however:
> 
> Returning an error is expected in this case.  I would
> suspect either an LDAP_ALIAS_PROBLEM (or
> LDAP_ALIAS_DEREF_PROBLEM).  In OpenLDAP, each backend is
> considerred to be a virtual DSA.  Aliases across backends
> cannot be followed as the software is currently designed.
> 
> As far as the crash is concerned, please followup with a
> relevant logs (-d 133) and a debugger backtrace from the core
> file.
> 
> Kurt
--------------2C93A3F6D7956F7F2E09ACCE
Content-Type: text/plain; charset=us-ascii;
 name="slapd.d133"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="slapd.d133"

slapd 1.2.0-BETA (Wed Feb  3 08:01:31 EST 1999)
	root@big-al.indy.cr.irs.gov:/u1/serverHOMES/directory/openLDAP/SRC/1.2beta/ldap/servers/slapd
ACL: access to
 attrs=userpassword
	by dn=self
	by dn=.*

ACL: access to
 attrs=userpassword
	by dn=self
	by dn=.*

ACL: access to
 attrs=userpassword
	by dn=self
	by dn=.*

ACL: access to
 attrs=userpassword
	by dn=self
	by dn=.*

ACL: access to
 attrs=userpassword
	by dn=self
	by dn=.*

ACL: access to
 attrs=userpassword
	by dn=self
	by dn=.*

ACL: access to
 attrs=userpassword
	by dn=self
	by dn=.*

ACL: access to
 attrs=userpassword
	by dn=self
	by dn=.*

ACL: access to
 attrs=userpassword
	by dn=self
	by dn=.*

ACL: access to
 attrs=userpassword
	by dn=self
	by dn=.*

slapd starting
do_bind
do_bind: version 3 dn () method 128
unknown version 3
send_ldap_result 2::version not supported
do_bind
do_bind: version 2 dn () method 128
send_ldap_result 0::

[ snipped ]

do_search
SRCH "CN=YAYA PAUL J 95TB,OU=CHIEF INFORMATION OFFICER,OU=NATIONAL OFFICE,OU=ORGANIZATION,OU=INTERNAL REVENUE SERVICE,OU=DEPARTMENT OF THE TREASURY,O=U.S. GOVERNMENT,C=US" 0 2    0 0 0
    filter: (objectclass=*)
    attrs: objectclass javaserializedobject javaclassname javafactory javafactorylocation javareferenceaddress
=> ldbm_back_search
<= dereferencing dn: "CN=YAYA PAUL J 95TB,OU=CHIEF INFORMATION OFFICER,OU=NATIONAL OFFICE,OU=ORGANIZATION,OU=INTERNAL REVENUE SERVICE,OU=DEPARTMENT OF THE TREASURY,O=U.S. GOVERNMENT,C=US"
dn2entry_r: dn: "CN=YAYA PAUL J 95TB,OU=CHIEF INFORMATION OFFICER,OU=NATIONAL OFFICE,OU=ORGANIZATION,OU=INTERNAL REVENUE SERVICE,OU=DEPARTMENT OF THE TREASURY,O=U.S. GOVERNMENT,C=US"
=> dn2id( "CN=YAYA PAUL J 95TB,OU=CHIEF INFORMATION OFFICER,OU=NATIONAL OFFICE,OU=ORGANIZATION,OU=INTERNAL REVENUE SERVICE,OU=DEPARTMENT OF THE TREASURY,O=U.S. GOVERNMENT,C=US" )
====> cache_find_entry_dn2id: found dn: CN=YAYA PAUL J 95TB,OU=CHIEF INFORMATION OFFICER,OU=NATIONAL OFFICE,OU=ORGANIZATION,OU=INTERNAL REVENUE SERVICE,OU=DEPARTMENT OF THE TREASURY,O=U.S. GOVERNMENT,C=US
entry_rdwr_rlock: ID: 29536
entry_rdwr_runlock: ID: 29536
<= dn2id 29536 (in cache)
=> id2entry_r( 29536 )
====> cache_find_entry_dn2id: found id: 29536 rw: 0
entry_rdwr_rlock: ID: 29536
<= id2entry_r 0x80d3d00 (cache)
====> cache_return_entry_r
entry_rdwr_runlock: ID: 29536
dn2entry_r: dn: "CN=YAYA PAUL J 95TB,OU=CHIEF INFORMATION OFFICER,OU=NATIONAL OFFICE,OU=ORGANIZATION,OU=INTERNAL REVENUE SERVICE,OU=DEPARTMENT OF THE TREASURY,O=U.S. GOVERNMENT,C=US"
=> dn2id( "CN=YAYA PAUL J 95TB,OU=CHIEF INFORMATION OFFICER,OU=NATIONAL OFFICE,OU=ORGANIZATION,OU=INTERNAL REVENUE SERVICE,OU=DEPARTMENT OF THE TREASURY,O=U.S. GOVERNMENT,C=US" )
====> cache_find_entry_dn2id: found dn: CN=YAYA PAUL J 95TB,OU=CHIEF INFORMATION OFFICER,OU=NATIONAL OFFICE,OU=ORGANIZATION,OU=INTERNAL REVENUE SERVICE,OU=DEPARTMENT OF THE TREASURY,O=U.S. GOVERNMENT,C=US
entry_rdwr_rlock: ID: 29536
entry_rdwr_runlock: ID: 29536
<= dn2id 29536 (in cache)
=> id2entry_r( 29536 )
====> cache_find_entry_dn2id: found id: 29536 rw: 0
entry_rdwr_rlock: ID: 29536
<= id2entry_r 0x80d3d00 (cache)
<= checking for alias for dn cn=Yaya Paul J 95TB, ou=Chief Information Officer, ou=National Office, ou=Organization, ou=Internal Revenue Service, ou=Department of the Treasury, o=U.S. Government, c=US
<= cn=Yaya Paul J 95TB, ou=Chief Information Officer, ou=National Office, ou=Organization, ou=Internal Revenue Service, ou=Department of the Treasury, o=U.S. Government, c=US is an alias for cn=Yaya Paul J 95TB, ou=People, ou=Internal Revenue Service, ou=Department of the Treasury, o=U.S. Government, c=US
dn2entry_r: dn: "cn=Yaya Paul J 95TB, ou=People, ou=Internal Revenue Service, ou=Department of the Treasury, o=U.S. Government, c=US"
=> dn2id( "cn=Yaya Paul J 95TB, ou=People, ou=Internal Revenue Service, ou=Department of the Treasury, o=U.S. Government, c=US" )
=> ldbm_cache_open( "/u4/directoryDATA/openLDAP/multiDB/DB08-Organization/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id NOID
dn2entry_r: dn: " ou=People, ou=Internal Revenue Service, ou=Department of the Treasury, o=U.S. Government, c=US"
=> dn2id( " ou=People, ou=Internal Revenue Service, ou=Department of the Treasury, o=U.S. Government, c=US" )
=> ldbm_cache_open( "/u4/directoryDATA/openLDAP/multiDB/DB08-Organization/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id NOID
dn2entry_r: dn: " ou=Internal Revenue Service, ou=Department of the Treasury, o=U.S. Government, c=US"
=> dn2id( " ou=Internal Revenue Service, ou=Department of the Treasury, o=U.S. Government, c=US" )
=> ldbm_cache_open( "/u4/directoryDATA/openLDAP/multiDB/DB08-Organization/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id NOID
dn2entry_r: dn: " ou=Department of the Treasury, o=U.S. Government, c=US"
=> dn2id( " ou=Department of the Treasury, o=U.S. Government, c=US" )
=> ldbm_cache_open( "/u4/directoryDATA/openLDAP/multiDB/DB08-Organization/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id NOID
dn2entry_r: dn: " o=U.S. Government, c=US"
=> dn2id( " o=U.S. Government, c=US" )
=> ldbm_cache_open( "/u4/directoryDATA/openLDAP/multiDB/DB08-Organization/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id NOID
dn2entry_r: dn: " c=US"
=> dn2id( " c=US" )
=> ldbm_cache_open( "/u4/directoryDATA/openLDAP/multiDB/DB08-Organization/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id NOID
dn2entry_r: dn: ""
=> dn2id( "" )
=> ldbm_cache_open( "/u4/directoryDATA/openLDAP/multiDB/DB08-Organization/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id NOID
<= cn=Yaya Paul J 95TB, ou=Chief Information Officer, ou=National Office, ou=Organization, ou=Internal Revenue Service, ou=Department of the Treasury, o=U.S. Government, c=US is a dangling alias to cn=Yaya Paul J 95TB, ou=People, ou=Internal Revenue Service, ou=Department of the Treasury, o=U.S. Government, c=US
send_ldap_result 33::Dangling Alias

--------------2C93A3F6D7956F7F2E09ACCE--