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

Re: "slapadd: corrupted double-linked list"



Marc Patermann wrote:
Hi,

Marc Patermann schrieb am 09.12.2010 11:40 Uhr:
Howard Chu schrieb am 08.12.2010 18:55 Uhr:
Marc Patermann wrote:
Marc Patermann schrieb am 06.12.2010 16:40 Uhr:

what could the following possibly be?

This looks like something valgrind ought to be able to diagnose.
OK, I installed valgrind.

Do I just start
# valgrind slapadd -q -v -c -l init.ldif
or do I have to provide any options to get any helpfull output?

Here is what I get:

That's on the right track, but your slapd binary has no debug symbols so there's not enough information here (like source line numbers for each offending event.) It looks like only the last event is of interest, write 8 bytes past block of 80 bytes.

# valgrind slapadd -q -c -v -l init.ldif
==24941== Memcheck, a memory error detector
==24941== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==24941== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==24941== Command: slapadd -q -c -v -l init.ldif

==24941== Invalid read of size 8
==24941==    at 0x2044C9: bdb_index_recrun (in /usr/lib/openldap/slapd)
==24941==    by 0x1D40ED: ??? (in /usr/lib/openldap/slapd)
==24941==    by 0x1D49A1: bdb_tool_entry_put (in /usr/lib/openldap/slapd)
==24941==    by 0x1B9197: ??? (in /usr/lib/openldap/slapd)
==24941==    by 0x1BF983: slapadd (in /usr/lib/openldap/slapd)
==24941==    by 0x132223: main (in /usr/lib/openldap/slapd)
==24941==  Address 0x1f3ad260 is 0 bytes after a block of size 80 alloc'd
==24941==    at 0x4C261C3: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24941==    by 0x50826B4: ber_memalloc_x (in
/usr/lib64/liblber-2.4.so.2.5.6)
==24941==    by 0x16AD7A: ch_malloc (in /usr/lib/openldap/slapd)
==24941==    by 0x1D5D7F: bdb_tool_entry_open (in /usr/lib/openldap/slapd)
==24941==    by 0x1BADB7: ??? (in /usr/lib/openldap/slapd)
==24941==    by 0x1BF930: slapadd (in /usr/lib/openldap/slapd)
==24941==    by 0x132223: main (in /usr/lib/openldap/slapd)
==24941==
==24941== Invalid write of size 8
==24941==    at 0x2044D6: bdb_index_recrun (in /usr/lib/openldap/slapd)
==24941==    by 0x1D40ED: ??? (in /usr/lib/openldap/slapd)
==24941==    by 0x1D49A1: bdb_tool_entry_put (in /usr/lib/openldap/slapd)
==24941==    by 0x1B9197: ??? (in /usr/lib/openldap/slapd)
==24941==    by 0x1BF983: slapadd (in /usr/lib/openldap/slapd)
==24941==    by 0x132223: main (in /usr/lib/openldap/slapd)
==24941==  Address 0x1f3ad268 is 8 bytes after a block of size 80 alloc'd
==24941==    at 0x4C261C3: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24941==    by 0x50826B4: ber_memalloc_x (in
/usr/lib64/liblber-2.4.so.2.5.6)
==24941==    by 0x16AD7A: ch_malloc (in /usr/lib/openldap/slapd)
==24941==    by 0x1D5D7F: bdb_tool_entry_open (in /usr/lib/openldap/slapd)
==24941==    by 0x1BADB7: ??? (in /usr/lib/openldap/slapd)
==24941==    by 0x1BF930: slapadd (in /usr/lib/openldap/slapd)
==24941==    by 0x132223: main (in /usr/lib/openldap/slapd)
==24941==
added: "ou=humans,ou=foo" (00000001)
added: "ou=gruppen,ou=humans,ou=foo" (00000002)
added: "ou=system,ou=foo" (00000001)
_#################### 100.00% eta   none elapsed            none fast!
Closing DB...
==24941== Warning: set address range perms: large range [0xafb2000,
0x1efb4000) (noaccess)

valgrind: m_mallocfree.c:225 (mk_plain_bszB): Assertion 'bszB != 0' failed.
valgrind: This is probably caused by your program erroneously writing
past the
end of a heap block and corrupting heap metadata.  If you fix any
invalid writes reported by Memcheck, this assertion failure will
probably go away.  Please try that before reporting this as a bug.


--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/