[Zope-dev] Zope threads on 2.7.0, python 2.3.3

Heimo Laukkanen huima at iki.fi
Tue May 25 15:46:50 EDT 2004


On Tue, 25 May 2004 20:21:21 +0200, Dieter Maurer <dieter at handshake.de>  
wrote:

> I would be surprised...
>
> What does "Control_Panel --> Debug information" tells you
> about the use of your connections (at the bottom of the page)?

At the moment it said that only one opened connection and others were  
none. I have no terminal access to the machines at the moment to check how  
threads are behing at the moment.

However I did try to look at the processes with gdb - however I need to do  
more reading on gdb manual to provide more info beyond just backtrace on  
the process status. I'm not familiar on Python internals so any pointers  
on what to expect or what not to expect would be appreciated.

Below is first output from ps -auxfww | grep portaali where portaali is  
the name of the user who owns the processes.

Below we will see that each thread has started at the same time - but  
thread with pid 14553 has done most of the work. And while putting more  
load and looking at top - that is also the only thread that gets any  
percentage of process time. I have no information on when this has  
happened since event log does not tell anything peculiar.

portaali 14530  0.0  0.2  6116 4432 ?        S    12:12   0:00  
/opt/portaali/ContentManagement-1.0/python-2.3.3/bin/python /opt/portaali/
ContentManagement-1.0/zope-2.7.0/lib/python/zdaemon/zdrun.py -S  
/opt/portaali/ContentManagement-1.0/zope-2.7.0/lib/python/Zope/Startup/
zopeschema.xml -b 10 -d -f -s  
/usr/local/portaali/zope_instance/var/zopectlsock -x 0,2 -z  
/usr/local/portaali/zope_instance  
/usr/local/portaali/zope_instance/bin/runzope
portaali 14531  0.2 16.6 365220 345168 ?     S    12:12   0:46  \_  
/opt/portaali/ContentManagement-1.0/python-2.3.3/bin/python /opt/
portaali/ContentManagement-1.0/zope-2.7.0/lib/python/Zope/Startup/run.py  
-C /usr/local/portaali/zope_instance/etc/zope.conf
portaali 14532  0.0 16.6 365220 345168 ?     S    12:12   0:00      \_  
/opt/portaali/ContentManagement-1.0/python-2.3.3/bin/python /opt/
portaali/ContentManagement-1.0/zope-2.7.0/lib/python/Zope/Startup/run.py  
-C /usr/local/portaali/zope_instance/etc/zope.conf
portaali 14553 13.0 16.6 365220 345168 ?     S    12:12  34:40 \_  
/opt/portaali/ContentManagement-1.0/python-2.3.3/bin/python /opt/
portaali/ContentManagement-1.0/zope-2.7.0/lib/python/Zope/Startup/run.py  
-C /usr/local/portaali/zope_instance/etc/zope.conf
portaali 14552  0.1 16.6 365220 345168 ?     S    12:12   0:18 \_  
/opt/portaali/ContentManagement-1.0/python-2.3.3/bin/python /opt/
portaali/ContentManagement-1.0/zope-2.7.0/lib/python/Zope/Startup/run.py  
-C /usr/local/portaali/zope_instance/etc/zope.conf
portaali 14548  0.8 16.6 365220 345168 ?     S    12:12   2:16 \_  
/opt/portaali/ContentManagement-1.0/python-2.3.3/bin/python /opt/
portaali/ContentManagement-1.0/zope-2.7.0/lib/python/Zope/Startup/run.py  
-C /usr/local/portaali/zope_instance/etc/zope.conf
portaali 14545  0.1 16.6 365220 345168 ?     S    12:12   0:17 \_  
/opt/portaali/ContentManagement-1.0/python-2.3.3/bin/python /opt/
portaali/ContentManagement-1.0/zope-2.7.0/lib/python/Zope/Startup/run.py  
-C /usr/local/portaali/zope_instance/etc/zope.conf
portaali 14547  0.2 16.6 365220 345168 ?     S    12:12   0:36 \_  
/opt/portaali/ContentManagement-1.0/python-2.3.3/bin/python /opt/
portaali/ContentManagement-1.0/zope-2.7.0/lib/python/Zope/Startup/run.py  
-C /usr/local/portaali/zope_instance/etc/zope.conf

And then backtrace with gdb from those quiet threads

~# gdb program 14552
backtrace

