Does anyone have an example of using the pcache overlay with back-sql? 
Here's the relevant section of my slapd.config:
database    sqlsuffix      "......"rootdn      "......."rootpw      
........dbname      MySQLdbuser      .........subtree_cond    "ldap_entries.dn 
like CONCAT('%',?)"insentry_stmt   "INSERT INTO ldap_entries 
(dn,oc_map_id,parent,keyval) VALUES (?,?,?,?)"has_ldapinfo_dn_ru  
nobaseobjectupper_func  UPPERautocommit  yes
pcache bdb 10000 1 50 100pcacheAttrset 0 * +pcacheTemplate (objectClass=) 0 
60...pcache-directory /var/tmp/cachepcache-cachesize 100
What I'm unclear about is how to configure the private bdb database used for 
the cache. 
When use this config, slapd starts up ok, but crashes with a SEGV when (I 
assume) it tries to cache a result:
(I am running slapd built from the latest code in HEAD from git)
slap_queue_csn: queing 0xb7a52efa 20110629132038.554471Z#000000#000#000000
Program received signal SIGSEGV, Segmentation fault.[Switching to Thread 
0xb7a55b90 (LWP 26226)]0x080f3844 in slap_queue_csn (op=0xb7a53378, 
csn=0xb7a52f60) at ctxcsn.c:199199         LDAP_TAILQ_INSERT_TAIL( 
be->be_pending_csn_list,(gdb) where#0  0x080f3844 in slap_queue_csn 
(op=0xb7a53378, csn=0xb7a52f60) at ctxcsn.c:199#1  0x080f38e0 in slap_get_csn 
(op=0xb7a53378, csn=0xb7a52f60, manage_ctxcsn=1) at ctxcsn.c:214#2  0x08079f33 
in slap_add_opattrs (op=0xb7a53378, text=0xb7a53214, textbuf=0xb7a53074 "", 
textlen=256, manage_ctxcsn=1) at add.c:609#3  0x0814187b in bdb_add 
(op=0xb7a53378, rs=0xb7a53200) at add.c:107#4  0x081a144e in merge_entry 
(op=0xb7a53378, e=0x9f56e4c, dup=0, query_uuid=0xa040848) at pcache.c:865#5  
0x081a4d1c in cache_entries (op=0x9fdbfc8, query_uuid=0xa040848) at 
pcache.c:2325#6  0x081a5244 in pcache_op_cleanup (op=0x9fdbfc8, rs=0xb7a550e4) 
at pcache.c:2430#7  0x08084697 in slap_cleanup_play (op=0x9fdbfc8, 
rs=0xb7a550e4) at result.c:539#8  0x08084dd3 in send_ld!
 ap_response (op=0x9fdbfc8, rs=0xb7a550e4) at result.c:724#9  0x0808554e in 
slap_send_ldap_result (op=0x9fdbfc8, rs=0xb7a550e4) at result.c:851#10 
0x0813e4a3 in backsql_search (op=0x9fdbfc8, rs=0xb7a550e4) at search.c:2493#11 
0x0807402e in fe_op_search (op=0x9fdbfc8, rs=0xb7a550e4) at search.c:402#12 
0x080f1aaa in overlay_op_walk (op=0x9fdbfc8, rs=0xb7a550e4, which=op_search, 
oi=0x9f3dc80, on=0x0) at backover.c:671#13 0x080f1c5f in over_op_func 
(op=0x9fdbfc8, rs=0xb7a550e4, which=op_search) at backover.c:723#14 0x080f1d0e 
in over_op_search (op=0x9fdbfc8, rs=0xb7a550e4) at backover.c:750#15 0x0807397d 
in do_search (op=0x9fdbfc8, rs=0xb7a550e4) at search.c:247#16 0x08070704 in 
connection_operation (ctx=0xb7a551d0, arg_v=0x9fdbfc8) at connection.c:1138#17 
0x08070c44 in connection_read_thread (ctx=0xb7a551d0, argv=0xd) at 
connection.c:1274#18 0x081e04a5 in ldap_int_thread_pool_wrapper 
(xpool=0x9f11f78) at tpool.c:685#19 0x004be5ab in start_thread () from 
/lib/libpthread.so.0#20 !
 0x003b2cfe in clone () from /lib/libc.so.6
It crashes because be->be_pending_csn_list is zero, presumably 
because backend_startup_one() has not been called for this backend. This leads 
me to believe that I need something in slapd.conf to get the private bdb 
database initialised, but what?
Chris

                                          

Reply via email to