[Zope-dev] freezing your Zope for fun and profit thru the monitor port

Leonardo Rochael Almeida leo@hiper.com.br
08 Feb 2002 01:27:42 -0200


Hi,

Well, using the monitor port to do nasty things to Zope isn't really
rocket science, but here is an unexpected result:

rockman:/opt/zope/243-xuf# python2.1 ZServer/medusa/monitor_client.py localhost  8099
[... some messages and copyright notices later ...]
Welcome to <secure_monitor_channel connected 127.0.0.1:49470 at 80c0fe4>
>>> import Zope, ZPublisher, pdb
>>> pdb.run("ZPublisher.Zope('')")
rockman:/opt/zope/243-xuf# 

When you try to do anything under pdb over the monitor port and it will
result in the same situation: Zope CPU use goes thru the roof and it
freezes. It accepts connections thru whatever network ports are open but
never aswer any of them. This happens with versions 2.4.3 and 2.5.0,
that I've tested. Probably in all the others too.

What is going on and why can't we run pdb thru the monitor port?

I ask this because I'm seeing a similar behaviour hapenning randomly but
occasionally (every couple of weeks, actualy) to another Zope. It
freezes, accepting connections but never answering any of them.

Actually, this case is a little bit different, in which a non-HTTP
request to port 8080 returns an error imediatelly from medusa, but
anything that requires calling into zope just hangs there, waiting for
an answer.

Having pdb working thru the monitor port would be great, in order to
discover where Zope requests are hanging, however just having a python
traceback of what all the threads are doing would be very nice already.

	Cheers, Leo