#0  0x4007b87e in sigsuspend () from /lib/libc.so.6
#1  0x4001e879 in __pthread_wait_for_restart_signal () from  
/lib/libpthread.so.0
#2  0x4001fee1 in sem_wait@@GLIBC_2.1 () from /lib/libpthread.so.0
#3  0x080c4830 in PyThread_acquire_lock (lock=0x861a908, waitflag=1) at  
Python/thread_pthread.h:406
#4  0x080c76c8 in lock_PyThread_acquire_lock (self=0x417c4840,  
args=0x4017002c) at ./Modules/threadmodule.c:63
#5  0x080e0e3f in PyCFunction_Call (func=0x41c7c7cc, arg=0x4017002c,  
kw=0x0) at Objects/methodobject.c:73
#6  0x080a3beb in call_function (pp_stack=0xbe7fb904, oparg=0) at  
Python/ceval.c:3439
#7  0x080a22f6 in eval_frame (f=0x9b5ea24) at Python/ceval.c:2116
#8  0x080a31e2 in PyEval_EvalCodeEx (co=0x40442c20, globals=0x40445acc,  
locals=0x0, args=0x8bdb024, argcount=1,
     kws=0x8bdb028, kwcount=1, defs=0x4047eb18, defcount=5, closure=0x0) at  
Python/ceval.c:2663
#9  0x080a55ec in fast_function (func=0x404a9924, pp_stack=0xbe7fba94,  
n=3, na=1, nk=1) at Python/ceval.c:3529
#10 0x080a3c71 in call_function (pp_stack=0xbe7fba94, oparg=256) at  
Python/ceval.c:3458

Another thread ( 14548 )


#0  0x401153c4 in read () from /lib/libc.so.6
#1  0x40029ae0 in __DTOR_END__ () from /lib/libpthread.so.0
#2  0x412474f0 in nttrd () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#3  0x410fdcf8 in nsprecv () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#4  0x41101ac5 in nsrdr () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#5  0x410e7e11 in nsdo () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#6  0x41178b1c in nioqrc () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#7  0x412a2270 in ttcdrv () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#8  0x4117f648 in nioqwa () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#9  0x40fd64c0 in upirtrc () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#10 0x40f98aca in kpurcsc () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#11 0x40f5b2b4 in kpuexecv8 () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#12 0x40f5ce87 in kpuexec () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#13 0x40fbab1f in OCIStmtExecute () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#14 0x40e13631 in Cursor_execute (self=0x4216fcd0, args=0x4017002c) at  
src/dco2.c:3740
#15 0x080e0e3f in PyCFunction_Call (func=0x4491352c, arg=0x4017002c,  
kw=0x0) at Objects/methodobject.c:73
#16 0x080a3beb in call_function (pp_stack=0xbeffb264, oparg=0) at  
Python/ceval.c:3439
#17 0x080a22f6 in eval_frame (f=0xc4fa514) at Python/ceval.c:2116
#18 0x080a31e2 in PyEval_EvalCodeEx (co=0x40de8d20, globals=0x40de18ac,  
locals=0x0, args=0xc1d8488, argcount=2,
     kws=0xc1d8490, kwcount=0, defs=0x40dedb18, defcount=1, closure=0x0) at  
Python/ceval.c:2663


  PID: 14547

#0  0x401153c4 in read () from /lib/libc.so.6
#1  0x40029ae0 in __DTOR_END__ () from /lib/libpthread.so.0
#2  0x412474f0 in nttrd () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#3  0x410fdcf8 in nsprecv () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#4  0x41101ac5 in nsrdr () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#5  0x410e7e11 in nsdo () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#6  0x41178b1c in nioqrc () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#7  0x412a2270 in ttcdrv () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#8  0x4117f648 in nioqwa () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#9  0x40fd64c0 in upirtrc () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#10 0x40f98aca in kpurcsc () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#11 0x40f5b2b4 in kpuexecv8 () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#12 0x40f5ce87 in kpuexec () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#13 0x40fbab1f in OCIStmtExecute () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#14 0x40e13631 in Cursor_execute (self=0x890e468, args=0x4017002c) at  
src/dco2.c:3740
#15 0x080e0e3f in PyCFunction_Call (func=0x422f054c, arg=0x4017002c,  
kw=0x0) at Objects/methodobject.c:73
#16 0x080a3beb in call_function (pp_stack=0xbf1fce14, oparg=0) at  
Python/ceval.c:3439
#17 0x080a22f6 in eval_frame (f=0xc2de974) at Python/ceval.c:2116
#18 0x080a31e2 in PyEval_EvalCodeEx (co=0x40de8d20, globals=0x40de18ac,  
locals=0x0, args=0xc1cf880, argcount=2,
     kws=0xc1cf888, kwcount=0, defs=0x40dedb18, defcount=1, closure=0x0) at  
Python/ceval.c:2663


