Re: (ITS#7713) Segmentation fault if the pagesize of the Operating system is not equal to 4096.
by h.b.furuseth@usit.uio.no
On 09/07/14 01:41, hyc(a)symas.com wrote:
> The fix is now available in mdb.master; currently you must compile with
> -DMDB_DEVEL to enable it. Since this is an incompatible DB format change, you
> should backup any existing DBs before using this option.
Well, there is a fix in LDMB 0.9.10: It uses pages <= 32k, doing
less efficient write operations if that's less than the OS page size.
--
Hallvard
9 years, 4 months
Re: (ITS#7893) memberof: bad a_numvals count
by hyc@symas.com
jsoula(a)univ-lille2.fr wrote:
> Full_Name: julien soula
> Version: 2.4.39
> OS:
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (194.254.117.28)
>
>
> Hi,
>
> this is related to ITS#6508. I don't think that the supplied patch is enough to
> fix the bug.
>
> When the last "member" entry is dangling then "( j - i == 1 )" is true and the
> loop is broken without reducing a_numvals.
Looks like you're right. Committed to master, thanks.
>
> So I propose this patch :
>
> --- servers/slapd/overlays/memberof.c.orig 2014-07-09 21:17:14.487296363
> +0200
> +++ servers/slapd/overlays/memberof.c 2014-07-09 21:31:44.071565223 +0200
> @@ -596,6 +596,7 @@
> ber_memfree( a->a_nvals[ i
> ].bv_val );
> BER_BVZERO( &a->a_nvals[ i ] );
> }
> + a->a_numvals--;
> if ( j - i == 1 ) {
> break;
> }
> @@ -607,7 +608,6 @@
> sizeof( struct berval )
> * ( j - i ) );
> }
> i--;
> - a->a_numvals--;
> }
> }
>
>
>
> Best regards,
> Julien
>
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
9 years, 4 months
(ITS#7893) memberof: bad a_numvals count
by jsoula@univ-lille2.fr
Full_Name: julien soula
Version: 2.4.39
OS:
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (194.254.117.28)
Hi,
this is related to ITS#6508. I don't think that the supplied patch is enough to
fix the bug.
When the last "member" entry is dangling then "( j - i == 1 )" is true and the
loop is broken without reducing a_numvals.
So I propose this patch :
--- servers/slapd/overlays/memberof.c.orig 2014-07-09 21:17:14.487296363
+0200
+++ servers/slapd/overlays/memberof.c 2014-07-09 21:31:44.071565223 +0200
@@ -596,6 +596,7 @@
ber_memfree( a->a_nvals[ i
].bv_val );
BER_BVZERO( &a->a_nvals[ i ] );
}
+ a->a_numvals--;
if ( j - i == 1 ) {
break;
}
@@ -607,7 +608,6 @@
sizeof( struct berval )
* ( j - i ) );
}
i--;
- a->a_numvals--;
}
}
Best regards,
Julien
9 years, 4 months
Re: (ITS#7351) can not start slapd when enable accesslog relay
by hyc@symas.com
bashift(a)gmail.com wrote:
> Full_Name: ChenShuJun
> Version: 2.4.32
> OS: RHEL5.5(2.6.18-194.el5)
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (218.246.127.3)
>
Due to lack of cooperation from Oracle, back-ndb is no longer supported.
Some info here
http://www.openldap.org/lists/openldap-technical/201203/msg00216.html
http://www.openldap.org/lists/openldap-devel/201307/msg00018.html
This ITS will be closed.
>
> #######################################################################
> # BDB database definitions
> #######################################################################
>
> database ndb
> suffix "dc=bgctv,dc=net,dc=cn"
> rootdn "cn=admin,dc=bgctv,dc=net,dc=cn"
> rootpw ghwl
> directory /usr/local/openldap/var/openldap-data
> dbconnect 172.30.5.20:1186
> dbhost 172.30.5.20
> dbname bgctv
> dbuser bgctv
> dbpass ghwl_h0
> dbconnections 1
> overlay accesslog
> logdb "cn=auditlog"
> logops writes
> logold (objectclass=*)
>
> #dbconnect 172.30.5.20:1186
> #dbhost 172.30.5.20
> #dbname auditlog
> #dbuser bgctv
> #dbpass ghwl_h0
> #dbconnections 1
>
> access to attrs=userPassword,shadowLastChange
> by anonymous auth
> by self write
> by * none
> access to dn.sub="ou=cm,dc=bgctv,dc=net,dc=cn"
> by dn="userid=cmadmin,dc=bgctv,dc=net,dc=cn" write
> by anonymous auth
> by * none
> access to *
> by dn="userid=cmadmin,dc=bgctv,dc=net,dc=cn" read
> by * none
>
> database bdb
> suffix "cn=auditlog"
> index reqStart eq
>
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
9 years, 4 months
Re: (ITS#7825) LMDB: misleading error message
by hyc@symas.com
h.b.furuseth(a)usit.uio.no wrote:
> 5) Add field MDB_dbx.md_dbiseq = DBI usage sequence number,
> incremented when dbi_open creates (not reuses) a DBI and in
> dbi_close. Copy it to a new malloced array txn->mt_dbiseqs[]
> in write txns, verify it in at least commit and drop.
> This means close()-open(same DB) will also be caught, which
> seems a good thing since with (4) it will work unreliably:
> Only if open() reuses the same DBI for the same DB.
This is now fixed in mdb.master, using basically this approach. There is a
master array of DBI sequence numbers in the environment and another array in
each write transaction. It is verified anywhere the dbx->md_name would get
used. The sequence number is incremented in dbi_open and when a handle is closed.
Note - it is only checked in write txns, and only a few places (drop, commit,
cursor_touch, page_search) ever check. There is a new error code MDB_BAD_DBI
as well.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
9 years, 4 months
Re: (ITS#7789) Unreliable mdb_env_set_mapsize()
by hyc@symas.com
Hallvard Breien Furuseth wrote:
> Should have enclosed a test program. Here:
> http://folk.uio.no/hbf/testsize.c
> Output:
> process #0: open env
> process #1: open env
> process #0: write txn, mapsize 204800
> process #1: write txn, mapsize 40960
> process #2: open env, write txn, mapsize 40960
> process #3: open env, write txn, mapsize 204800
>
>
> Summarizing a reply which got sent privately instead of to ITS:
>
> On 2014-01-24 00:07, Howard Chu wrote:
>> The doc says the caller of set_mapsize is required to make sure there
>> are no active transactions when it is called. As such, X failed this
>> requirement, and this sequence of events is explicitly unsupported.
>
> No, I'm talking about X changing the mapsize when there is no txn,
> then afterwards doing a write txn so the mapsize gets written.
>
>> If Y doesn't start its write txn until after X finishes, then Y will
>> see the new size.
>
> It doesn't, that's the point. Only txn_commit pays attention,
> and it checks the size which existed in the wrong metapage.
>
> Come to think of it, set_mapsize(); env_open(); txn begin/end
> should do the same. Y will either way not pay attention to
> the new mapsize.
>
Fixed now in mdb.master
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
9 years, 4 months
Re: (ITS#7713) Segmentation fault if the pagesize of the Operating system is not equal to 4096.
by hyc@symas.com
hyc(a)symas.com wrote:
> sumanth wrote:
>> As per ur suggestions,tried changing
>>
>> 1. MDB_PAGESIZE to 65536
>> 2. changing pb_lower and pb_upper to uint32_t.
>> As of now it is running fine for the existing testcases in openldap-2.4.36.
>> However there were problems in 2.4.35. Also saw the comments in
>> openldap-devel. So whether this will make to openldap 2.4.36?
>
> The current plan is to fix this in OpenLDAP 2.5, and we are now halting new
> development in 2.4.
>
The fix is now available in mdb.master; currently you must compile with
-DMDB_DEVEL to enable it. Since this is an incompatible DB format change, you
should backup any existing DBs before using this option.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
9 years, 4 months
(ITS#7892) LMDB OS X build issue: ESECT section attribute
by batterseapower@hotmail.com
Full_Name: Max Bolingbroke
Version: HEAD
OS: OS X
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (81.111.197.81)
Basically this line of mdb.c doesn't work on OS X:
#define ESECT __attribute__ ((section("text_env")))
You just get an error: "argument to 'section' attribute is not valid for this
target: mach-o section specifier requires a segment and section separated by a
comma"
I think you need to use this instead on this platform:
#define ESECT __attribute__ ((section("__TEXT,text_env")))
9 years, 5 months
(ITS#7891) checking for SQLDriverConnect in -lodbc
by vbvbrj@gmail.com
Full_Name: Mimiko
Version: 2.4.39
OS: Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u2 x86_64 GNU/Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (77.89.245.38)
Can not compile OpenLDAP statically. I get this error:
configure:21678: checking for SQLDriverConnect in -lodbc
configure:21703: cc -o conftest -fPIC -static-libgcc -static -fPIC
-I/opt/openssl/include -I/opt/krb5/include -I/opt/zlib/include
-Wl,-R,ORIGIN/../lib/../lib/../lib/../lib../lib:ORIGIN/../lib/x86_64-linux-gnu
-L/opt/openssl/lib -L/opt/krb5/lib -L/opt/zlib/lib conftest.c -lodbc -pthread
>&5
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(_odbcinst_UserINI.o):
In function `_odbcinst_UserINI':
(.text+0x3b): warning: Using 'getpwuid' in statically linked applications
requires at runtime the shared libraries from the glibc version used for
linking
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(SQLCreateDataSource.o):
In function `SQLCreateDataSource':
(.text+0x301): undefined reference to `lt_dlinit'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(SQLCreateDataSource.o):
In function `SQLCreateDataSource':
(.text+0x315): undefined reference to `lt_dlsetsearchpath'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(SQLCreateDataSource.o):
In function `SQLCreateDataSource':
(.text+0x33d): undefined reference to `lt_dlopen'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(SQLCreateDataSource.o):
In function `SQLCreateDataSource':
(.text+0x355): undefined reference to `lt_dlsym'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libodbc.a(SQLCreateDataSource.o):
In function `SQLCreateDataSource':
(.text+0x3ee): undefined reference to `lt_dlopen'
....
collect2: error: ld returned 1 exit status
configure:21703: $? = 1
To resolve this I must supply LIBS='-lltdl -ldl', but ./configure script does
not pass this correctly, as this LIBS must be after -lodbc. In configure line
21684 is the line:
LIBS="-lodbc $LIBS"
It seems that LIBS which I pass to ./configure script does not get there. So I
modify ./configure like this:
LIBS="-lodbc -lltdl -ldl $LIBS"
Please update ./configure script in git to overcome this error without manually
modifying script.
9 years, 5 months