Zope hangs during load (Panic!)
Hello, We have a strange and very irritating problem with our Zope/Plone-site, and I'd like to know where the problem is. It all started a couple of days ago when we were running Zope 2.6.4. An upgrade to version 2.7.0 did not solve it, which could mean that the problem is to be found in some of the Plone-products, couldn't it? First, I start Zope with the ./runzope-command. Debug-mode is off, max threads is 6. Proxy-routing and SSL via Apache2. FreeBSD 5.2.1 with Python 2.3.3 (WANT_HUGE_STACK_SIZE=1). Products: - Plone 2.0RC5 - CMF 1.4.2 - Epoz 0.7.4 - CMFMessage 1.1 - ZWiki 0.27.1 - Archetypes 1.2.3 - PortalTransforms 1.0.2 - CMFBoard 1.4.2 top-output (the command-column is always python): PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU 92459 zope 96 0 47348K 45152K select 0 0:12 0.00% 0.00% Then, I run a benchmark-test: # http_load -rate 5 -seconds 10 urls 2 fetches, 48 max parallel, 40332 bytes, in 10.7343 seconds 20166 mean bytes/connection 0.186319 fetches/sec, 3757.32 bytes/sec msecs/connect: 3.0435 mean, 5.481 max, 0.606 min msecs/first-response: 815.624 mean, 1172.58 max, 458.665 min HTTP response codes: code 200 -- 2 Now top-output looks like this: PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU 92459 zope 96 0 55668K 53768K select 0 0:15 1.22% 1.22% 92499 zope 96 0 55412K 53552K select 0 0:00 0.00% 0.00% 92500 zope 96 0 55668K 53604K select 0 0:00 0.00% 0.00% 92495 zope 96 0 52504K 50596K select 1 0:00 0.00% 0.00% 92498 zope 96 0 55180K 53128K select 0 0:00 0.00% 0.00% 92491 zope 96 0 49220K 47012K select 0 0:00 0.00% 0.00% 92493 zope 96 0 49220K 47144K select 0 0:00 0.00% 0.00% When I now try to access the zope-server via a webbrowser nothing happens, I just get a "Waiting for [hostname]...." until a time-out occures. Same benchmark-test: # http_load -rate 5 -seconds 10 urls 0 fetches, 50 max parallel, 0 bytes, in 10.4793 seconds 0 fetches/sec, 0 bytes/sec HTTP response codes: I stop the runzope-process with Ctrl-C. Top-output after this: PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU 92499 zope 96 0 55412K 53552K select 0 0:00 0.00% 0.00% 92495 zope 96 0 52504K 50596K select 1 0:00 0.00% 0.00% 92500 zope 96 0 55668K 53604K select 1 0:00 0.00% 0.00% 92498 zope 96 0 55180K 53128K select 0 0:00 0.00% 0.00% 92491 zope 96 0 49220K 47012K select 0 0:00 0.00% 0.00% 92493 zope 96 0 49220K 47144K select 1 0:00 0.00% 0.00% These processes must be killed with signal 9. The error-logs do not contain anything, nor does the runzope-program output anything strange. The same thing happens if I run zope in debug-mode. Please help! We need this server in production use, and if we can't get it to work we have to replace Zope with something else, and I don't know with what... Thanks in advance, -Petter-
Petter Holmström wrote:
Hello,
We have a strange and very irritating problem with our Zope/Plone-site, and I'd like to know where the problem is.
It all started a couple of days ago when we were running Zope 2.6.4. An upgrade to version 2.7.0 did not solve it, which could mean that the problem is to be found in some of the Plone-products, couldn't it?
<snip> Situation update, I ran the benchmark-tool on another Plone-site running on the same Zope-server - no problems at all. So I guess this is not a Zope-problem. Anyway, the problem remains. I'll repost the message to the Plone-list. -Petter-
Petter Holmström wrote at 2004-3-2 10:01 +0200:
... When I now try to access the zope-server via a webbrowser nothing happens, I just get a "Waiting for [hostname]...." until a time-out occures.
Use "gdb" and attach to the main process. Use "info threads", "thread <threadno>" and "backtrace" to learn about the various threads, select a thread and show where it is lingering. -- Dieter
Dieter Maurer wrote:
Use "gdb" and attach to the main process. Use "info threads", "thread <threadno>" and "backtrace" to learn about the various threads, select a thread and show where it is lingering.
OK, I first made the server freeze with the benchmark program. I then ran gdb with the following command: gdb python [PID-nr] info threads: ------------- (gdb) info threads 8 Process 9870, Thread 8 0x2812ce96 in _thread_kern_sched () from /usr/lib/libc_r.so.5 7 Process 9870, Thread 7 0x2812ce96 in _thread_kern_sched () from /usr/lib/libc_r.so.5 6 Process 9870, Thread 6 0x2812ce96 in _thread_kern_sched () from /usr/lib/libc_r.so.5 5 Process 9870, Thread 5 0x2812ce96 in _thread_kern_sched () from /usr/lib/libc_r.so.5 4 Process 9870, Thread 4 0x2812ce96 in _thread_kern_sched () from /usr/lib/libc_r.so.5 3 Process 9870, Thread 3 0x2812ce96 in _thread_kern_sched () from /usr/lib/libc_r.so.5 2 Process 9870, Thread 2 0x2812ce96 in _thread_kern_sched () from /usr/lib/libc_r.so.5 * 1 Process 9870, Thread 1 0x2826a2af in poll () from /lib/libc.so.5 (gdb) thread 1 thread 1 & backtrace: --------------------- (gdb) thread 1 [Switching to thread 1 (Process 9870, Thread 1)]#0 0x2826a2af in poll () from /lib/libc.so.5 (gdb) backtrace #0 0x2826a2af in poll () from /lib/libc.so.5 #1 0x2812da51 in _thread_kern_sched_state_unlock () from /usr/lib/libc_r.so.5 #2 0x2812d445 in _thread_kern_scheduler () from /usr/lib/libc_r.so.5 thread 2 & backtrace: --------------------- (gdb) thread 2 [Switching to thread 2 (Process 9870, Thread 2)]#0 0x2812ce96 in _thread_kern_sched () from /usr/lib/libc_r.so.5 (gdb) backtrace #0 0x2812ce96 in _thread_kern_sched () from /usr/lib/libc_r.so.5 #1 0x2812d608 in _thread_kern_sched_state () from /usr/lib/libc_r.so.5 #2 0x2812a216 in _read () from /usr/lib/libc_r.so.5 #3 0x282d5d01 in __sread () from /lib/libc.so.5 #4 0x282d5de6 in _sread () from /lib/libc.so.5 #5 0x282c2c48 in __srefill () from /lib/libc.so.5 #6 0x282bd65a in fread () from /lib/libc.so.5 #7 0x08062745 in Py_UniversalNewlineFread () #8 0x0806081a in PyFile_SetEncoding () #9 0x080d9d72 in PyCFunction_Call () #10 0x080a1345 in PyEval_GetFuncDesc () #11 0x0809f31f in PyEval_EvalCode () #12 0x080a150f in PyEval_GetFuncDesc () #13 0x080a13dc in PyEval_GetFuncDesc () #14 0x0809f31f in PyEval_EvalCode () #15 0x080a150f in PyEval_GetFuncDesc () #16 0x080a13dc in PyEval_GetFuncDesc () #17 0x0809f31f in PyEval_EvalCode () #18 0x080a028f in PyEval_EvalCodeEx () #19 0x080d9688 in PyFunction_SetClosure () #20 0x08059ca9 in PyObject_Call () #21 0x080a1a95 in PyEval_GetFuncDesc () #22 0x0809f3dc in PyEval_EvalCode () #23 0x080a028f in PyEval_EvalCodeEx () #24 0x080d9688 in PyFunction_SetClosure () #25 0x08059ca9 in PyObject_Call () #26 0x080a10f5 in PyEval_CallObjectWithKeywords () #27 0x284a2473 in callMethodWithPossibleHook () from /opt/Zope-2.7/lib/python/ExtensionClass.so #28 0x284a257d in call_PMethod () from /opt/Zope-2.7/lib/python/ExtensionClass.so #29 0x284a25e0 in PMethod_call () from /opt/Zope-2.7/lib/python/ExtensionClass.so #30 0x08059ca9 in PyObject_Call () #31 0x080a10f5 in PyEval_CallObjectWithKeywords () #32 0x284ea89d in CallMethodO () from /opt/Zope-2.7/lib/python/Acquisition.so #33 0x284ebdc9 in Wrapper_call () from /opt/Zope-2.7/lib/python/Acquisition.so #34 0x08059ca9 in PyObject_Call () #35 0x080a187d in PyEval_GetFuncDesc () #36 0x080a13fa in PyEval_GetFuncDesc () #37 0x0809f31f in PyEval_EvalCode () #38 0x080a028f in PyEval_EvalCodeEx () #39 0x080d9688 in PyFunction_SetClosure () #40 0x08059ca9 in PyObject_Call () #41 0x080a1a95 in PyEval_GetFuncDesc () #42 0x0809f3dc in PyEval_EvalCode () #43 0x080a028f in PyEval_EvalCodeEx () ---Type <return> to continue, or q <return> to quit--- #44 0x080d9688 in PyFunction_SetClosure () #45 0x08059ca9 in PyObject_Call () #46 0x080a10f5 in PyEval_CallObjectWithKeywords () #47 0x284a2473 in callMethodWithPossibleHook () from /opt/Zope-2.7/lib/python/ExtensionClass.so #48 0x284a257d in call_PMethod () from /opt/Zope-2.7/lib/python/ExtensionClass.so #49 0x284a25e0 in PMethod_call () from /opt/Zope-2.7/lib/python/ExtensionClass.so #50 0x08059ca9 in PyObject_Call () #51 0x080a187d in PyEval_GetFuncDesc () #52 0x080a13fa in PyEval_GetFuncDesc () #53 0x0809f31f in PyEval_EvalCode () #54 0x080a028f in PyEval_EvalCodeEx () #55 0x080d9688 in PyFunction_SetClosure () #56 0x08059ca9 in PyObject_Call () #57 0x080a10f5 in PyEval_CallObjectWithKeywords () #58 0x284a2473 in callMethodWithPossibleHook () from /opt/Zope-2.7/lib/python/ExtensionClass.so #59 0x284a257d in call_PMethod () from /opt/Zope-2.7/lib/python/ExtensionClass.so #60 0x284a25e0 in PMethod_call () from /opt/Zope-2.7/lib/python/ExtensionClass.so #61 0x08059ca9 in PyObject_Call () #62 0x080a187d in PyEval_GetFuncDesc () #63 0x080a13fa in PyEval_GetFuncDesc () #64 0x0809f31f in PyEval_EvalCode () #65 0x080a028f in PyEval_EvalCodeEx () #66 0x080d9688 in PyFunction_SetClosure () #67 0x08059ca9 in PyObject_Call () #68 0x080a10f5 in PyEval_CallObjectWithKeywords () #69 0x284a2473 in callMethodWithPossibleHook () from /opt/Zope-2.7/lib/python/ExtensionClass.so #70 0x284a257d in call_PMethod () from /opt/Zope-2.7/lib/python/ExtensionClass.so #71 0x284a25e0 in PMethod_call () from /opt/Zope-2.7/lib/python/ExtensionClass.so #72 0x08059ca9 in PyObject_Call () #73 0x080a187d in PyEval_GetFuncDesc () #74 0x080a13fa in PyEval_GetFuncDesc () #75 0x0809f31f in PyEval_EvalCode () #76 0x080a028f in PyEval_EvalCodeEx () #77 0x080a15a0 in PyEval_GetFuncDesc () #78 0x080a13dc in PyEval_GetFuncDesc () #79 0x0809f31f in PyEval_EvalCode () #80 0x080a150f in PyEval_GetFuncDesc () #81 0x080a13dc in PyEval_GetFuncDesc () #82 0x0809f31f in PyEval_EvalCode () #83 0x080a028f in PyEval_EvalCodeEx () #84 0x080a15a0 in PyEval_GetFuncDesc () #85 0x080a13dc in PyEval_GetFuncDesc () ---Type <return> to continue, or q <return> to quit--- #86 0x0809f31f in PyEval_EvalCode () #87 0x080a028f in PyEval_EvalCodeEx () #88 0x080d9688 in PyFunction_SetClosure () #89 0x08059ca9 in PyObject_Call () #90 0x0805f75b in PyMethod_New () #91 0x08059ca9 in PyObject_Call () #92 0x0805edc6 in _PyInstance_Lookup () #93 0x08059ca9 in PyObject_Call () #94 0x080a187d in PyEval_GetFuncDesc () #95 0x080a13fa in PyEval_GetFuncDesc () #96 0x0809f31f in PyEval_EvalCode () #97 0x080a028f in PyEval_EvalCodeEx () #98 0x080a15a0 in PyEval_GetFuncDesc () #99 0x080a13dc in PyEval_GetFuncDesc () #100 0x0809f31f in PyEval_EvalCode () #101 0x080a150f in PyEval_GetFuncDesc () #102 0x080a13dc in PyEval_GetFuncDesc () #103 0x0809f31f in PyEval_EvalCode () #104 0x080a150f in PyEval_GetFuncDesc () #105 0x080a13dc in PyEval_GetFuncDesc () #106 0x0809f31f in PyEval_EvalCode () #107 0x080a150f in PyEval_GetFuncDesc () #108 0x080a13dc in PyEval_GetFuncDesc () #109 0x0809f31f in PyEval_EvalCode () #110 0x080a150f in PyEval_GetFuncDesc () #111 0x080a13dc in PyEval_GetFuncDesc () #112 0x0809f31f in PyEval_EvalCode () #113 0x080a150f in PyEval_GetFuncDesc () #114 0x080a13dc in PyEval_GetFuncDesc () #115 0x0809f31f in PyEval_EvalCode () #116 0x080a150f in PyEval_GetFuncDesc () #117 0x080a13dc in PyEval_GetFuncDesc () #118 0x0809f31f in PyEval_EvalCode () #119 0x080a028f in PyEval_EvalCodeEx () #120 0x080a15a0 in PyEval_GetFuncDesc () #121 0x080a13dc in PyEval_GetFuncDesc () #122 0x0809f31f in PyEval_EvalCode () #123 0x080a150f in PyEval_GetFuncDesc () #124 0x080a13dc in PyEval_GetFuncDesc () #125 0x0809f31f in PyEval_EvalCode () #126 0x080a150f in PyEval_GetFuncDesc () #127 0x080a13dc in PyEval_GetFuncDesc () #128 0x0809f31f in PyEval_EvalCode () #129 0x080a150f in PyEval_GetFuncDesc () #130 0x080a13dc in PyEval_GetFuncDesc () ---Type <return> to continue, or q <return> to quit--- #131 0x0809f31f in PyEval_EvalCode () #132 0x080a150f in PyEval_GetFuncDesc () #133 0x080a13dc in PyEval_GetFuncDesc () #134 0x0809f31f in PyEval_EvalCode () #135 0x080a028f in PyEval_EvalCodeEx () #136 0x080d9688 in PyFunction_SetClosure () #137 0x08059ca9 in PyObject_Call () #138 0x0805f75b in PyMethod_New () #139 0x08059ca9 in PyObject_Call () #140 0x0805edc6 in _PyInstance_Lookup () #141 0x08059ca9 in PyObject_Call () #142 0x080a187d in PyEval_GetFuncDesc () #143 0x080a13fa in PyEval_GetFuncDesc () #144 0x0809f31f in PyEval_EvalCode () #145 0x080a028f in PyEval_EvalCodeEx () #146 0x080d9688 in PyFunction_SetClosure () #147 0x08059ca9 in PyObject_Call () #148 0x080a10f5 in PyEval_CallObjectWithKeywords () #149 0x284a2473 in callMethodWithPossibleHook () from /opt/Zope-2.7/lib/python/ExtensionClass.so #150 0x284a2780 in PMethod_call () from /opt/Zope-2.7/lib/python/ExtensionClass.so #151 0x08059ca9 in PyObject_Call () #152 0x080a187d in PyEval_GetFuncDesc () #153 0x080a13fa in PyEval_GetFuncDesc () #154 0x0809f31f in PyEval_EvalCode () #155 0x080a028f in PyEval_EvalCodeEx () #156 0x080d9688 in PyFunction_SetClosure () #157 0x08059ca9 in PyObject_Call () #158 0x080a10f5 in PyEval_CallObjectWithKeywords () #159 0x284a2473 in callMethodWithPossibleHook () from /opt/Zope-2.7/lib/python/ExtensionClass.so #160 0x284a257d in call_PMethod () from /opt/Zope-2.7/lib/python/ExtensionClass.so #161 0x284a25e0 in PMethod_call () from /opt/Zope-2.7/lib/python/ExtensionClass.so #162 0x08059ca9 in PyObject_Call () #163 0x080a187d in PyEval_GetFuncDesc () #164 0x080a13fa in PyEval_GetFuncDesc () #165 0x0809f31f in PyEval_EvalCode () #166 0x080a028f in PyEval_EvalCodeEx () #167 0x080d9688 in PyFunction_SetClosure () #168 0x08059ca9 in PyObject_Call () #169 0x080a10f5 in PyEval_CallObjectWithKeywords () #170 0x284a2473 in callMethodWithPossibleHook () from /opt/Zope-2.7/lib/python/ExtensionClass.so #171 0x284a257d in call_PMethod () from /opt/Zope-2.7/lib/python/ExtensionClass.so #172 0x284a25e0 in PMethod_call () from /opt/Zope-2.7/lib/python/ExtensionClass.so ---Type <return> to continue, or q <return> to quit--- #173 0x08059ca9 in PyObject_Call () #174 0x080a187d in PyEval_GetFuncDesc () #175 0x080a13fa in PyEval_GetFuncDesc () #176 0x0809f31f in PyEval_EvalCode () #177 0x080a028f in PyEval_EvalCodeEx () #178 0x080d9688 in PyFunction_SetClosure () #179 0x08059ca9 in PyObject_Call () #180 0x080a10f5 in PyEval_CallObjectWithKeywords () #181 0x284a2473 in callMethodWithPossibleHook () from /opt/Zope-2.7/lib/python/ExtensionClass.so #182 0x284a257d in call_PMethod () from /opt/Zope-2.7/lib/python/ExtensionClass.so #183 0x284a25e0 in PMethod_call () from /opt/Zope-2.7/lib/python/ExtensionClass.so #184 0x08059ca9 in PyObject_Call () #185 0x080a187d in PyEval_GetFuncDesc () #186 0x080a13fa in PyEval_GetFuncDesc () #187 0x0809f31f in PyEval_EvalCode () #188 0x080a028f in PyEval_EvalCodeEx () #189 0x080d9688 in PyFunction_SetClosure () #190 0x08059ca9 in PyObject_Call () #191 0x080a10f5 in PyEval_CallObjectWithKeywords () #192 0x284a2473 in callMethodWithPossibleHook () from /opt/Zope-2.7/lib/python/ExtensionClass.so #193 0x284a257d in call_PMethod () from /opt/Zope-2.7/lib/python/ExtensionClass.so #194 0x284a25e0 in PMethod_call () from /opt/Zope-2.7/lib/python/ExtensionClass.so #195 0x08059ca9 in PyObject_Call () #196 0x080a10f5 in PyEval_CallObjectWithKeywords () #197 0x284ea89d in CallMethodO () from /opt/Zope-2.7/lib/python/Acquisition.so #198 0x284ebdc9 in Wrapper_call () from /opt/Zope-2.7/lib/python/Acquisition.so #199 0x08059ca9 in PyObject_Call () #200 0x080a187d in PyEval_GetFuncDesc () #201 0x080a13fa in PyEval_GetFuncDesc () #202 0x0809f31f in PyEval_EvalCode () #203 0x080a028f in PyEval_EvalCodeEx () #204 0x080d9688 in PyFunction_SetClosure () #205 0x08059ca9 in PyObject_Call () #206 0x080a10f5 in PyEval_CallObjectWithKeywords () #207 0x284a2473 in callMethodWithPossibleHook () from /opt/Zope-2.7/lib/python/ExtensionClass.so #208 0x284a257d in call_PMethod () from /opt/Zope-2.7/lib/python/ExtensionClass.so #209 0x284a25e0 in PMethod_call () from /opt/Zope-2.7/lib/python/ExtensionClass.so #210 0x08059ca9 in PyObject_Call () #211 0x080a10f5 in PyEval_CallObjectWithKeywords () #212 0x284ea89d in CallMethodO () from /opt/Zope-2.7/lib/python/Acquisition.so #213 0x284ebdc9 in Wrapper_call () from /opt/Zope-2.7/lib/python/Acquisition.so #214 0x08059ca9 in PyObject_Call () ---Type <return> to continue, or q <return> to quit--- #215 0x080a10f5 in PyEval_CallObjectWithKeywords () #216 0x080960e9 in _PyUnicodeUCS4_IsAlpha () #217 0x080d9d72 in PyCFunction_Call () #218 0x080a1345 in PyEval_GetFuncDesc () #219 0x0809f31f in PyEval_EvalCode () #220 0x080a150f in PyEval_GetFuncDesc () #221 0x080a13dc in PyEval_GetFuncDesc () #222 0x0809f31f in PyEval_EvalCode () #223 0x080a028f in PyEval_EvalCodeEx () #224 0x080a15a0 in PyEval_GetFuncDesc () #225 0x080a13dc in PyEval_GetFuncDesc () #226 0x0809f31f in PyEval_EvalCode () #227 0x080a028f in PyEval_EvalCodeEx () #228 0x080a15a0 in PyEval_GetFuncDesc () #229 0x080a13dc in PyEval_GetFuncDesc () #230 0x0809f31f in PyEval_EvalCode () #231 0x080a028f in PyEval_EvalCodeEx () #232 0x080a15a0 in PyEval_GetFuncDesc () #233 0x080a13dc in PyEval_GetFuncDesc () #234 0x0809f31f in PyEval_EvalCode () #235 0x080a028f in PyEval_EvalCodeEx () #236 0x080a15a0 in PyEval_GetFuncDesc () #237 0x080a13dc in PyEval_GetFuncDesc () #238 0x0809f31f in PyEval_EvalCode () #239 0x080a028f in PyEval_EvalCodeEx () #240 0x080a15a0 in PyEval_GetFuncDesc () #241 0x080a13dc in PyEval_GetFuncDesc () #242 0x0809f31f in PyEval_EvalCode () #243 0x080a028f in PyEval_EvalCodeEx () #244 0x080d9688 in PyFunction_SetClosure () #245 0x08059ca9 in PyObject_Call () #246 0x0805f75b in PyMethod_New () #247 0x08059ca9 in PyObject_Call () #248 0x080a10f5 in PyEval_CallObjectWithKeywords () #249 0x0805b9fa in PyInstance_New () #250 0x08059ca9 in PyObject_Call () #251 0x080a10f5 in PyEval_CallObjectWithKeywords () #252 0x080c1b1b in _PyObject_GC_Del () #253 0x2812450e in _thread_start () from /usr/lib/libc_r.so.5 -Petter-
Petter Holmström wrote:
Dieter Maurer wrote:
Use "gdb" and attach to the main process. Use "info threads", "thread <threadno>" and "backtrace" to learn about the various threads, select a thread and show where it is lingering.
OK, I first made the server freeze with the benchmark program. I then ran gdb with the following command:
<snip> Problem solved (I think). I had two external methods that displayed the operating system's name and uptime in the colophon, and when I removed the calls to these the problem disapperaded. Now I can really torture the server with load without it hanging itself. Great! -Petter-
Petter Holmström wrote at 2004-3-3 08:54 +0200:
... OK, I first made the server freeze with the benchmark program. I then ran gdb with the following command:
gdb python [PID-nr] ... (gdb) thread 2 [Switching to thread 2 (Process 9870, Thread 2)]#0 0x2812ce96 in _thread_kern_sched () from /usr/lib/libc_r.so.5 (gdb) backtrace ... #7 0x08062745 in Py_UniversalNewlineFread () #8 0x0806081a in PyFile_SetEncoding ()
Your Python is stripped (it does not have symbol information). This is a very bad starting point for an analysis we are going to undertake. Generate Python from sources and do not strip the binary. I am also astonished that you are still using "libc.so.5". I had the impression that nowadays "libc.so.6" is installed everywhere. -- Dieter
Hello,
Your Python is stripped (it does not have symbol information). This is a very bad starting point for an analysis we are going to undertake.
As I've alrady said, the problem is already solved in a way. Some of my external methods caused it (why they did it I don't know), but if you still think this might be a bug in Zope I'll give you the backtrace with debug information. Python is installed from source (from the FreeBSD ports collection).
Generate Python from sources and do not strip the binary.
OK.
I am also astonished that you are still using "libc.so.5". I had the impression that nowadays "libc.so.6" is installed everywhere.
Well, appearently this isn't the case with FreeBSD and we're running the latest 5.2.1-release. Thanks anyway, -Petter-
Petter Holmström wrote:
As I've alrady said, the problem is already solved in a way. Some of my external methods caused it (why they did it I don't know), but if you still think this might be a bug in Zope I'll give you the backtrace with debug information.
I think it is caused by a read conflict. Did you get and set the lock correctly before calling the command line tools? Because you did set up locks around them. Didn't you ;-) Under high loads you can risk different request calling the same command line tools several times, which one gets the answer then? Normally Zope handles concurrency, but it is not able to with command line calls. You would need to do it something like (untested): ######################################## import os from threading import Lock l = Lock() def lockedPopen(command): l.acquire() try: result = os.popen(command).read() return result finally: l.release() # external method def doFileListing(self): return lockedPopen('ls') ######################################## regards Max M
Max M wrote:
Petter Holmström wrote:
As I've alrady said, the problem is already solved in a way. Some of my external methods caused it (why they did it I don't know), but if you still think this might be a bug in Zope I'll give you the backtrace with debug information.
I think it is caused by a read conflict. Did you get and set the lock correctly before calling the command line tools?
Because you did set up locks around them. Didn't you ;-)
I don't even know what a lock is. Where is it documented?
Under high loads you can risk different request calling the same command line tools several times, which one gets the answer then?
Normally Zope handles concurrency, but it is not able to with command line calls.
You would need to do it something like (untested):
<snip> OK, thanks. -Petter-
participants (3)
-
Dieter Maurer -
Max M -
Petter Holmström