Wednesday, May 24, 2017

ldapd dies with assert failure

I've tried to pare this down. Never used ldapd before but hoping it can
replace slapd for my needs. I'm not sure if this is a bug, or if I'm
missing something in the process of setting up a new directory.

Starting with a new patched/stable system:


$ uname -mrsv
OpenBSD 6.1 GENERIC.MP#6 amd64


$ doas cat /etc/ldapd.conf
listen on "/var/run/ldapd.sock"

rootdn "cn=admin,dc=example,dc=org"
rootpw "test1234"

schema "/etc/ldap/core.schema"

namespace "dc=example,dc=org" {
index objectClass
}


$ cat init.ldif
dn: dc=example,dc=org
objectClass: dcObject
objectClass: organization
o: Example Org
dc: example



First startup, no existing db files....

$ doas ldapd -d
May 24 13:54:54.474 [25253] startup
May 24 13:54:54.718 [68140] listening on /var/run/ldapd.sock
May 24 13:54:54.725 [68140] opening namespace dc=example,dc=org


At this point in another terminal I run:

$ cat init.ldif | ldapadd -H ldapi://%2Fvar%2Frun%2Fldapd.sock -D "cn=admin,dc=example,dc=org" -W
Enter LDAP Password:
adding new entry "dc=example,dc=org"
ldap_result: Can't contact LDAP server (-1)



And back on the first terminal I see:

assertion "p->upper >= p->lower" failed: file "/usr/src/usr.sbin/ldapd/btree.c", line 1949, function "btree_add_node"
May 24 13:55:17.142 [25253] ldapd: removing unix socket /var/run/ldapd.sock



As above, with -v arg to ldapd, the messages are:

May 24 14:08:09.938 [42637] accepted local connection by uid 1001
May 24 14:08:09.947 [42637] consumed 48 bytes
May 24 14:08:09.948 [42637] got request type 0, id 1
May 24 14:08:09.948 [42637] bind dn = cn=admin,dc=example,dc=org
May 24 14:08:09.948 [42637] successfully authenticated as cn=admin,dc=example,dc=org
May 24 14:08:09.948 [42637] sending response 1 with result 0
May 24 14:08:09.957 [42637] consumed 106 bytes
May 24 14:08:09.957 [42637] got request type 8, id 2
May 24 14:08:09.957 [42637] adding entry dc=example,dc=org
assertion "p->upper >= p->lower" failed: file "/usr/src/usr.sbin/ldapd/btree.c", line 1949, function "btree_add_node"
May 24 14:08:09.997 [28992] ldapd: removing unix socket /var/run/ldapd.sock
May 24 14:08:10.008 [28992] ldapd: exiting

No comments:

Post a Comment