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

Re: (ITS#7053) back-monitor blocks



This is a multi-part message in MIME format.
--------------070806090607090407080503
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

I can sometimes reproduce this with ldapsearch. But for whatever reason it's
immediately reproducible with web2ldap browsing cn=Monitor.

The configuration is quite small (see slapd.conf attached).

$ strace -p $(cat run/slapd.pid)
Process 6275 attached - interrupt to quit
futex(0x7f6f246209d0, FUTEX_WAIT, 6276, NULL

Here's what gdb outputs attached to the blocking process.

(gdb) info threads
  4 Thread 0x7f6f24620700 (LWP 6276)  0x00007f6f28b41cb3 in epoll_wait () from
/lib64/libc.so.6
  3 Thread 0x7f6f23e1f700 (LWP 6277)  0x00007f6f29a5f38c in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  2 Thread 0x7f6f2361e700 (LWP 6285)  0x00007f6f29a61ea4 in __lll_lock_wait ()
from /lib64/libpthread.so.0
* 1 Thread 0x7f6f2aed9740 (LWP 6275)  0x00007f6f29a5bcb5 in pthread_join ()
from /lib64/libpthread.so.0
(gdb) thread apply all bt

Thread 4 (Thread 0x7f6f24620700 (LWP 6276)):
#0  0x00007f6f28b41cb3 in epoll_wait () from /lib64/libc.so.6
#1  0x0000000000437751 in slapd_daemon_task (ptr=0x0) at daemon.c:2528
#2  0x00007f6f29a5aa3f in start_thread () from /lib64/libpthread.so.0
#3  0x00007f6f28b4167d in clone () from /lib64/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f6f23e1f700 (LWP 6277)):
#0  0x00007f6f29a5f38c in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1  0x00007f6f2aa94f23 in ldap_pvt_thread_cond_wait (cond=0x7cc7c0,
mutex=0x7cc798) at thr_posix.c:277
#2  0x00007f6f2aa93999 in ldap_int_thread_pool_wrapper (xpool=0x7cc790) at
tpool.c:672
#3  0x00007f6f29a5aa3f in start_thread () from /lib64/libpthread.so.0
#4  0x00007f6f28b4167d in clone () from /lib64/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f6f2361e700 (LWP 6285)):
#0  0x00007f6f29a61ea4 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007f6f29a5d294 in _L_lock_999 () from /lib64/libpthread.so.0
#2  0x00007f6f29a5d0aa in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00007f6f2aa94f76 in ldap_pvt_thread_mutex_lock (mutex=0x96dcf0) at
thr_posix.c:296
#4  0x00007f6f260492bf in monitor_cache_lock (e=0x88e7c8) at cache.c:117
#5  0x00007f6f2604824b in monitor_send_children (op=0x97d320,
rs=0x7f6f2361da30, e_nonvolatile=0x88e728, e_ch=0x88f3a8, sub=1) at search.c:102
#6  0x00007f6f260483db in monitor_send_children (op=0x97d320,
rs=0x7f6f2361da30, e_nonvolatile=0x88e1d8, e_ch=0x0, sub=1) at search.c:139
#7  0x00007f6f260488eb in monitor_back_search (op=0x97d320, rs=0x7f6f2361da30)
at search.c:255
#8  0x000000000043f7fa in fe_op_search (op=0x97d320, rs=0x7f6f2361da30) at
search.c:402
#9  0x000000000043f03e in do_search (op=0x97d320, rs=0x7f6f2361da30) at
search.c:247
#10 0x000000000043b927 in connection_operation (ctx=0x7f6f2361db60,
arg_v=0x97d320) at connection.c:1138
#11 0x000000000043bec5 in connection_read_thread (ctx=0x7f6f2361db60,
argv=0xd) at connection.c:1274
#12 0x00007f6f2aa93a40 in ldap_int_thread_pool_wrapper (xpool=0x7cc790) at
tpool.c:685
#13 0x00007f6f29a5aa3f in start_thread () from /lib64/libpthread.so.0
#14 0x00007f6f28b4167d in clone () from /lib64/libc.so.6
#15 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f6f2aed9740 (LWP 6275)):
#0  0x00007f6f29a5bcb5 in pthread_join () from /lib64/libpthread.so.0
#1  0x00007f6f2aa94e64 in ldap_pvt_thread_join (thread=140115328501504,
thread_return=0x0) at thr_posix.c:197
#2  0x00000000004388b9 in slapd_daemon () at daemon.c:2922
#3  0x0000000000416c60 in main (argc=11, argv=0x7fff0ce78fd8) at main.c:983
(gdb)


