Re: [Zope-dev] Zope stops responding (Threads still present)

2002-06-09 Thread Dieter Maurer

Ahsan Imam writes:
 >Zope stops responding to requests, however when I check the zope
 > process I see seven threads plus watchdog thread. ( ps auxww | grep z2
 > ). I am not sure why it stops responding. 
I have seen this, too. But up to now only on Solaris.
You appear to run on Linux?

In my case, the problem disappeared almost completely, when I periodically
checked Zope for availability. I made the funny sentence: Zope does not
like to be lazy...

It might also be a resource problem: some scares resource (e.g. a
file descriptor) is not freed. If you are lucky, you may see
some entry in Zope's log file (search mailing list archives
for "STUPID_LOG_FILE") or it standard output/error (redirect them
to files).


Dieter


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Zope stops responding (Threads still present)

2002-06-07 Thread Leonardo Rochael Almeida

On Fri, 2002-06-07 at 16:36, Ahsan Imam wrote:
> Hello All,
> 
>Zope stops responding to requests, however when I check the zope
> process I see seven threads plus watchdog thread. ( ps auxww | grep z2
> ). I am not sure why it stops responding. 

Try to follow the debuging procedure outlined here.

http://zope.org/Members/4am/debugspinningzope

It helped me debug a double free problem in the python DBAPI of the
latest sqlrelay-0.33pre prerelease.

In my case, however, I had to adapt the recipe a little. Since the
trouble spot happened inside a place where the Pythons Great Interpreter
Lock was held, the PyRun_SimpleString() part would just freeze waiting
for the lock to be released. This is what I did

* back up your Data.fs (you can do it anytime, even with Zope running,
even with it frozen under gdb). This is important since releasing the
GIL could cause severe memory corruption (and possibly Data.fs
corruption).

inside gdb, before calling PyRun_SimpleString(), type:
'call PyEval_ReleaseLock()'
(without the quotes).

this might cause an immediate segfault (SIG11), but the process should
still be there inside gdb, so you may now call PyRun_SimpleString() and
it should work. You should probably kill the process after that. Let it
R.I.P. after so much torture :-)

But only do the routine above if calling PyRun_SimpleString() as
mentioned in that page results in a freeze.

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Zope stops responding (Threads still present)

2002-06-07 Thread Ahsan Imam

Hello All,

   Zope stops responding to requests, however when I check the zope
process I see seven threads plus watchdog thread. ( ps auxww | grep z2
). I am not sure why it stops responding. 

Actions taken to diagnose the problem:

1) I added the -M option and started logging to the debug file.
2) I am using the requestprofiler.py script to see which request in
particular causes the problem (hangs).
Everytime the request seems to be different. I make the same request and
it runs without hanging zope. So I cannot duplicate the problem.

I backup the Zodb every night and I have modified the stop script. I
first kill the watchdog pid then I do a wget on
http://$ZOPE_AUTH@$ZOPE_HOSTNAME:$ZSERVER_PORT/Control_Panel/manage_shutdown.
Could this method of stopping zope be the cause?

Also there are no core dumps.


System Info
RedHat 7.2
Zope 2.5.0
Python 2.1.3

Thanks
Ahsan Imam


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )