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

Re: (ITS#3684) ldapadd and ldapsearch cause slapd segfault



It's not clear to me what code you're actually running. Note that CVS 
HEAD is distinct from all numbered releases, the two are quite 
different. If you're just using 2.3.2, a number of bugs there have 
already been fixed but the fixes are only in HEAD.

rob@dsvr.net wrote:

>Full_Name: Rob Fielding
>Version: 2.3.2 CVS HEAD
>OS: Fedora 3, DB-4.2.52 with stanford uni patches
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (62.69.64.93)
>
>
>
>Testing OpenSRS 2.3.2 CVS HEAD we discover ldapsearch and ldapadd will crash
>slapd resulting in database corruption which cannot be fixed by slapd's
>automatic recovery feature. A db_recover must be performed, and the alock file
>must be removed.
>
>slapd -d-1 of ldapadd -x -w foo -D 'cn=root' -f
>../in/slap_minimal-ointernet.ldif
>
>daemon: activity on 1 descriptors
>daemon: new connection on 13
>conn=1 fd=13 ACCEPT from IP=127.0.0.1:57572 (IP=0.0.0.0:389)
>daemon: added 13r
>daemon: select: listen=6 active_threads=0 tvp=NULL
>daemon: select: listen=7 active_threads=0 tvp=NULL
>daemon: activity on 1 descriptors
>daemon: activity on: 13r
>daemon: read activity on 13
>connection_get(13)
>connection_get(13): got connid=1
>connection_read(13): checking for input on id=1
>ber_get_next
>ldap_read: want=8, got=8
>   0000:  30 16 02 01 01 60 11 02                            0....`..
>ldap_read: want=16, got=16
>   0000:  01 03 04 07 63 6e 3d 72  6f 6f 74 80 03 66 6f 6f   
>....cn=root..foo
>ber_get_next: tag 0x30 len 22 contents:
>ber_dump: buf=0x0077b8c0 ptr=0x0077b8c0 end=0x0077b8d6 len=22
>   0000:  02 01 01 60 11 02 01 03  04 07 63 6e 3d 72 6f 6f   
>...`......cn=roo
>   0010:  74 80 03 66 6f 6f                                  t..foo
>ber_get_next
>ldap_read: want=8 error=Resource temporarily unavailable
>ber_get_next on fd 13 failed errno=11 (Resource temporarily unavailable)
>daemon: select: listen=6 active_threads=0 tvp=NULL
>daemon: select: listen=7 active_threads=0 tvp=NULL
>do_bind
>ber_scanf fmt ({imt) ber:
>ber_dump: buf=0x0077b8c0 ptr=0x0077b8c3 end=0x0077b8d6 len=19
>   0000:  60 11 02 01 03 04 07 63  6e 3d 72 6f 6f 74 80 03   
>`......cn=root..
>   0010:  66 6f 6f                                           foo
>ber_scanf fmt (m}) ber:
>ber_dump: buf=0x0077b8c0 ptr=0x0077b8d1 end=0x0077b8d6 len=5
>   0000:  00 03 66 6f 6f                                     ..foo
> >>> dnPrettyNormal: <cn=root>
>=> ldap_bv2dn(cn=root,0)
>ldap_err2string
><= ldap_bv2dn(cn=root)=0 Success
>=> ldap_dn2bv(272)
>ldap_err2string
><= ldap_dn2bv(cn=root)=0 Success
>=> ldap_dn2bv(272)
>ldap_err2string
><= ldap_dn2bv(cn=root)=0 Success
><<< dnPrettyNormal: <cn=root>, <cn=root>
>do_bind: version=3 dn="cn=root" method=128
>conn=1 op=0 BIND dn="cn=root" method=128
>==> bdb_bind: dn: cn=root
>bdb_dn2entry("cn=root")
>=> bdb_dn2id("cn=root")
><= bdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found 
>(-30990)
>Segmentation fault
>
>
>slapd -d-1 of ldapsearch -w foo -x -b 'o=internet' -D 'cn=root' '(cn=foobar)'
>
>daemon: activity on 1 descriptors
>daemon: new connection on 13
>conn=1 fd=13 ACCEPT from IP=127.0.0.1:33252 (IP=0.0.0.0:389)
>daemon: added 13r
>daemon: select: listen=6 active_threads=0 tvp=NULL
>daemon: select: listen=7 active_threads=0 tvp=NULL
>daemon: activity on 1 descriptors
>daemon: activity on: 13r
>daemon: read activity on 13
>connection_get(13)
>connection_get(13): got connid=1
>connection_read(13): checking for input on id=1
>ber_get_next
>ldap_read: want=8, got=8
>  0000:  30 16 02 01 01 60 11 02                            0....`..          
>ldap_read: want=16, got=16
>  0000:  01 03 04 07 63 6e 3d 72  6f 6f 74 80 03 66 6f 6f   ....cn=root..foo  
>ber_get_next: tag 0x30 len 22 contents:
>ber_dump: buf=0x007792b0 ptr=0x007792b0 end=0x007792c6 len=22
>  0000:  02 01 01 60 11 02 01 03  04 07 63 6e 3d 72 6f 6f   ...`......cn=roo  
>  0010:  74 80 03 66 6f 6f                                  t..foo            
>ber_get_next
>ldap_read: want=8 error=Resource temporarily unavailable
>ber_get_next on fd 13 failed errno=11 (Resource temporarily unavailable)
>daemon: select: listen=6 active_threads=0 tvp=NULL
>daemon: select: listen=7 active_threads=0 tvp=NULL
>do_bind
>ber_scanf fmt ({imt) ber:
>ber_dump: buf=0x007792b0 ptr=0x007792b3 end=0x007792c6 len=19
>  0000:  60 11 02 01 03 04 07 63  6e 3d 72 6f 6f 74 80 03   `......cn=root..  
>  0010:  66 6f 6f                                           foo               
>ber_scanf fmt (m}) ber:
>ber_dump: buf=0x007792b0 ptr=0x007792c1 end=0x007792c6 len=5
>  0000:  00 03 66 6f 6f                                     ..foo             
>  
>
>>>>dnPrettyNormal: <cn=root>
>>>>        
>>>>
>=> ldap_bv2dn(cn=root,0)
>ldap_err2string
><= ldap_bv2dn(cn=root)=0 Success
>=> ldap_dn2bv(272)
>ldap_err2string
><= ldap_dn2bv(cn=root)=0 Success
>=> ldap_dn2bv(272)
>ldap_err2string
><= ldap_dn2bv(cn=root)=0 Success
><<< dnPrettyNormal: <cn=root>, <cn=root>
>do_bind: version=3 dn="cn=root" method=128
>conn=1 op=0 BIND dn="cn=root" method=128
>==> bdb_bind: dn: cn=root
>bdb_dn2entry("cn=root")
>=> bdb_dn2id("cn=root")
><= bdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found (-30990)
>Segmentation fault
>
>
>Hope this helps,
>
>
>
>
>  
>


-- 
  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support