--------------070806090607090407080503
Content-Type: text/plain;
 name="slapd.conf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="slapd.conf"

#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#

# Schemata aus der OpenLDAP-Distribution
include		/opt/openldap-RE24/etc/openldap/schema/core.schema
include		/opt/openldap-RE24/etc/openldap/schema/cosine.schema
include		/opt/openldap-RE24/etc/openldap/schema/inetorgperson.schema

# Define global ACLs to disable default read access.

pidfile		/home/michael/temp/openldap-testbed-its7053/run/slapd.pid
argsfile	/home/michael/temp/openldap-testbed-its7053/run/slapd.args

modulepath	/opt/openldap-RE24/libexec/openldap

##################################################################
# Load dynamic backend modules:
##################################################################
moduleload	back_hdb.la
moduleload	back_monitor.la

##################################################################
# slapd global parameters
##################################################################

#loglevel conns filter stats
threads 6
sasl-secprops minssf=0
#sasl-realm STROEDER.COM

##################################################################
# Rewrite SASL identity to DIT identity
##################################################################

# EXTERNAL over Unix Domain socket
authz-regexp
  "gidnumber=([0-9]+)\\+uidnumber=([0-9]+),cn=peercred,cn=external,cn=auth"
  "ldap:///ou=schulung,dc=stroeder,dc=local??sub?(&(objectClass=posixAccount)(uidNumber=$2)(gidNumber=$1))"

# All mechs based on userID most times with password
authz-regexp
  "uid=([a-zA-Z0-9]+),cn=(digest-md5|cram-md5|ntlm|plain|login|gssapi),cn=auth"
  "ldap:///ou=schulung,dc=stroeder,dc=local??sub?(uid=$1)"

##################################################################
# Global access control
##################################################################

# Root DSE: allow anyone to read it
access to dn.base="" by * read
# Subschema (sub)entry DSE: allow anyone to read it
access to dn.base="cn=Subschema" by * read

#######################################################################
# Datenbank fuer Namensraum ou=schulung,dc=stroeder,dc=local
#######################################################################

database	hdb

suffix		"ou=schulung,dc=stroeder,dc=local"
directory	/home/michael/temp/openldap-testbed-its7053/data1/bv
rootdn		"uid=diradm,ou=schulung,dc=stroeder,dc=local"
rootpw		{SSHA}t2umh2Mbf7NVLBWhJ9DeHXrwmYPt3rSs
lastmod		on

# Index-Konfiguration
index objectClass		eq

checkpoint 200 5

# Entries to cache in memory
cachesize 1000
# Search results to cache in memory
idlcachesize 100

sizelimit	-1

# DB_CONFIG parameters
dbconfig set_cachesize   0       20000000        1
dbconfig set_lg_regionmax        262144
dbconfig set_lg_bsize            262144
dbconfig set_lg_max              10485760
dbconfig set_tas_spins 0

##################################################################################
# Berechtigungen im Namensraum ou=schulung,dc=stroeder,dc=local
##################################################################################

access to attrs=userPassword
    by group="cn=Admins,ou=Groups,ou=schulung,dc=stroeder,dc=local" =wx
    by group="cn=Replicas,ou=Groups,ou=schulung,dc=stroeder,dc=local" read
    by self =wx
    by * =x

access to dn.subtree="ou=schulung,dc=stroeder,dc=local"
    by group="cn=Admins,ou=Groups,ou=schulung,dc=stroeder,dc=local" write
    by group="cn=Replicas,ou=Groups,ou=schulung,dc=stroeder,dc=local" read
    by * None


#######################################################################
# Monitor-Datenbank
#######################################################################

database monitor

access to dn.subtree="cn=Monitor"
    by * read

--------------070806090607090407080503--