Is it a requirement for the id2entry.bdb file to exist prior to any slap* tools successfully running or would this be a bug?
OpenLDAP 2.4.7 Berkley-DB 4.6 CentOS 5
I get a Segmentation Fault every time I run slaptest or slapindex if I have not yet started slapd (to prompt initial creation of id2entry.bdb in my data directory).
Example:
# /etc/init.d/ldap stop # rm -rf /var/lib/openldap-data/* # rm -rf /etc/openldap/slapd.d && mkdir /etc/openldap/slapd.d
...(modify slapd.conf)...
# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
Seg Faults every time. I even get a seg fault if I simply run the following:
# slaptest -f /etc/openldap/slapd.conf
(Possibly useless gdb output http://ditree.com/work/gdb.ol2.4.7.out )
TIA,
--On Thursday, January 10, 2008 12:51 PM -0800 Josh Miller joshua@itsecureadmin.com wrote:
Is it a requirement for the id2entry.bdb file to exist prior to any slap* tools successfully running or would this be a bug?
OpenLDAP 2.4.7 Berkley-DB 4.6 CentOS 5
I get a Segmentation Fault every time I run slaptest or slapindex if I have not yet started slapd (to prompt initial creation of id2entry.bdb in my data directory).
How can you slapindex a database if it doesn't exist yet?
The slaptest segfault does seem like a bug to me.
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
Quanah Gibson-Mount wrote:
--On Thursday, January 10, 2008 12:51 PM -0800 Josh Miller
I get a Segmentation Fault every time I run slaptest or slapindex if I have not yet started slapd (to prompt initial creation of id2entry.bdb in my data directory).
How can you slapindex a database if it doesn't exist yet?
The slaptest segfault does seem like a bug to me.
It relates to my silly propensity to run slapindex to generate a new cn=config in the spirit of completeness :)
I will file an ITS.
Thanks,
I'd say that slaptest should be able to test the configuration prior to putting data in the directory.
If you can find a config that seg faults with a simple one line like
# slaptest -f /etc/openldap/slapd.conf
you should post it to the ITS -- even if it's a bogus config, it should exit gracefully.
Now, in situations where it makes no sense, then it might be considered a requirement to exist...but there still should be a graceful exit, not a seg fault.
On Thu, 10 Jan 2008, Josh Miller wrote:
Is it a requirement for the id2entry.bdb file to exist prior to any slap* tools successfully running or would this be a bug?
OpenLDAP 2.4.7 Berkley-DB 4.6 CentOS 5
I get a Segmentation Fault every time I run slaptest or slapindex if I have not yet started slapd (to prompt initial creation of id2entry.bdb in my data directory).
Example:
# /etc/init.d/ldap stop # rm -rf /var/lib/openldap-data/* # rm -rf /etc/openldap/slapd.d && mkdir /etc/openldap/slapd.d
...(modify slapd.conf)...
# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
Seg Faults every time. I even get a seg fault if I simply run the following:
# slaptest -f /etc/openldap/slapd.conf
(Possibly useless gdb output http://ditree.com/work/gdb.ol2.4.7.out )
TIA,
Joshua M. Miller - RHCE,VCP
Josh Miller skrev, on 10-01-2008 21:51:
Is it a requirement for the id2entry.bdb file to exist prior to any slap* tools successfully running or would this be a bug?
You take pride in citing RHCE in your sig, so therefore this response is longer than I'd normally aim at.
It is not normal, neither is it any bug in OL.
OpenLDAP 2.4.7
Where did this come from? CentOS5 is supplied with 2.3.27.
Berkley-DB 4.6
Where did this come from? CentOS5 is supplied with 4.3.29.
I dislike to the point of suicide installing any software on my machines that are not rpm-based. This after more than 10 years of SYSV Unix/Red Hat Linux experience, packages and source installs. So I often have to write my own rpm specs.
CentOS 5
I get a Segmentation Fault every time I run slaptest or slapindex if I have not yet started slapd (to prompt initial creation of id2entry.bdb in my data directory).
You can't mix up bdb versions on the same machine, unless the versions are discrete; i.e. so separated from each other that they can never interact. This includes builds using, for example, the db.h header.
You are using CentOS5, ok, I'll give 2 examples:
1: I have to support RHEL5 (exactly the same as CentOS5) and experience (RHEL3 and 4) has taught me that Red Hat delivers useless OpenLDAP servers. Moreover, the bdb (db4 and db4-devel) version supplied with RHEL5 (db4 4.3.29, which are necessary for countless RHEL5 utilities) is directly disavowed by the OL developers for 2.3.x and will cause an outright rejection on any attempted OL 2.4.x build. On my RHEL5 systems I wanted to build on my 4 years of OL experience and continue to use latest stable OL and not be subject to Red Hat whims. Because I'm a Red Hat person (warts, blemishes and all, but also multiple good points) I stick to Red Hat Linux as basic OS. Including Fedora.
2: On my FC6 test machine, at the moment I run OL 2.4.7.
On both platforms I insist on rpms, right? I use Buchan Milne's OL srpms, available at http://staff.telkomsa.net/packages/. The srpms get rebuilt on my systems; it's often only necessary to substitute latest source in the rpm spec; sometimes more work is necessary.
Buchan delivers discrete db4 stuff (as well as OL stuff) that can never conflict with Red Hat's. Obviously it's in many ways a compromise, but this approach does mean that it can exist together with Red Hat's on the same machine.
Lastly, you want to use db4 4.6, right? I'd forget about this for the time being if I were you. Getting OL 2.4.x working correctly is far more important than subjectively choosing a db4 version. Patched 4.2.52 works fine for now, I'm sure Buchan will get around to incorporating 4.6 as soon as possible.
Example:
# /etc/init.d/ldap stop # rm -rf /var/lib/openldap-data/* # rm -rf /etc/openldap/slapd.d && mkdir /etc/openldap/slapd.d
...(modify slapd.conf)...
# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
Seg Faults every time. I even get a seg fault if I simply run the following:
# slaptest -f /etc/openldap/slapd.conf
No problem with the above approach.
(Possibly useless gdb output http://ditree.com/work/gdb.ol2.4.7.out )
Well, there you go.
Best,
--Tonni
To make a long story short, this was a bug, and it only occurred when using BerkeleyDB 4.6. Fixed now in CVS.
Tony Earnshaw wrote:
Lastly, you want to use db4 4.6, right? I'd forget about this for the time being if I were you. Getting OL 2.4.x working correctly is far more important than subjectively choosing a db4 version. Patched 4.2.52 works fine for now, I'm sure Buchan will get around to incorporating 4.6 as soon as possible.
Example:
# /etc/init.d/ldap stop # rm -rf /var/lib/openldap-data/* # rm -rf /etc/openldap/slapd.d && mkdir /etc/openldap/slapd.d
...(modify slapd.conf)...
# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
Seg Faults every time. I even get a seg fault if I simply run the following:
# slaptest -f /etc/openldap/slapd.conf
No problem with the above approach.
(Possibly useless gdb output http://ditree.com/work/gdb.ol2.4.7.out )
Well, there you go.
On Friday 11 January 2008 01:39:45 Tony Earnshaw wrote:
On both platforms I insist on rpms, right? I use Buchan Milne's OL srpms, available at http://staff.telkomsa.net/packages/. The srpms get rebuilt on my systems; it's often only necessary to substitute latest source in the rpm spec; sometimes more work is necessary.
Buchan delivers discrete db4 stuff (as well as OL stuff) that can never conflict with Red Hat's. Obviously it's in many ways a compromise, but this approach does mean that it can exist together with Red Hat's on the same machine.
Lastly, you want to use db4 4.6, right? I'd forget about this for the time being if I were you. Getting OL 2.4.x working correctly is far more important than subjectively choosing a db4 version. Patched 4.2.52 works fine for now, I'm sure Buchan will get around to incorporating 4.6 as soon as possible.
My 2.4.7 packages now ship db-4.6. I will thus incorporate Howard's fix from CVS in my packages shortly.
Buchan Milne skrev, on 11-01-2008 11:12:
[...]
My 2.4.7 packages now ship db-4.6. I will thus incorporate Howard's fix from CVS in my packages shortly.
I don't see any OL 2.4 src rpms there, I need an srpm for building on my FC test machine. Nor does openldap2.4-2.4.7-1mdv2008.1.src.rpm on the Mandriva mirrors.telkomsa.net site include db4.6.
Thanks :)
--Tonni
On Friday 11 January 2008 13:45:43 Tony Earnshaw wrote:
Buchan Milne skrev, on 11-01-2008 11:12:
[...]
My 2.4.7 packages now ship db-4.6. I will thus incorporate Howard's fix from CVS in my packages shortly.
I don't see any OL 2.4 src rpms there,
Oops, I missed that when uploading ...
I need an srpm for building on my FC test machine. Nor does openldap2.4-2.4.7-1mdv2008.1.src.rpm on the Mandriva mirrors.telkomsa.net site include db4.6.
Right, but there is openldap-2.4.7-4mdv2008.1.src.rpm, however I forgot to make the change to include the db source even when not building the internal copy (which isn't the case in cooker, which now has db-4.6 as default db4).
$ rpm -qRp pub/linux/mandriva/devel/cooker/SRPMS/main/release/openldap-2.4.7-4mdv2008.1.src.rpm | grep db db4-devel = 4.6.21
Regards, Buchan
Buchan Milne skrev, on 11-01-2008 14:48:
[...]
Right, but there is openldap-2.4.7-4mdv2008.1.src.rpm, however I forgot to make the change to include the db source even when not building the internal copy (which isn't the case in cooker, which now has db-4.6 as default db4).
$ rpm -qRp pub/linux/mandriva/devel/cooker/SRPMS/main/release/openldap-2.4.7-4mdv2008.1.src.rpm | grep db db4-devel = 4.6.21
Dunno what mirror you're on, but the ftp.nluug.nl (pretty well the foremost Dutch - local - trans-Unix mirror) at:
ftp://ftp.nluug.nl/pub/os/Linux/distr/Mandrakelinux/devel/cooker/SRPMS/main/release/openldap-2.4.7-4mdv2008.1.src.rpm
4379 KB 21-12-2007 02:40:00
still has db4.2.52.
And the staff.telkomsa.net dir still hasn't been updated.
Best,
--Tonni
openldap-software@openldap.org