I'm still seeing periodic/sporadic crashes of my Zope installation, and it's getting *REALLY* annoying :o) I sometimes get a core file (if I'm lucky) whose backtrace normally reads: Program terminated with signal 11, Segmentation fault. <snip> #0 0x401364fe in __select () from /lib/libc.so.6 (gdb) bt #0 0x401364fe in __select () from /lib/libc.so.6 #1 0x4031708c in __DTOR_END__ () from /usr/lib/libpq.so.2 #2 0x4030ecad in PQgetResult () from /usr/lib/libpq.so.2 #3 0x4030ee1c in PQexec () from /usr/lib/libpq.so.2 #4 0x402f9acb in curs_switch_autocommit () from /usr/lib/python2.1/site-packages/psycopgmodule.so #5 0x402fa0e8 in curs_switch_autocommit () from /usr/lib/python2.1/site-packages/psycopgmodule.so #6 0x8058d15 in PyEval_CallObjectWithKeywords () #7 0x805771a in PyEval_EvalCode () #8 0x8058fc7 in PyEval_CallObjectWithKeywords () #9 0x8058c08 in PyEval_CallObjectWithKeywords () #10 0x8058e9b in PyEval_CallObjectWithKeywords () #11 0x8058bf5 in PyEval_CallObjectWithKeywords () #12 0x8058aef in PyEval_CallObjectWithKeywords () #13 0x809a3c7 in _PyUnicode_IsAlpha () #14 0x8058d15 in PyEval_CallObjectWithKeywords () #15 0x805771a in PyEval_EvalCode () #16 0x8058fc7 in PyEval_CallObjectWithKeywords () #17 0x8058c08 in PyEval_CallObjectWithKeywords () #18 0x8058aef in PyEval_CallObjectWithKeywords () #19 0x402911b0 in callMethodWithPossibleHook (inst=0x8abe3f8, meth=0x878c5dc, args=0x86c8ed4, kw=0x0) at ././../Components/ExtensionClass/src/ExtensionClass.c:752 #20 0x4029128b in call_PMethod (self=0x8992b38, inst=0x8abe3f8, args=0x8870e04, kw=0x0) at ././../Components/ExtensionClass/src/ExtensionClass.c:779 #21 0x402912d6 in PMethod_call (self=0x8992b38, args=0x8870e04, kw=0x0) at ././../Components/ExtensionClass/src/ExtensionClass.c:789 #22 0x8058c55 in PyEval_CallObjectWithKeywords () #23 0x805935b in PyEval_CallObjectWithKeywords () #24 0x80577f0 in PyEval_EvalCode () #25 0x8058fc7 in PyEval_CallObjectWithKeywords () #26 0x8058c08 in PyEval_CallObjectWithKeywords () #27 0x8058aef in PyEval_CallObjectWithKeywords () #28 0x402911b0 in callMethodWithPossibleHook (inst=0x8abe3f8, meth=0x878c614, args=0x8a06b0c, kw=0x8964f54) at ././../Components/ExtensionClass/src/ExtensionClass.c:752 #29 0x4029128b in call_PMethod (self=0x8972348, inst=0x8abe3f8, args=0x80cc91c, kw=0x8964f54) at ././../Components/ExtensionClass/src/ExtensionClass.c:779 #30 0x402912d6 in PMethod_call (self=0x8972348, args=0x80cc91c, kw=0x8964f54) at ././../Components/ExtensionClass/src/ExtensionClass.c:789 #31 0x8058c55 in PyEval_CallObjectWithKeywords () #32 0x8058aef in PyEval_CallObjectWithKeywords () <etc down to 138> Note the depth of the call stack... Is this a problem with psycopg or Zope? Is anyone else seeing it? I'm unable to repro these consistently even under high load, which leads me to think there's an edge case coming into play here - but I don't know what. With -M logging turned on and using requestprofiler, I see: Hangs Hits Total Max Min Median Mean URL 2 6317 8161 I 0 1 1 /HDB 23 761 4815 I 0 3 6 /HDB/index_html 1 500 145 I 0 0 0 /HDB/showmachine_html <snip> 2 2 0 I I I 0 /Control_Panel Although interestingly, note the /Control_Panel entry - what the hell? Also, requestprofile has a bug, diff attached: 114c114 < self.method, self.url = string.split(string.strip(desc),' ',1) ---
self.method, self.url = string.split(string.strip(desc))
Those URLs can have spaces in them! Any ideas are much appreciated. Regards, Phil +------------------------------------------+ | Phil Mayers | | Network & Infrastructure Group | | Information & Communication Technologies | | Imperial College | +------------------------------------------+
On Wed, 2001-09-19 at 18:59, Mayers, Philip J wrote:
I'm still seeing periodic/sporadic crashes of my Zope installation, and it's getting *REALLY* annoying :o)
I sometimes get a core file (if I'm lucky) whose backtrace normally reads:
Program terminated with signal 11, Segmentation fault. <snip> #0 0x401364fe in __select () from /lib/libc.so.6 (gdb) bt #0 0x401364fe in __select () from /lib/libc.so.6 #1 0x4031708c in __DTOR_END__ () from /usr/lib/libpq.so.2 #2 0x4030ecad in PQgetResult () from /usr/lib/libpq.so.2 #3 0x4030ee1c in PQexec () from /usr/lib/libpq.so.2 #4 0x402f9acb in curs_switch_autocommit () from /usr/lib/python2.1/site-packages/psycopgmodule.so #5 0x402fa0e8 in curs_switch_autocommit () from /usr/lib/python2.1/site-packages/psycopgmodule.so
this is _strange_ because ZPsycopgDA *does* *not* support autocommit and there is no way to enable it while using psycopg with Zope. [snip]
#32 0x8058aef in PyEval_CallObjectWithKeywords () <etc down to 138>
Note the depth of the call stack...
noted.
Is this a problem with psycopg or Zope? Is anyone else seeing it? I'm unable to repro these consistently even under high load, which leads me to think there's an edge case coming into play here - but I don't know what. With -M logging turned on and using requestprofiler, I see:
sincerely i don't know. i am running some SQL Methods right now (with an --enble-devel compiled psycopg) and curs_switch_autocommit() does not get called. what version of zope/psycopg are you using? how have you compiled it? thank you for the report, federico -- Federico Di Gregorio MIXAD LIVE Chief of Research & Technology fog@mixadlive.com Debian GNU/Linux Developer & Italian Press Contact fog@debian.org 99.99999999999999999999% still isn't 100% but sometimes suffice. -- Me
Mayers, Philip J writes:
I'm still seeing periodic/sporadic crashes of my Zope installation, and it's getting *REALLY* annoying :o)
I sometimes get a core file (if I'm lucky) whose backtrace normally reads:
Program terminated with signal 11, Segmentation fault. <snip> #0 0x401364fe in __select () from /lib/libc.so.6 (gdb) bt #0 0x401364fe in __select () from /lib/libc.so.6 #1 0x4031708c in __DTOR_END__ () from /usr/lib/libpq.so.2 #2 0x4030ecad in PQgetResult () from /usr/lib/libpq.so.2 #3 0x4030ee1c in PQexec () from /usr/lib/libpq.so.2 #4 0x402f9acb in curs_switch_autocommit () from .... I would not believe this backtrace:
It is quite unlikely that the program gets a Segmentation fault in "select". I see only two possiblities. The first parameter, "n" (number of relevant file descriptors), is too high and your OS does not check for this (unlikely) or one of the "in/out" parameters "readfds", "writefds" and "exceptfds" is not properly allocated. However, Zope is a multi-threaded process. I have spent hours and days with misleading backtraces of the type above. I finally noticed that often the debugger was lying. It showed the backtrace of the main thread while the Segmentation Fault had been caused in a completely different thread. Furthermore, your program modules seem to be compile without debugging symbols. In this case, you do not see the correct funktions called but only the nearest global symbol above the current location. This may be very confusing. When you really want to track the problem down, compile everything with debugging information. Do not trust the association of signals with threads (often signals are assiciated with the main thread, not the one that caused them). Dieter
participants (3)
-
Dieter Maurer -
Federico Di Gregorio -
Mayers, Philip J