PID: 14545

#0  0x401153c4 in read () from /lib/libc.so.6
#1  0x40029ae0 in __DTOR_END__ () from /lib/libpthread.so.0
#2  0x412474f0 in nttrd () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#3  0x410fdcf8 in nsprecv () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#4  0x41101ac5 in nsrdr () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#5  0x410e7e11 in nsdo () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#6  0x41178b1c in nioqrc () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#7  0x412a2270 in ttcdrv () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#8  0x4117f648 in nioqwa () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#9  0x40fd64c0 in upirtrc () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#10 0x40f98aca in kpurcsc () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#11 0x40f5b2b4 in kpuexecv8 () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#12 0x40f5ce87 in kpuexec () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#13 0x40fbab1f in OCIStmtExecute () from  
/opt/portaali/comp/oracle/lib/libclntsh.so.9.0
#14 0x40e13631 in Cursor_execute (self=0x42141cf8, args=0x4017002c) at  
src/dco2.c:3740
#15 0x080e0e3f in PyCFunction_Call (func=0x4226742c, arg=0x4017002c,  
kw=0x0) at Objects/methodobject.c:73
#16 0x080a3beb in call_function (pp_stack=0xbf5fb264, oparg=0) at  
Python/ceval.c:3439
#17 0x080a22f6 in eval_frame (f=0x4805567c) at Python/ceval.c:2116
#18 0x080a31e2 in PyEval_EvalCodeEx (co=0x40de8d20, globals=0x40de18ac,  
locals=0x0, args=0xbc322b8, argcount=2,
     kws=0xbc322c0, kwcount=0, defs=0x40dedb18, defcount=1, closure=0x0) at  
Python/ceval.c:2663


PID: 14531

#0  0x4011c7ee in select () from /lib/libc.so.6
#1  0x40568cb4 in __DTOR_END__ () from  
/opt/portaali/ContentManagement-1.0/python-2.3.3/lib/python2.3/lib-dynload/select.so
#2  0x080e0e3f in PyCFunction_Call (func=0x4049636c, arg=0x426476e4,  
kw=0x0) at Objects/methodobject.c:73
#3  0x080a3beb in call_function (pp_stack=0xbffff11c, oparg=4) at  
Python/ceval.c:3439
#4  0x080a22f6 in eval_frame (f=0x9033f64) at Python/ceval.c:2116
#5  0x080a31e2 in PyEval_EvalCodeEx (co=0x40528320, globals=0x404af3e4,  
locals=0x0, args=0x831dda4, argcount=2,
     kws=0x831ddac, kwcount=0, defs=0x405292d8, defcount=2, closure=0x0) at  
Python/ceval.c:2663
#6  0x080a55ec in fast_function (func=0x404b6b1c, pp_stack=0xbffff2ac,  
n=2, na=2, nk=0) at Python/ceval.c:3529
#7  0x080a3c71 in call_function (pp_stack=0xbffff2ac, oparg=2) at  
Python/ceval.c:3458
#8  0x080a22f6 in eval_frame (f=0x831dc4c) at Python/ceval.c:2116
#9  0x080a558f in fast_function (func=0x409ca534, pp_stack=0xbffff3cc,  
n=0, na=0, nk=0) at Python/ceval.c:3518
#10 0x080a3c71 in call_function (pp_stack=0xbffff3cc, oparg=0) at  
Python/ceval.c:3458
#11 0x080a22f6 in eval_frame (f=0x81eaef4) at Python/ceval.c:2116
#12 0x080a558f in fast_function (func=0x409ca4fc, pp_stack=0xbffff4ec,  
n=0, na=0, nk=0) at Python/ceval.c:3518
#13 0x080a3c71 in call_function (pp_stack=0xbffff4ec, oparg=0) at  
Python/ceval.c:3458
#14 0x080a22f6 in eval_frame (f=0x815526c) at Python/ceval.c:2116
#15 0x080a558f in fast_function (func=0x401e410c, pp_stack=0xbffff60c,  
n=1, na=1, nk=0) at Python/ceval.c:3518
#16 0x080a3c71 in call_function (pp_stack=0xbffff60c, oparg=1) at  
Python/ceval.c:3458
#17 0x080a22f6 in eval_frame (f=0x8173884) at Python/ceval.c:2116
#18 0x080a558f in fast_function (func=0x401bc3e4, pp_stack=0xbffff72c,  
n=0, na=0, nk=0) at Python/ceval.c:3518
#19 0x080a3c71 in call_function (pp_stack=0xbffff72c, oparg=0) at  
Python/ceval.c:3458




-- 
-huima




More information about the Zope-Dev mailing list