finding the reason why my Zope crashes
Hi, I have some trouble with my zope test server. I am trying to decide whether to use Silva or Plone, but with both products, my Zope site crashes reproduceable. (in both products while adding a site). I use Zope Version (Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, freebsd4) Python Version 2.1.3 (#2, Oct 1 2002, 17:24:12) [GCC 2.95.3 20010315 (release) [FreeBSD]] System Platform freebsd4 SOFTWARE_HOME /usr/local/zope/zope/lib/python On FreeBSD 4.5 RELEASE. (Zope is running behind Apache with PCGI. It is started through zopectl). I've tried "Debug a spinning Zope" (http://www.zope.org/Members/4am/debugspinningzope). But as soon as I try *anything* after attaching the gdb to zope, it just stops, and even gdb seems to be confused: (gdb) quit The program is running. Quit anyway (and detach it)? (y or n) y Detaching from program: /usr/bin/python2.1, process 13429, thread 1 ptrace: No such process. (gdb) (the only way to quit my debuggin session is to kill it (!!)) I can not find any traces of the crash in Zope log files, only this line in /var/log/messages: Oct 8 15:52:21 zopetest /kernel: pid 13429 (python), uid 25933: exited on signal 11 Does anyone have tips on finding what is wrong here? -- __________________________________________________ "Nothing is as subjective as reality" Reinoud van Leeuwen reinoud.v@n.leeuwen.net http://www.xs4all.nl/~reinoud __________________________________________________
On Tue, Oct 08, 2002 at 04:05:30PM +0200, Reinoud van Leeuwen wrote:
Hi,
I have some trouble with my zope test server. I am trying to decide whether to use Silva or Plone, but with both products, my Zope site crashes reproduceable. (in both products while adding a site).
I use Zope Version (Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, freebsd4) Python Version 2.1.3 (#2, Oct 1 2002, 17:24:12) [GCC 2.95.3 20010315 (release) [FreeBSD]] System Platform freebsd4 SOFTWARE_HOME /usr/local/zope/zope/lib/python
On FreeBSD 4.5 RELEASE.
(Zope is running behind Apache with PCGI. It is started through zopectl).
I've tried "Debug a spinning Zope" (http://www.zope.org/Members/4am/debugspinningzope). But as soon as I try *anything* after attaching the gdb to zope, it just stops, and even gdb seems to be confused:
ok, after some more RTFMing I get [Switching to process 15928, thread 3] Program received signal SIGSEGV, Segmentation fault. 0x8063045 in vgetargs1 (args=0x927e4cc, format=0x80ac79b "O:len", p_va=0xbfaef168, compat=0) at Python/getargs.c:70 70 } Is this a python bug? -- __________________________________________________ "Nothing is as subjective as reality" Reinoud van Leeuwen reinoud.v@n.leeuwen.net http://www.xs4all.nl/~reinoud __________________________________________________
On Tue, Oct 08, 2002 at 04:05:30PM +0200, Reinoud van Leeuwen wrote:
Hi,
I have some trouble with my zope test server. I am trying to decide whether to use Silva or Plone, but with both products, my Zope site crashes reproduceable. (in both products while adding a site).
I use Zope Version (Zope 2.5.1 (source release, python 2.1, linux2), python 2.1.3, freebsd4) Python Version 2.1.3 (#2, Oct 1 2002, 17:24:12) [GCC 2.95.3 20010315 (release) [FreeBSD]] System Platform freebsd4 SOFTWARE_HOME /usr/local/zope/zope/lib/python
On FreeBSD 4.5 RELEASE.
Found it (thanx Thomas)! It was caused by the FreeBSD thread stack size problem. Since not all descriptions on the web are too clear about it, I will describe how to fix it here as well (note: this is only neccessary if you build Python on FreeBSD by hand. I think the version from the ports has a fix) after downloading and unpacking the Python source (2.1.3), run ./configure --prefix=/usr change the file Python/thread_pthread.h. Here is a diff from the original: *** 128,144 **** { pthread_t th; int success; #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED pthread_attr_t attrs; #endif dprintf(("PyThread_start_new_thread called\n")); if (!initialized) PyThread_init_thread(); #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED pthread_attr_init(&attrs); pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM); #endif - success = pthread_create(&th, #if defined(PY_PTHREAD_D4) pthread_attr_default, --- 128,147 ---- { pthread_t th; int success; + pthread_attr_t pta; #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED pthread_attr_t attrs; #endif + pthread_attr_init(&pta); + pthread_attr_setstacksize(&pta, (1<<17)); dprintf(("PyThread_start_new_thread called\n")); if (!initialized) PyThread_init_thread(); #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED pthread_attr_init(&attrs); pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM); + pthread_attr_setstacksize(&attrs, (1<<17)); #endif success = pthread_create(&th, #if defined(PY_PTHREAD_D4) pthread_attr_default, *************** (the new version is the bottom one!) -- __________________________________________________ "Nothing is as subjective as reality" Reinoud van Leeuwen reinoud.v@n.leeuwen.net http://www.xs4all.nl/~reinoud __________________________________________________
participants (1)
-
Reinoud van Leeuwen