[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4010) out of memory when slapcat over 16m entries

lihaitao@kingsoft.com wrote:

>Full_Name: Hite Lee
>Version: 2.2.28
>OS: Redhat Linux AS3
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (
>There are about 27m entries in our Openldap. I want to use slapcat to output
>them all. But when output 16,893,596 entries, slapcat crash because of malloc
>failure. The error output list below:
># id=0101c698
># id=0101c699
># id=0101c69a
># id=0101c69b
># id=0101c69c
>slapcat: ch_malloc.c:62: ch_malloc: Assertion `0' failed.
Can you reproduce this issue with the latest 2.3 code?  It is more 
likely that these types of issues are investigated if they occur in 2.3; 
if a common solution is found, it will be backported to 2.2.  2.2 only 
problems will inevitably get less attention.

>I try to change the slapcat.c:115 as bwlow to avoid using cursor, but nothing
>before changed:
>for ( id = be->be_entry_first( be )
>		id != NOID;
>		id = be->be_entry_next( be ) )
>after changed:
>for ( id = be->be_entry_first( be )
>		id != NOID;
>		id++ )
I don't see the point in making this change.  This way you guarantee 
that slapcat will try to lookup no longer existing or past last entries.

>There is a memory leak somewhere, I think. But I cannot catch it. Thanks to any
>advice or help.

    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497