Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] net-nds/openldap-2.4.35-r1 segfaults on adding
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
maiku
Guru
Guru


Joined: 24 Mar 2004
Posts: 581
Location: Escaping from NY

PostPosted: Tue Dec 10, 2013 5:20 pm    Post subject: [solved] net-nds/openldap-2.4.35-r1 segfaults on adding Reply with quote

When running "slapadd -l ldapdump.1386450661" I get the following:
Quote:
52a74c79 bdb_db_open: database "dc=directory,dc=server": unclean shutdown detected; attempting recovery.
52a74c79 bdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/openldap-data: (2).
Expect poor performance for suffix "dc=directory,dc=server".
Segmentation fault
dmesg says:
Quote:
[ 960.778149] slapadd[13769]: segfault at 7f80d91742e7 ip 00007f7fd86af6ce sp 00007fff8631ac60 error 6 in libdb-4.8.so[7f7fd8553000+197000]
I tried downgrading openldap, as well as running "emerge -ve openldap" to fix the issue but no dice. Having a DB_CONFIG file in the directory makes no difference.

My use flags are:
Quote:
[ebuild R ] net-nds/openldap-2.4.35-r1 USE="berkdb crypt icu odbc perl samba slp ssl syslog tcpd -cxx -debug -experimental -gnutls -iodbc -ipv6 -kerberos -minimal -overlays -sasl (-selinux) -smbkrb5passwd" 0 kB


I'm able to use the same command and file on another machine with the same version of openldap and it works. I can bring the DB over to this machine and get it to read, but openldap crashes when I try to add. Permissions on the directory are:
Quote:
-rw------- 1 root root 845 Dec 10 10:53 DB_CONFIG.example
-rw------- 1 ldap ldap 24576 Dec 10 10:55 __db.001
-rw------- 1 ldap ldap 81920 Dec 10 10:55 __db.002
-rw------- 1 ldap ldap 270336 Dec 10 10:55 __db.003
-rw------- 1 ldap ldap 163840 Dec 10 10:55 __db.004
-rw------- 1 ldap ldap 802816 Dec 10 10:55 __db.005
-rw------- 1 ldap ldap 32768 Dec 10 10:55 __db.006
-rw-r--r-- 1 ldap ldap 4096 Dec 10 10:55 alock
-rw------- 1 ldap ldap 20480 Dec 8 15:25 dn2id.bdb
-rw------- 1 ldap ldap 81920 Dec 8 15:25 id2entry.bdb
-rw------- 1 ldap ldap 10485760 Dec 10 10:55 log.0000000001
-rw------- 1 ldap ldap 8192 Dec 8 15:25 objectClass.bdb
This is an upgrade from an older install. What's my next step?
_________________
Michael


Last edited by maiku on Wed Dec 11, 2013 4:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
maiku
Guru
Guru


Joined: 24 Mar 2004
Posts: 581
Location: Escaping from NY

PostPosted: Wed Dec 11, 2013 4:39 pm    Post subject: Reply with quote

I could not believe that this fixed it, but I fixed this issue by changing my CFLAGS. I use crazy CFLAGS:
Quote:
CFLAGS="-march=native -O3 -pipe -funroll-loops -fomit-frame-pointer -fforce-addr -fprefetch-loop-arrays"
So instead of using crazy CFLAGS I re-emerged db and openldap with the following:
Code:
CFLAGS="-march=native -O2 -pipe" emerge -v1 db openldap
And now slapadd and adding to the DB works flawlessly without crashing.
_________________
Michael
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum