[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-ldap-dev
Subject:    RE: 100% CPU utilization in Zope after LDAP connection timeout
From:       "Matthew X. Economou" <xenophon () irtnog ! org>
Date:       2005-03-17 12:51:30
Message-ID: B9638CACBA387E48927BB56B6A15550799EA () svr1 ! irtnog ! org
[Download RAW message or body]

Michael,

I installed python-ldap 2.0.6 on Python 2.4 and using OpenLDAP 2.2.23,
all of which came from the FreeBSD ports tree.  According to ldd(1),
python-ldap's helper library links to the reentrant versions of the
OpenLDAP client libraries:

    /usr/local/lib/python2.4/site-packages/_ldap.so:
        libldap_r-2.2.so.7 => /usr/local/lib/libldap_r-2.2.so.7
        liblber-2.2.so.7 => /usr/local/lib/liblber-2.2.so.7
        libssl.so.3 => /usr/lib/libssl.so.3
        libcrypto.so.3 => /lib/libcrypto.so.3

I traced the Zope process with ktrace(8).  There are a number of calls
to poll(2) and the SIGPROF signal handler (which resets itself,
apparently, as I see follow-up calls to gettimeofday(2) and
sigprocmask(2)).  These calls repeat.  I believe SIGPROF is used by the
threading implementation.

I attached to the Zope instance with GDB.  While it doesn't list any
threads (command "info threads"), GDB gives me the following backtrace:

(gdb) bt
#0  0x00000001601bd320 in _get_curthread () from /usr/lib/libc_r.so.5
#1  0x00000001601c1be4 in _thread_leave_cancellation_point () from
/usr/lib/libc_r.so.5
#2  0x00000001601b70e8 in select () from /usr/lib/libc_r.so.5
#3  0x0000000160ca4644 in ldap_int_select () from
/usr/local/lib/libldap_r-2.2.so.7
#4  0x0000000160c8c9a4 in wait4msg () from
/usr/local/lib/libldap_r-2.2.so.7
#5  0x0000000160c8c440 in ldap_result () from
/usr/local/lib/libldap_r-2.2.so.7
#6  0x0000000160c5ce50 in l_ldap_result2 () from
/usr/local/lib/python2.3/site-packages/_ldap.so
#7  0x00000001200cf9ac in PyCFunction_Call ()
#8  0x00000001200186f4 in PyObject_Call ()
#9  0x0000000120080228 in PyEval_GetFuncDesc ()
#10 0x000000012007c7a8 in PyEval_EvalCode ()
#11 0x000000012007dcb8 in PyEval_EvalCodeEx ()

> Could you please try to reproduce this problem without Zope? Maybe
> some small multi-threaded client app sending similar LDAP requests
> to the server?

I wish I knew enough Python to write a few test cases of my own.  I will
try.

Best wishes,
Matthew

-- 
"The challenge of a moral life is to do nothing that requires
forgiveness."  - Roger Ebert in his review of _The Woodsman_


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&opĚk
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic