Re: (ITS#6853) slapadd/slapindex -q hang
by dhawes@vt.edu
On 03/03/2011 02:38 PM, Quanah Gibson-Mount wrote:
> --On Thursday, March 03, 2011 7:34 PM +0000 dhawes(a)vt.edu wrote:
>
>> Full_Name: David Hawes
>> Version: 2.4.24
>> OS: Ubuntu 10.04
>> URL:
>> Submission from: (NULL) (128.173.39.26)
>>
>>
>> When using slapadd or slapindex with the -q option, the message "Closing
>> DB..." is printed and then the application hangs indefinitely. Removing
>> the -q option allows the application to complete without issue.
>>
>> This occurs with Berkeley DB 4.7.25 (with patches) and 5.1.25.
>
> I would ask you provide a full backtrace of the slapadd process after it
> has hung. Otherwise, this report isn't of much use.
>
> Also, if you are using the Ubuntu patches for OpenLDAP with your
> OpenLDAP build, you are including a known database-corrupting patch.
> Since you don't say how you built OpenLDAP, it is impossible for us to
> know if you did this or not.
Both OpenLDAP and Berkeley DB are compiled from source. No Ubuntu
packages or code is used.
Backtraces (I may need to recompile without optimization):
(gdb) thread apply all bt
Thread 2 (Thread 0x7ffee9003700 (LWP 29225)):
#0 0x00007ffff763c85c in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/libpthread.so.0
#1 0x00000000004b4150 in bdb_tool_trickle_task (ctx=<value optimized out>,
ptr=<value optimized out>) at tools.c:1253
#2 0x00000000005066b0 in ldap_int_thread_pool_wrapper (
xpool=<value optimized out>) at tpool.c:685
#3 0x00007ffff76379ca in start_thread () from /lib/libpthread.so.0
#4 0x00007ffff677970d in clone () from /lib/libc.so.6
#5 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7ffff7fd9700 (LWP 29220)):
#0 0x00007ffff763c85c in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/libpthread.so.0
#1 0x0000000000506223 in ldap_pvt_thread_pool_destroy
(tpool=0x7ffffffed658,
run_pending=<value optimized out>) at tpool.c:582
#2 0x0000000000506a0a in ldap_int_thread_pool_shutdown () at tpool.c:181
#3 0x00000000005050a9 in ldap_pvt_thread_destroy () at threads.c:70
#4 0x0000000000466059 in slap_destroy () at init.c:273
#5 0x00000000004a5ade in slap_tool_destroy () at slapcommon.c:932
#6 0x00000000004a46e7 in slapadd (argc=0, argv=<value optimized out>)
at slapadd.c:606
#7 0x000000000041edc0 in main (argc=4, argv=0x7fffffffe048) at main.c:407
(gdb) thread apply all bt full
Thread 2 (Thread 0x7ffee9003700 (LWP 29225)):
#0 0x00007ffff763c85c in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/libpthread.so.0
No symbol table info available.
#1 0x00000000004b4150 in bdb_tool_trickle_task (ctx=<value optimized out>,
ptr=<value optimized out>) at tools.c:1253
env = 0x886270
wrote = 0
#2 0x00000000005066b0 in ldap_int_thread_pool_wrapper (
xpool=<value optimized out>) at tpool.c:685
pool = 0x844f00
task = 0x89dc30
work_list = <value optimized out>
ctx = {ltu_id = 140732807526144, ltu_key = {{ltk_key = 0x0,
ltk_data = 0x0, ltk_free = 0}, {ltk_key = 0x0, ltk_data =
0x0,
ltk_free = 0}, {ltk_key = 0x0, ltk_data = 0x0,
ltk_free = 0x7ffee9002c60}, {ltk_key = 0x0,
ltk_data = 0x7ffff7fdbc08, ltk_free = 0x7ffee9002dd8}, {
ltk_key = 0x0, ltk_data = 0xa8428197,
ltk_free = 0x7ffff7de7457}, {ltk_key = 0x0,
ltk_data = 0x2a10a06, ltk_free = 0x17}, {ltk_key = 0x0,
ltk_data = 0x0, ltk_free = 0x7ffee9002c60}, {ltk_key = 0x0,
ltk_data = 0x7ffff669c5b0, ltk_free = 0}, {ltk_key = 0x0,
ltk_data = 0x0, ltk_free = 0}, {ltk_key = 0x0, ltk_data =
0x0,
ltk_free = 0x7ffff7fdd510}, {ltk_key = 0x0,
ltk_data = 0x7ffff7fda0f0, ltk_free = 0x7ffff7fdb4c0}, {
ltk_key = 0x0, ltk_data = 0x7ffff66a3660,
ltk_free = 0x7ffff7631f50}, {ltk_key = 0x0,
ltk_data = 0x1000003bb, ltk_free = 0}, {ltk_key = 0x0,
ltk_data = 0x7ffff7fdd868, ltk_free = 0x7ffee9002e10}, {
ltk_key = 0x0, ltk_data = 0x7ffee9002e38,
ltk_free = 0x7ffff7fdd510}, {ltk_key = 0x0,
ltk_data = 0x7ffff7de7722, ltk_free = 0}, {ltk_key = 0x0,
ltk_data = 0x5, ltk_free = 0}, {ltk_key = 0x0,
ltk_data = 0x7ffff7fdd510, ltk_free = 0}, {ltk_key = 0x0,
ltk_data = 0x0, ltk_free = 0}, {ltk_key = 0x0,
ltk_data = 0x7ffee9002dc0, ltk_free = 0x7ffee9002dd8}, {
ltk_key = 0x0, ltk_data = 0x0, ltk_free = 0x7ffff7633cef}, {
ltk_key = 0x0, ltk_data = 0x0, ltk_free = 0}, {ltk_key =
0x0,
ltk_data = 0x0, ltk_free = 0}, {ltk_key = 0x0, ltk_data =
0x0,
ltk_free = 0}, {ltk_key = 0x0, ltk_data = 0x7ffff669c5b0,
ltk_free = 0x7ffff7fdb4c0}, {ltk_key = 0x0,
ltk_data = 0xffffffff, ltk_free = 0}, {ltk_key = 0x0,
ltk_data = 0x218050, ltk_free = 0}, {ltk_key = 0x0,
ltk_data = 0x7ffee9003700, ltk_free = 0x7ffff7631000}, {
ltk_key = 0x0, ltk_data = 0x5, ltk_free = 0}, {ltk_key =
0x0,
ltk_data = 0x7ffff7638ca9, ltk_free = 0}, {ltk_key = 0x0,
ltk_data = 0x0, ltk_free = 0x800000 <hbuf+48096>}, {
ltk_key = 0x0, ltk_data = 0x7ffff7df2325,
ltk_free = 0x7ffee9003700}}}
kctx = <value optimized out>
keyslot = 285
hash = <value optimized out>
__PRETTY_FUNCTION__ = "ldap_int_thread_pool_wrapper"
#3 0x00007ffff76379ca in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#4 0x00007ffff677970d in clone () from /lib/libc.so.6
No symbol table info available.
#5 0x0000000000000000 in ?? ()
No symbol table info available.
Thread 1 (Thread 0x7ffff7fd9700 (LWP 29220)):
#0 0x00007ffff763c85c in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/libpthread.so.0
No symbol table info available.
#1 0x0000000000506223 in ldap_pvt_thread_pool_destroy
(tpool=0x7ffffffed658,
run_pending=<value optimized out>) at tpool.c:582
pool = 0x844f00
pptr = 0x844f00
task = <value optimized out>
#2 0x0000000000506a0a in ldap_int_thread_pool_shutdown () at tpool.c:181
pool = 0x844f00
#3 0x00000000005050a9 in ldap_pvt_thread_destroy () at threads.c:70
No locals.
#4 0x0000000000466059 in slap_destroy () at init.c:273
rc = 0
#5 0x00000000004a5ade in slap_tool_destroy () at slapcommon.c:932
rc = 0
#6 0x00000000004a46e7 in slapadd (argc=0, argv=<value optimized out>)
at slapadd.c:606
buf = 0x89de00 "\240Љ"
text = 0x0
textbuf = '\000' <repeats 255 times>
maxcsn = {{bv_len = 0, bv_val = 0x0} <repeats 3928 times>, {
bv_len = 0,
bv_val = 0x7ffff7dec74d "\205\300u\347H\203\304\b\270\001"}, {
bv_len = 0, bv_val = 0x7ffff66a8bcc "ld-linux-x86-64.so.2"}, {
bv_len = 0,
bv_val = 0x7ffff7de5212 "\205\300t\312H\201\304\370\003"}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {
bv_len = 4294967296, bv_val = 0x0}, {bv_len = 0, bv_val =
0x0}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7ffff7dec74d "\205\300u\347H\203\304\b\270\001"}, {
bv_len = 0, bv_val = 0x7ffff6a17d47 "libc.so.6"}, {bv_len = 0,
bv_val = 0x7ffff7de5212 "\205\300t\312H\201\304\370\003"}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7ffff6a17d51 "libresolv.so.2"}, {bv_len =
4294967296,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7ffff7dec74d "\205\300u\347H\203\304\b\270\001"}, {
bv_len = 0, bv_val = 0x7ffff6c5e499 "libc.so.6"}, {bv_len = 0,
bv_val = 0x7ffff7de5212 "\205\300t\312H\201\304\370\003"}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7ffff6a17d51 "libresolv.so.2"}, {bv_len =
4294967296,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7ffff7dec74d "\205\300u\347H\203\304\b\270\001"}, {
bv_len = 0, bv_val = 0x7ffff6fc90f8 "libc.so.6"}, {bv_len = 0,
bv_val = 0x7ffff7de5212 "\205\300t\312H\201\304\370\003"}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7ffff6a17d51 "libresolv.so.2"}, {bv_len =
4294967296,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x0}, {bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7ffff7dec74d "\205\300u\347H\203\304\b\270\001"}, {
bv_len = 0, bv_val = 0x7ffff7213869 "ld-linux-x86-64.so.2"}, {
bv_len = 0,
bv_val = 0x7ffff7de5212 "\205\300t\312H\201\304\370\003"}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7fffffffddc0 ""}, {bv_len = 140737488346672,
bv_val = 0x7ffff7fdb4c0 ""}, {bv_len = 0,
bv_val = 0x7ffff66a8bcc "ld-linux-x86-64.so.2"}, {
bv_len = 140737488343600,
bv_val = 0x7ffff7de9a22 "H\211C [\303\017\037\204"},
{bv_len = 0,
bv_val = 0x7ffff7deb986 "H\213\204$\030\001"}, {
bv_len = 140737354129336, bv_val = 0x7fffffffdde8 ""}, {
bv_len = 140737488346608, bv_val = 0x7fffffffddff ""}, {
bv_len = 140737351948784, bv_val = 0x7fffffffddc0 ""}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7ffff6a0fb40 "\001"}, {bv_len =
18446744072574992384,
bv_val = 0x7ffff7fdb4c0 ""}, {bv_len = 0,
bv_val = 0x7ffff66a8bcc "ld-linux-x86-64.so.2"}, {
bv_len = 140737488343600,
bv_val = 0xffffffffa2000000 <Address 0xffffffffa2000000 out
of bounds>}, {bv_len = 18446726195687325696,
bv_val = 0x7ffff7dec74d "\205\300u\347H\203\304\b\270\001"}, {
bv_len = 0, bv_val = 0x7ffff7419dc1 "libc.so.6"}, {bv_len = 0,
bv_val = 0x7ffff7de5212 "\205\300t\312H\201\304\370\003"}, {
bv_len = 0, bv_val = 0x7fffffffddc0 ""}, {
bv_len = 140737488346672, bv_val = 0x7ffff7fdb000 ""}, {
bv_len = 0, bv_val = 0x7ffff6a17d47 "libc.so.6"}, {
bv_len = 140737488343856,
bv_val = 0x7ffff7de9a22 "H\211C [\303\017\037\204"},
{bv_len = 0,
bv_val = 0x7ffff7deb986 "H\213\204$\030\001"}, {
bv_len = 140737354129336, bv_val = 0x7ffff7fdc000 ""}, {
bv_len = 140737488346672,
bv_val = 0x7 <Address 0x7 out of bounds>}, {
bv_len = 140737353992808,
bv_val = 0x7ffff7dea64d
"H\213\205p\377\377\377\213\215\370\376\377\377L\213\205"}, {bv_len =
140737354127792, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7ffff6c2be00 "\001"}, {bv_len =
18446744072574992384,
bv_val = 0x7ffff7fdb000 ""}, {bv_len = 0,
bv_val = 0x7ffff6a17d47 "libc.so.6"}, {bv_len =
140737488343856,
bv_val = 0xffffffffa4000000 <Address 0xffffffffa4000000 out
of bounds>}, {bv_len = 18446726195687325696,
bv_val = 0x7ffff7de3dae
"H\203\370\377\017\205a\373\377\377L\215\r\360>\001"}, {bv_len = 0,
bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7fffffffddc0 ""}, {bv_len = 140737488346672,
bv_val = 0x7ffff7fdca68 ""}, {bv_len = 1,
bv_val = 0x7ffff6c5e499 "libc.so.6"}, {bv_len =
140737488344096,
bv_val = 0x7ffff7de9a22 "H\211C [\303\017\037\204"},
{bv_len = 0,
bv_val = 0x7ffff7deb986 "H\213\204$\030\001"}, {
bv_len = 140737354129336, bv_val = 0x7fffffffdde8 ""}, {
bv_len = 140737488346608, bv_val = 0x7fffffffddff ""}, {
bv_len = 140737351948784, bv_val = 0x7ffff6c2bf70 ""}, {
bv_len = 140737488346672,
bv_val = 0x7ffff7dea202 "I\211\234$\270\003"}, {
bv_len = 140737353987264, bv_val = 0x0}, {
bv_len = 18446744072574992384, bv_val = 0x7ffff7fdca68 ""}, {
bv_len = 1, bv_val = 0x7ffff6c5e499 "libc.so.6"}, {
bv_len = 140737488344096,
bv_val = 0xffffffffa5e00000 <Address 0xffffffffa5e00000 out
of bounds>}, {bv_len = 18446726195687325696,
bv_val = 0x218a88 <Address 0x218a88 out of bounds>}, {
bv_len = 86016, bv_val = 0x3 <Address 0x3 out of bounds>}, {
bv_len = 0, bv_val = 0x7fffffffddc0 ""}, {
bv_len = 140737488346672, bv_val = 0x7ffff7fdc508 ""}, {
bv_len = 2, bv_val = 0x7ffff6fc90f8 "libc.so.6"}, {
bv_len = 140737488344336,
bv_val = 0x7ffff7de9a22 "H\211C [\303\017\037\204"},
{bv_len = 0,
bv_val = 0x7ffff7deb986 "H\213\204$\030\001"}, {
bv_len = 140737354129336, bv_val = 0x7fffffffdde8 ""}, {
bv_len = 140737488346608, bv_val = 0x7fffffffddff ""}, {
bv_len = 140737351948784, bv_val = 0x7ffff6fa2738 ""}, {
bv_len = 140737488346672,
bv_val = 0x7ffff7dea202 "I\211\234$\270\003"}, {
bv_len = 140737353990144, bv_val = 0x7ffff7fdb4c0 ""}, {
bv_len = 0, bv_val = 0x7ffff7fdc508 ""}, {bv_len = 2,
bv_val = 0x7ffff6fc90f8 "libc.so.6"}, {bv_len =
140737488344336,
bv_val = 0xffffffffa7c00000 <Address 0xffffffffa7c00000 out
of bounds>}, {bv_len = 18446726195687325696,
bv_val = 0x1 <Address 0x1 out of bounds>}, {bv_len = 0,
bv_val = 0x7ffff7de3bf5 "\366E\020\bu\016H\203\273\300"}, {
bv_len = 8030813564919442479,
bv_val = 0x7fffff00362e <Address 0x7fffff00362e out of
bounds>}, {
bv_len = 140737354129704, bv_val = 0x7fffffffddc0 ""}, {
bv_len = 140737488346672, bv_val = 0x7ffff7fdc000 ""}, {
bv_len = 1, bv_val = 0x7ffff7213869 "ld-linux-x86-64.so.2"}, {
bv_len = 140737488344592,
bv_val = 0x7ffff7de9a22 "H\211C [\303\017\037\204"},
{bv_len = 0,
bv_val = 0x7ffff7deb986 "H\213\204$\030\001"}, {
bv_len = 140737354129336, bv_val = 0x7fffffffdde8 ""}, {
bv_len = 140737488346608, bv_val = 0x7ffff720cee0 ""}, {
bv_len = 140737353988792,
bv_val = 0x7ffff7dea202 "I\211\234$\270\003"}, {
bv_len = 140737353992808, bv_val = 0x7ffff7fdc000 ""}, {
bv_len = 140737353987264, bv_val = 0x0}, {
bv_len = 18446744072574992384, bv_val = 0x7ffff7fdc000 ""}, {
bv_len = 1, bv_val = 0x7ffff7213869 "ld-linux-x86-64.so.2"}, {
bv_len = 140737488344592,
bv_val = 0xffffffffa9c00000 <Address 0xffffffffa9c00000 out
of bounds>}, {bv_len = 18446726195687325696,
bv_val = 0x4d6fb0ac <Address 0x4d6fb0ac out of bounds>}, {
bv_len = 331622242,
bv_val = 0x4d3a077c <Address 0x4d3a077c out of bounds>}, {
bv_len = 0,
bv_val = 0x4d488e48 <Address 0x4d488e48 out of bounds>}, {
bv_len = 530906511, bv_val = 0x0}, {bv_len = 0,
bv_val = 0x7fffffffddc0 ""}, {bv_len = 140737488346672,
bv_val = 0x7ffff7fdda20 ""}, {bv_len = 2,
bv_val = 0x7ffff7419dc1 "libc.so.6"}, {bv_len =
140737488344864,
bv_val = 0x7ffff7de9a22 "H\211C [\303\017\037\204"},
{bv_len = 0,
bv_val = 0x7ffff7deb986 "H\213\204$\030\001"}, {
bv_len = 140737354129336, bv_val = 0x7ffff7415f40 ""}, {
bv_len = 140737488346672,
bv_val = 0x7ffff7dea202 "I\211\234$\270\003"}, {
bv_len = 140737353987264, bv_val = 0x7ffff7ffd9b0 ""}, {
bv_len = 0, bv_val = 0x0}, {bv_len = 4294967296,
bv_val = 0x7ffff762fc90 "\001"}, {bv_len =
18446744072574992384,
bv_val = 0x7ffff7fdda20 ""}, {bv_len = 2,
bv_val = 0x7ffff7419dc1 "libc.so.6"}, {bv_len =
140737488344864,
bv_val = 0xffffffffabe00000 <Address 0xffffffffabe00000 out
of bounds>}, {bv_len = 18446726195687325696, bv_val = 0x0}, {bv_len = 832,
bv_val = 0x10102464c457f <Address 0x10102464c457f out of
bounds>},
{bv_len = 0,
bv_val = 0x1003e0003 <Address 0x1003e0003 out of bounds>}, {
bv_len = 126304, bv_val = 0x40 <Address 0x40 out of bounds>}, {
bv_len = 1567688,
bv_val = 0x38004000000000 <Address 0x38004000000000 out of
bounds>},
{bv_len = 19703553316618250, bv_val = 0x7fffffffddc0 ""}, {
bv_len = 140737488346672, bv_val = 0x7ffff7fdd510 ""}, {
bv_len = 1, bv_val = 0x7ffff7634dce "ld-linux-x86-64.so.2"}, {
bv_len = 140737488345152,
bv_val = 0x7ffff7de9a22 "H\211C [\303\017\037\204"},
{bv_len = 0,
bv_val = 0x7ffff762fde0 ""}}
sid = <value optimized out>
bvtext = {bv_len = 256, bv_val = 0x7fffffffdd30 ""}
attr = 0x0
ctxcsn_e = 0x0
ctxcsn_id = <value optimized out>
id = <value optimized out>
opbuf = {ob_op = {o_hdr = 0x7fffffffd9e0, o_tag = 0, o_time = 0,
o_tincr = 0, o_bd = 0x86ff40, o_req_dn = {bv_len = 0,
bv_val = 0x0}, o_req_ndn = {bv_len = 0, bv_val = 0x0},
o_request = {oq_add = {rs_modlist = 0x0, rs_e = 0x0},
oq_bind = {
rb_method = 0, rb_cred = {bv_len = 0, bv_val = 0x0},
rb_edn = {
bv_len = 0, bv_val = 0x0}, rb_ssf = 0, rb_mech = {
bv_len = 0, bv_val = 0x0}}, oq_compare = {rs_ava = 0x0},
oq_modify = {rs_mods = {rs_modlist = 0x0,
rs_no_opattrs = 0 '\000'}, rs_increment = 0},
oq_modrdn = {
rs_mods = {rs_modlist = 0x0, rs_no_opattrs = 0 '\000'},
rs_deleteoldrdn = 0, rs_newrdn = {bv_len = 0, bv_val =
0x0},
rs_nnewrdn = {bv_len = 0, bv_val = 0x0}, rs_newSup = 0x0,
rs_nnewSup = 0x0}, oq_search = {rs_scope = 0, rs_deref
= 0,
rs_slimit = 0, rs_tlimit = 0, rs_limit = 0x0,
rs_attrsonly = 0, rs_attrs = 0x0, rs_filter = 0x0,
rs_filterstr = {bv_len = 0, bv_val = 0x0}}, oq_abandon = {
rs_msgid = 0}, oq_cancel = {rs_msgid = 0}, oq_extended = {
rs_reqoid = {bv_len = 0, bv_val = 0x0}, rs_flags = 0,
rs_reqdata = 0x0}, oq_pwdexop = {rs_extended =
{rs_reqoid = {
bv_len = 0, bv_val = 0x0}, rs_flags = 0,
rs_reqdata = 0x0}, rs_old = {bv_len = 0, bv_val = 0x0},
rs_new = {bv_len = 0, bv_val = 0x0}, rs_mods = 0x0,
rs_modtail = 0x0}}, o_abandon = 0, o_cancel = 0,
o_groups = 0x0, o_do_not_cache = 0 '\000',
o_is_auth_check = 0 '\000', o_dont_replicate = 0 '\000',
o_acl_priv = ACL_NONE, o_nocaching = 0 '\000',
o_delete_glue_parent = 0 '\000', o_no_schema_check = 0 '\000',
o_no_subordinate_glue = 0 '\000',
o_ctrlflag = '\000' <repeats 31 times>, o_controls = 0x0,
o_authz = {sai_method = 0, sai_mech = {bv_len = 0, bv_val =
0x0},
sai_dn = {bv_len = 0, bv_val = 0x0}, sai_ndn = {bv_len = 0,
bv_val = 0x0}, sai_ssf = 0, sai_transport_ssf = 0,
sai_tls_ssf = 0, sai_sasl_ssf = 0}, o_ber = 0x0,
o_res_ber = 0x0, o_callback = 0x0, o_ctrls = 0x0, o_csn = {
bv_len = 0, bv_val = 0x0}, o_private = 0x0, o_extra = {
slh_first = 0x0}, o_next = {stqe_next = 0x0}}, ob_hdr = {
oh_opid = 0, oh_connid = 0, oh_conn = 0x0, oh_msgid = 0,
oh_protocol = 0, oh_tid = 0, oh_threadctx = 0x0,
oh_tmpmemctx = 0x0, oh_tmpmfuncs = 0x0, oh_counters = 0x0,
oh_log_prefix = '\000' <repeats 255 times>}, ob_controls = {
0x0 <repeats 32 times>}}
match = 32767
checkvals = 0
lineno = 7
nextline = 7
ldifrc = <value optimized out>
lmax = 4115
rc = 0
enable_meter = 1
meter = {display = 0x589b80, display_data = 0x0, estimator =
0x589ba0,
estimator_data = 0x0, start_time = 1299184379.2546861,
last_update = 1299184379.2546861, goal_value = 88,
last_position = 0}
stat_buf = {st_dev = 21, st_ino = 6956686, st_nlink = 1,
st_mode = 33188, st_uid = 1000, st_gid = 1000, __pad0 = 0,
st_rdev = 0, st_size = 88, st_blksize = 4096, st_blocks = 24,
st_atim = {tv_sec = 1299166918, tv_nsec = 420393930}, st_mtim = {
tv_sec = 1299166819, tv_nsec = 830383674}, st_ctim = {
tv_sec = 1299166819, tv_nsec = 870399305}, __unused = {0,
0, 0}}
__PRETTY_FUNCTION__ = "slapadd"
#7 0x000000000041edc0 in main (argc=4, argv=0x7fffffffe048) at main.c:407
i = <value optimized out>
no_detach = 32767
rc = 1
urls = <value optimized out>
username = 0x374208 <Address 0x374208 out of bounds>
groupname = 0x1 <Address 0x1 out of bounds>
sandbox = 0x7fffffffdf1f ""
syslogUser = 160
configfile = 0x4131e9 "__libc_start_main"
configdir = 0xbf <Address 0xbf out of bounds>
serverName = 0x7fffffffe380 "slapadd"
scp = <value optimized out>
scp_entry = <value optimized out>
debug_unknowns = 0x0
syslog_unknowns = 0x0
slapd_pid_file_unlink = <value optimized out>
slapd_args_file_unlink = <value optimized out>
firstopt = <value optimized out>
__PRETTY_FUNCTION__ = "main"
11 years, 4 months
Re: (ITS#6853) slapadd/slapindex -q hang
by quanah@zimbra.com
--On Thursday, March 03, 2011 7:34 PM +0000 dhawes(a)vt.edu wrote:
> Full_Name: David Hawes
> Version: 2.4.24
> OS: Ubuntu 10.04
> URL:
> Submission from: (NULL) (128.173.39.26)
>
>
> When using slapadd or slapindex with the -q option, the message "Closing
> DB..." is printed and then the application hangs indefinitely. Removing
> the -q option allows the application to complete without issue.
>
> This occurs with Berkeley DB 4.7.25 (with patches) and 5.1.25.
I would ask you provide a full backtrace of the slapadd process after it
has hung. Otherwise, this report isn't of much use.
Also, if you are using the Ubuntu patches for OpenLDAP with your OpenLDAP
build, you are including a known database-corrupting patch. Since you
don't say how you built OpenLDAP, it is impossible for us to know if you
did this or not.
--Quanah
--
Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra :: the leader in open source messaging and collaboration
11 years, 4 months
(ITS#6853) slapadd/slapindex -q hang
by dhawes@vt.edu
Full_Name: David Hawes
Version: 2.4.24
OS: Ubuntu 10.04
URL:
Submission from: (NULL) (128.173.39.26)
When using slapadd or slapindex with the -q option, the message "Closing DB..."
is printed and then the application hangs indefinitely. Removing the -q option
allows the application to complete without issue.
This occurs with Berkeley DB 4.7.25 (with patches) and 5.1.25.
slapd.conf:
=====
include /usr/local/openldap-2.4.24/etc/openldap/schema/core.schema
pidfile /usr/local/openldap-2.4.24/var/run/slapd.pid
argsfile /usr/local/openldap-2.4.24/var/run/slapd.args
database bdb
suffix "dc=test,dc=com"
rootdn "cn=Manager,dc=test,dc=com"
directory /usr/local/openldap-2.4.24/var/openldap-data
dbconfig set_lg_dir /usr/local/openldap-2.4.24/var/openldap-data/bdb-logs
dbconfig set_lg_max 104857600
dbconfig set_lg_bsize 26214400
dbconfig set_cachesize 4 0 1
dbconfig set_flags DB_LOG_AUTOREMOVE
=====
ldif:
dn: dc=test,dc=com
objectClass: dcObject
objectClass: organization
o: testorg
dc: test
11 years, 4 months
Re: (ITS#6852) Define uidNumber and gidNumber with ORDERING matching rule
by michael@stroeder.com
Patch against current HEAD for this:
Index: ./servers/slapd/schema_prep.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/schema_prep.c,v
retrieving revision 1.189
diff -u -r1.189 schema_prep.c
--- ./servers/slapd/schema_prep.c 4 Jan 2011 23:43:16 -0000 1.189
+++ ./servers/slapd/schema_prep.c 3 Mar 2011 11:25:59 -0000
@@ -934,6 +934,7 @@
"DESC 'RFC2307: An integer uniquely identifying a user "
"in an administrative domain' "
"EQUALITY integerMatch "
+ "ORDERING integerOrderingMatch "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )",
NULL, 0,
NULL, NULL,
@@ -944,6 +945,7 @@
"DESC 'RFC2307: An integer uniquely identifying a group "
"in an administrative domain' "
"EQUALITY integerMatch "
+ "ORDERING integerOrderingMatch "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )",
NULL, 0,
NULL, NULL,
11 years, 4 months
(ITS#6851) back-ldap assertion failure, LDAP proxy to Windows AD
by tedcheng@symas.com
Full_Name: Ted C. Cheng
Version: HEAD
OS: Redhat Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (75.80.56.88)
We encountered a back-ldap assertion failure with the back-ldap as a proxy to a
remote Active Directory on Windows 2003 R2. The assertion failure occurred when
the slapd server was checking ACLs via the rwm overlay. Snippet of the stack
trace:
Thread 1 (Thread 32267):
....
#2 0x0000003c354296e6 in __assert_fail () from /lib64/libc.so.6
#3 0x00002ac57daaf6c1 in ldap_back_dobind_int (lcp=0x42f70170, op=0x42f702f0,
rs=0x42f700a0, sendok=LDAP_BACK_GETCONN, retries=0, dolock=1)
at /home/build/sol-2.4.23.101221/sol24x/ldap24/servers/slapd/back-ldap/bind.c:1389
#4 0x00002ac57daafda0 in ldap_back_dobind (lcp=0x42f70170, op=0x42f702f0,
rs=0x42f700a0, sendok=LDAP_BACK_DONTSEND)
at /home/build/sol-2.4.23.101221/sol24x/ldap24/servers/slapd/back-ldap/bind.c:1572
#5 0x00002ac57daac7a7 in ldap_back_entry_get (op=0x42f702f0, ndn=0x42f701d0,
oc=0x0, at=0x135ad370, rw=0, ent=0x42f70a58)
Analysis of the assertion failure:
The ldap_back_entry_get() function, back-ldap/search.c, is called for ACL
entries, via rwm overlay. The function sets op->o_do_not_cache to 1 before
calling into ldap_back_dobind():
/* Tell getconn this is a privileged op */
do_not_cache = op->o_do_not_cache;
tag = op->o_tag;
/* do not cache */
op->o_do_not_cache = 1;
/* ldap_back_entry_get() is an entry lookup, so it does not need
* to know what the entry is being looked up for */
op->o_tag = LDAP_REQ_SEARCH;
rc = ldap_back_dobind( &lc, op, &rs, LDAP_BACK_DONTSEND );
The ldap_back_dobind() function calls ldap_back_dobind_int() for bind,
back-ldap/bind.c. The following ldap_back_dobind_int() code is destined for
assertion failure, if op->o_do_not_cache flag is set and there is no valid
binddn and bindcred returned by ldap_back_getconn(). Setting an invalid LDAP URI
for the remote AD Windows box is such a case.
ldap_back_dobind_int(
)
{
...
if (sendok & LDAP_BACK_GETCONN) {
lc = ldap_back_getconn(op, rs, sendoff, &binddn, &bindcred);
...
}
if ( LDAP_BACK_CONN_ISIDASSERT( lc ) ) {
if ( BER_BVISEMPTY( &binddn ) && BER_BVISEMPTY( &bindcred ) ) {
/* if we got here, it shouldn't return result */
rc = ldap_back_is_proxy_authz( op, rs,
LDAP_BACK_DONTSEND, &binddn, &bindcred );
/* ldap_back_is_proxy_authz always returns 0 when op->o_do_not_cache is set,
see below */
assert( rc == 1 );------> assertion failure
}
rc = ldap_back_proxy_authz_bind( lc, op, rs, sendok,
&binddn, &bindcred );
}
}
When the op->o_do_not_cache flag is set, the ldap_back_is_proxy_authz() function
always returns 0.
ldap_back_is_proxy_authz( ... )
{
...
int dobind = 0;
if ( op->o_conn == NULL || op->o_do_not_cache ) {
goto done;
}
...
done:;
return dobind; <--- always returns 0
}
Ted C. Cheng
Symas Corporation
11 years, 4 months
Re: (ITS#6850) sssvlv can segfault when releasing multiple requests by conn
by raphael.ouazana@linagora.com
Hi,
Le Mer 2 mars 2011 17:51, masarati(a)aero.polimi.it a écrit :
>
>> The following patch
>
> Please upload patches according to
> <http://www.openldap.org/devel/contributing.html#submitting>.
As said in the post, no success:
$ ftp
ftp> open ftp.openldap.org
Connected to www.openldap.org.
220- OpenLDAP FTP Service
220 boole.openldap.org FTP server (Version 6.00LS) ready.
Name (ftp.openldap.org:raphael): ftp
331 Guest login ok, send your email address as password.
Password:
230- Copyright 1998-2010, The OpenLDAP Foundation, All Rights Reserved.
230- COPYING RESTRICTIONS APPLY, see:
230- ftp://ftp.openldap.org/COPYRIGHT
230- ftp://ftp.openldap.org/LICENSE
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ascii
200 Type set to A.
ftp> cd incoming
250 CWD command successful.
ftp> put raphael-ouazana-110302-sssvlv-fix-free_sort_op-segfault.patch
local: raphael-ouazana-110302-sssvlv-fix-free_sort_op-segfault.patch
remote: raphael-ouazana-110302-sssvlv-fix-free_sort_op-segfault.patch
200 PORT command successful.
425 Can't build data connection: Connection refused.
ftp>
Regards,
Raphael Ouazana.
11 years, 4 months
(ITS#6850) sssvlv can segfault when releasing multiple requests by conn
by raphael.ouazana@linagora.com
Full_Name: Raphael Ouazana
Version: HEAD
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (213.41.232.151)
Hi,
sssvlv support for multiple requests by conn (see ITS#6686) can segfault while
releasing some connections. Indeed, the request to release can be searched by
the ps_cookie. But as the ps_cookie is NULL at the end of the request (it points
to so_tree), the same request can be freed multiple times.
The following patch fix this issue and reinforce the rest of the code by using
so to search for the matching request where it is possible. Sorry, no FTP
upload, I get an error 425.
It fixes a little error in the man page too.
Index: doc/man/man5/slapo-sssvlv.5
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/doc/man/man5/slapo-sssvlv.5,v
retrieving revision 1.4
diff -u -r1.4 slapo-sssvlv.5
--- doc/man/man5/slapo-sssvlv.5 4 Jan 2011 23:42:55 -0000 1.4
+++ doc/man/man5/slapo-sssvlv.5 2 Mar 2011 16:40:57 -0000
@@ -17,8 +17,8 @@
Since a complete result set must be generated in memory before sorting can
be performed, processing sort requests can have a large impact on the
server's memory use. As such, any connection is limited to having only
-one sort request active at a time. Additional limits may be configured
-as described below.
+a limited number of sorts requests active at a time. Additional limits may
+be configured as described below.
.SH CONFIGURATION
These
Index: servers/slapd/overlays/sssvlv.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays/sssvlv.c,v
retrieving revision 1.29
diff -u -r1.29 sssvlv.c
--- servers/slapd/overlays/sssvlv.c 4 Jan 2011 23:43:32 -0000 1.29
+++ servers/slapd/overlays/sssvlv.c 2 Mar 2011 16:40:58 -0000
@@ -342,6 +342,23 @@
}
/* Return the session id or -1 if unknown */
+static int find_session_by_so(
+ int svi_max_percon,
+ int conn_id,
+ sort_op *so )
+{
+ int sess_id;
+ if (so == NULL) {
+ return -1;
+ }
+ for (sess_id = 0; sess_id < svi_max_percon; sess_id++) {
+ if ( sort_conns[conn_id] && sort_conns[conn_id][sess_id] == so )
+ return sess_id;
+ }
+ return -1;
+}
+
+/* Return the session id or -1 if unknown */
static int find_session_by_context(
int svi_max_percon,
int conn_id,
@@ -379,14 +396,13 @@
static void free_sort_op( Connection *conn, sort_op *so )
{
int sess_id;
- PagedResultsCookie ps_cookie = (PagedResultsCookie) so->so_tree;
if ( so->so_tree ) {
tavl_free( so->so_tree, ch_free );
so->so_tree = NULL;
}
ldap_pvt_thread_mutex_lock( &sort_conns_mutex );
- sess_id = find_session_by_context( so->so_info->svi_max_percon,
conn->c_conn_idx, so->so_vcontext, ps_cookie );
+ sess_id = find_session_by_so( so->so_info->svi_max_percon, conn->c_conn_idx,
so );
sort_conns[conn->c_conn_idx][sess_id] = NULL;
so->so_info->svi_num--;
ldap_pvt_thread_mutex_unlock( &sort_conns_mutex );
@@ -492,7 +508,7 @@
sc->sc_nkeys * sizeof(struct berval), op->o_tmpmemctx );
sn->sn_vals = (struct berval *)(sn+1);
sn->sn_conn = op->o_conn->c_conn_idx;
- sn->sn_session = find_session_by_context( so->so_info->svi_max_percon,
op->o_conn->c_conn_idx, vc->vc_context, NO_PS_COOKIE );
+ sn->sn_session = find_session_by_so( so->so_info->svi_max_percon,
op->o_conn->c_conn_idx, so );
sn->sn_vals[0] = bv;
for (i=1; i<sc->sc_nkeys; i++) {
BER_BVZERO( &sn->sn_vals[i] );
@@ -731,7 +747,7 @@
op->o_tmpfree( sn, op->o_tmpmemctx );
sn = sn2;
sn->sn_conn = op->o_conn->c_conn_idx;
- sn->sn_session = find_session_by_context( so->so_info->svi_max_percon,
op->o_conn->c_conn_idx, so->so_vcontext, (PagedResultsCookie) so->so_tree );
+ sn->sn_session = find_session_by_so( so->so_info->svi_max_percon,
op->o_conn->c_conn_idx, so );
/* Insert into the AVL tree */
tavl_insert(&(so->so_tree), sn, node_insert, avl_dup_error);
Legal notice:
This patch file is derived from OpenLDAP Software. All of the
modifications to
OpenLDAP Software represented in this following patch were developed by
Raphael
Ouazana raphael.ouazana(a)linagora.com. These modifications are not subject to
any
license of Linagora.
The attached modifications to OpenLDAP Software are subject to the following
notice:
Copyright 2011 Raphael Ouazana, Linagora
Redistribution and use in source and binary forms, with or without
modification,
are permitted only as authorized by the OpenLDAP Public License.
11 years, 4 months