rhafer(a)suse.de wrote:
> Full_Name: Ralf Haferkamp
> Version: RE23, HEAD
> Valgrind gives me the log pasted below when I abort an ldapsearch command
> (CTRL-C) that is running against a back-ldap database that uses the pcache
> overlay.
Makes sense. We need to use the cleanup handler and free the saved query info
if op->o_abandon is set. Do you want to code this up?
> ==20850== 53,092 (35,830 direct, 17,262 indirect) bytes in 883 blocks are
> definitely lost in loss record 17 of 18
> ==20850== at 0x4C22AC6: malloc (in
> /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
> ==20850== by 0x508A940: ber_memalloc_x (memory.c:226)
> ==20850== by 0x4ABEEE: slap_sl_malloc (sl_malloc.c:273)
> ==20850== by 0x4487C0: filter_dup (filter.c:801)
> ==20850== by 0x5AB151: pcache_op_search (pcache.c:2237)
> ==20850== by 0x4C3F41: overlay_op_walk (backover.c:642)
> ==20850== by 0x4C41D3: over_op_func (backover.c:704)
> ==20850== by 0x4C4269: over_op_search (backover.c:726)
> ==20850== by 0x446210: fe_op_search (search.c:369)
> ==20850== by 0x445B2E: do_search (search.c:217)
> ==20850== by 0x4427DB: connection_operation (connection.c:1145)
> ==20850== by 0x442CA6: connection_read_thread (connection.c:1271)
>
> The database configuration looks like this:
> -----------------------------
> database ldap
> suffix o=test
> uri ldap://xxxxxxxxxxxxxxxxx
> readonly on
> lastmod off
>
> overlay pcache
> proxycache bdb 100000 1 10000 180
> proxyattrset 0 givenname uid ou o cn sn mail objectclass
>
> ###
> proxytemplate (|(cn=)(mail=)(uid=)) 0 86400
>
> directory /var/lib/ldap/pcache
> cachesize 10000
> index objectclass,queryid eq
> index sn,cn,givenname,uid,mail pres,eq,sub
> -----------------------------
>
>
>
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Full_Name: Ralf Haferkamp
Version: RE23, HEAD
OS: -
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (89.166.180.39)
pcache currently cache the results of search that hit server- or clientside
size- or timelimits. That means that subsequent search will get the (incomplete)
results from the cache. I guess pcache should only cache operations that
returned LDAP_SUCCESS.
Full_Name: Ralf Haferkamp
Version: HEAD
OS:
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (89.166.180.39)
While the results of a query are being cached, slapo-pcache will answer queries
that match the same template from the cache that is currently being populated.
This means that subsequent queries will get incomplete results until the
original query is completely cached.
This doesn't happen with current RE23 code.
Full_Name: Ralf Haferkamp
Version: RE23, HEAD
OS: -
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (89.166.180.39)
Valgrind gives me the log pasted below when I abort an ldapsearch command
(CTRL-C) that is running against a back-ldap database that uses the pcache
overlay.
==20850== 53,092 (35,830 direct, 17,262 indirect) bytes in 883 blocks are
definitely lost in loss record 17 of 18
==20850== at 0x4C22AC6: malloc (in
/usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==20850== by 0x508A940: ber_memalloc_x (memory.c:226)
==20850== by 0x4ABEEE: slap_sl_malloc (sl_malloc.c:273)
==20850== by 0x4487C0: filter_dup (filter.c:801)
==20850== by 0x5AB151: pcache_op_search (pcache.c:2237)
==20850== by 0x4C3F41: overlay_op_walk (backover.c:642)
==20850== by 0x4C41D3: over_op_func (backover.c:704)
==20850== by 0x4C4269: over_op_search (backover.c:726)
==20850== by 0x446210: fe_op_search (search.c:369)
==20850== by 0x445B2E: do_search (search.c:217)
==20850== by 0x4427DB: connection_operation (connection.c:1145)
==20850== by 0x442CA6: connection_read_thread (connection.c:1271)
The database configuration looks like this:
-----------------------------
database ldap
suffix o=test
uri ldap://xxxxxxxxxxxxxxxxx
readonly on
lastmod off
overlay pcache
proxycache bdb 100000 1 10000 180
proxyattrset 0 givenname uid ou o cn sn mail objectclass
###
proxytemplate (|(cn=)(mail=)(uid=)) 0 86400
directory /var/lib/ldap/pcache
cachesize 10000
index objectclass,queryid eq
index sn,cn,givenname,uid,mail pres,eq,sub
-----------------------------
> I updated to 2.3.38 and the problem seems to have vanished.
> Thanks for the hint.
Thanks for the prompt feedback. I've closed this ITS.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati(a)sys-net.it
---------------------------------------
Hi,
Quoting Pierangelo Masarati <ando(a)sys-net.it>:
> You should be using the latest 2.3 release; there was quite a bit
> of > work on ldapi between 2.3.32 and 2.3.38 (ITS#4893 and
> other possibly related fixes). Having said this, I don't know if it
> will solve your problem, but at least it would make sure it's not
> fixed yet. No need to say that things work fine here on
> Linux/amd64.
I updated to 2.3.38 and the problem seems to have vanished.
Thanks for the hint.
Best,
Sven
----------------------------------------------------------------------
Finally - A spam blocker that actually works.
http://www.bluebottle.com/tag/4
> Old entryCSN values imported into the data from another server, can crash
> replicas.
The ITS reports that this is now fixed in HEAD. I would appreciate if you
feedback using a fresh HEAD build, since the CSN syntax is now more
thoroughly checked, although it is supposed to allow the old one in input.
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati(a)sys-net.it
---------------------------------------
Full_Name: Pierangelo Masarati
Version: all ever since
OS: irrelevant
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (81.72.89.40)
Submitted by: ando
It seems to be reserved for getopt(3) extensions. I noticed this recently, and
I couldn't find any mention of it in the mailing lists/ITS. I don't think it
worth fixing, since it's always been there. Just note it somewhere.
p.
damien.doiselet(a)neolane.com wrote:
> My application is multithread.
:)
> I've had a call to ldap_get_option(NULL, LDAP_OPT_API_INFO, &ldapi)
> before spawning threads, but here the crash occurred also in
> ldap_initailize but in ldap_ld_free().
The above sentence is not clear to me; what does the trace below refer
to? Your original application, or the one that calls ldap_get_option
before spawning threads? What does ldap_ld_free() have to do with this?
It never occurs in the trace below.
> I addition, I won't call ldap outside my thread.
Doesn't matter. Global options are global, so multiple threads may find
it uninit'ed, and try to concurrently initialize it.
> The full stack trace is :
> #0 0xb7e93473 in strlen () from /lib/tls/i686/cmov/libc.so.6
> #1 0xb3a191f9 in ber_strdup_x (s=0x6a626f28 <Address 0x6a626f28 out of
> bounds>, ctx=0x0) at memory.c:640
> #2 0xadd2fd66 in ldap_charray_dup (a=0xb313a324) at charray.c:164
> #3 0xadd26883 in ldap_url_dup (ludp=0x8b83798) at url.c:1191
> #4 0xadd26912 in ldap_url_duplist (ludlist=0x8b83798) at url.c:1217
> #5 0xadd11b34 in ldap_create (ldp=0xb32e0dc8) at open.c:149
> #6 0xadd11de1 in ldap_initialize (ldp=0xb32e0ec0, url=0x8946d20
> "ldap://ldap:389") at open.c:225
Please make sure you're calling the desired library objects (libldap &
liblber). Can you post the result of ldd for your application?
> I have same thing with the 2.3.38
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati(a)sys-net.it
---------------------------------------