Am Fri, 10 Dec 2010 09:46:06 +0100 schrieb Marc Patermann hans.moser@ofd-z.niedersachsen.de:
Howard,
Howard Chu schrieb am 09.12.2010 18:21 Uhr:
Marc Patermann wrote:
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.
There is an extra RPM called openldap2-debuginfo-2.4.23-124.1.x86_64.rpm Would it help to install this?
# rpm -qlp openldap2-debuginfo-2.4.23-124.1.x86_64.rpm
[...]
I can reproduce this error on SLES-11 and SLES-11SP1. An excerpt of valgrind log:
==9411== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==9411== Command: /usr/sbin/slapadd -f /etc/openldap/slapd.conf-ofd -l Projekte/ofd-ns/init.ldif -q -c ==9411== Parent PID: 9279 ==9411== --9411-- --9411-- Valgrind options: --9411-- --leak-check=full --9411-- --track-origins=yes --9411-- --log-file=/tmp/openldap-ofd.%p --9411-- -v [...] --9411-- REDIR: 0x668fa00 (rindex) redirected to 0x4c26f60 (rindex) --9411-- REDIR: 0x668f690 (strlen) redirected to 0x4c27330 (strlen) --9411-- REDIR: 0x6690cf0 (memmove) redirected to 0x4c28290 (memmove) --9411-- REDIR: 0x668bbe0 (calloc) redirected to 0x4c255dc (calloc) --9411-- REDIR: 0x668af60 (free) redirected to 0x4c25ef4 (free) --9411-- REDIR: 0x668e8f0 (strcmp) redirected to 0x4c27620 (strcmp) --9411-- REDIR: 0x668e870 (index) redirected to 0x4c27000 (index) --9411-- REDIR: 0x668aa30 (malloc) redirected to 0x4c26bb8 (malloc) --9411-- REDIR: 0x6690eb0 (memset) redirected to 0x4c28220 (memset) --9411-- REDIR: 0x6692810 (memcpy) redirected to 0x4c27780 (memcpy) --9411-- REDIR: 0x6694f00 (strchrnul) redirected to 0x4c28390 (strchrnul) --9411-- REDIR: 0x668ec50 (strcpy) redirected to 0x4c27390 (strcpy) --9411-- REDIR: 0x668e6b0 (strcat) redirected to 0x4c27140 (strcat) --9411-- REDIR: 0x668f940 (strncpy) redirected to 0x4c27460 (strncpy) --9411-- REDIR: 0x668b040 (realloc) redirected to 0x4c26c69 (realloc) --9411-- REDIR: 0x6690880 (memchr) redirected to 0x4c27740 (memchr) --9411-- REDIR: 0x668f6e0 (strnlen) redirected to 0x4c27300 (strnlen) --9411-- REDIR: 0x66f6ca0 (__strcpy_chk) redirected to 0x4c283e0 (__strcpy_chk) --9411-- REDIR: 0x6692800 (__memcpy_chk) redirected to 0x4c28660 (__memcpy_chk) [...] --9411-- REDIR: 0xffffffffff600000 (???) redirected to 0x3803fa33 (vgPlain_amd64_linux_REDIR_FOR_vgettimeofday) ==9411== Warning: set address range perms: large range [0xa99a000, 0x1e99c000) (defined) ==9411== Invalid write of size 1 ==9411== at 0x4C28259: memset (mc_replace_strmem.c:586) ==9411== by 0x1DE52A: bdb_tool_index_add (string3.h:86) ==9411== by 0x1DFB11: hdb_tool_entry_put (tools.c:653) ==9411== by 0x1B755B: glue_tool_entry_put (backglue.c:1176) ==9411== by 0x1BE20B: slapadd (slapadd.c:406) ==9411== by 0x131F44: main (main.c:661) ==9411== Address 0x75c7dc0 is 0 bytes after a block of size 80 alloc'd ==9411== at 0x4C26C3A: malloc (vg_replace_malloc.c:195) ==9411== by 0x508447B: ber_memalloc_x (memory.c:226) ==9411== by 0x169CFA: ch_malloc (ch_malloc.c:54) ==9411== by 0x1DF1D2: hdb_tool_entry_open (tools.c:139) ==9411== by 0x1B8FC1: glue_tool_entry_open (backglue.c:757) ==9411== by 0x1BD978: slapadd (slapadd.c:114) ==9411== by 0x131F44: main (main.c:661) ==9411== ==9411== Invalid write of size 1 ==9411== at 0x4C2823C: memset (mc_replace_strmem.c:586) ==9411== by 0x1DE52A: bdb_tool_index_add (string3.h:86) ==9411== by 0x1DFB11: hdb_tool_entry_put (tools.c:653) ==9411== by 0x1B755B: glue_tool_entry_put (backglue.c:1176) ==9411== by 0x1BE20B: slapadd (slapadd.c:406) ==9411== by 0x131F44: main (main.c:661) ==9411== Address 0x75c7dc1 is 1 bytes after a block of size 80 alloc'd ==9411== at 0x4C26C3A: malloc (vg_replace_malloc.c:195) ==9411== by 0x508447B: ber_memalloc_x (memory.c:226) ==9411== by 0x169CFA: ch_malloc (ch_malloc.c:54) ==9411== by 0x1DF1D2: hdb_tool_entry_open (tools.c:139) ==9411== by 0x1B8FC1: glue_tool_entry_open (backglue.c:757) ==9411== by 0x1BD978: slapadd (slapadd.c:114) ==9411== by 0x131F44: main (main.c:661) ==9411== ==9411== Invalid write of size 1 ==9411== at 0x4C28244: memset (mc_replace_strmem.c:586) ==9411== by 0x1DE52A: bdb_tool_index_add (string3.h:86) ==9411== by 0x1DFB11: hdb_tool_entry_put (tools.c:653) ==9411== by 0x1B755B: glue_tool_entry_put (backglue.c:1176) ==9411== by 0x1BE20B: slapadd (slapadd.c:406) ==9411== by 0x131F44: main (main.c:661) ==9411== Address 0x75c7dc2 is 2 bytes after a block of size 80 alloc'd ==9411== at 0x4C26C3A: malloc (vg_replace_malloc.c:195) ==9411== by 0x508447B: ber_memalloc_x (memory.c:226) ==9411== by 0x169CFA: ch_malloc (ch_malloc.c:54) ==9411== by 0x1DF1D2: hdb_tool_entry_open (tools.c:139) ==9411== by 0x1B8FC1: glue_tool_entry_open (backglue.c:757) ==9411== by 0x1BD978: slapadd (slapadd.c:114) ==9411== by 0x131F44: main (main.c:661) ==9411== ==9411== Invalid write of size 1 ==9411== at 0x4C28249: memset (mc_replace_strmem.c:586) ==9411== by 0x1DE52A: bdb_tool_index_add (string3.h:86) ==9411== by 0x1DFB11: hdb_tool_entry_put (tools.c:653) ==9411== by 0x1B755B: glue_tool_entry_put (backglue.c:1176) ==9411== by 0x1BE20B: slapadd (slapadd.c:406) ==9411== by 0x131F44: main (main.c:661) ==9411== Address 0x75c7dc3 is 3 bytes after a block of size 80 alloc'd ==9411== at 0x4C26C3A: malloc (vg_replace_malloc.c:195) ==9411== by 0x508447B: ber_memalloc_x (memory.c:226) ==9411== by 0x169CFA: ch_malloc (ch_malloc.c:54) ==9411== by 0x1DF1D2: hdb_tool_entry_open (tools.c:139) ==9411== by 0x1B8FC1: glue_tool_entry_open (backglue.c:757) ==9411== by 0x1BD978: slapadd (slapadd.c:114) ==9411== by 0x131F44: main (main.c:661) [...]
==9411== Invalid read of size 4 ==9411== at 0x55360DE: __db_c_destroy (db_cam.c:163) ==9411== by 0x552F640: __db_refresh (db.c:800) ==9411== by 0x552FCD0: __db_close (db.c:682) ==9411== by 0x553EC0C: __db_close_pp (db_iface.c:256) ==9411== by 0x1D3FF4: hdb_db_close (init.c:625) ==9411== by 0x1B9C33: over_db_close (backover.c:182) ==9411== by 0x15B2DE: backend_shutdown (backend.c:361) ==9411== by 0x1C00F9: slap_tool_destroy (slapcommon.c:862) ==9411== by 0x1BD714: slapadd (slapadd.c:570) ==9411== by 0x131F44: main (main.c:661) ==9411== Address 0x40 is not stack'd, malloc'd or (recently) free'd ==9411== ==9411== ==9411== Process terminating with default action of signal 11 (SIGSEGV) ==9411== Access not within mapped region at address 0x40 ==9411== at 0x55360DE: __db_c_destroy (db_cam.c:163) ==9411== by 0x552F640: __db_refresh (db.c:800) ==9411== by 0x552FCD0: __db_close (db.c:682) ==9411== by 0x553EC0C: __db_close_pp (db_iface.c:256) ==9411== by 0x1D3FF4: hdb_db_close (init.c:625) ==9411== by 0x1B9C33: over_db_close (backover.c:182) ==9411== by 0x15B2DE: backend_shutdown (backend.c:361) ==9411== by 0x1C00F9: slap_tool_destroy (slapcommon.c:862) ==9411== by 0x1BD714: slapadd (slapadd.c:570) ==9411== by 0x131F44: main (main.c:661) ==9411== If you believe this happened as a result of a stack ==9411== overflow in your program's main thread (unlikely but ==9411== possible), you can try to increase the size of the ==9411== main thread stack using the --main-stacksize= flag. ==9411== The main thread stack size used in this run was 8388608. ==9411==
The full valgrind output of some 2,000 lines can be submitted if required.
-Dieter