[ZCM] [ZC] 2305/ 2 Edit "Unhandled exception in asynchat can take the entire Zope system down"
"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Sat, 14 Apr 2007 02:27:31 -0400
| Newsgroups | gmane.comp.web.zope.devel.collector-monitor |
|---|---|
| Message-ID | <[email protected]> |
Issue #2305 Update (Edit) "Unhandled exception in asynchat can take the entire Zope system down"
Status Pending, Zope/bug medium
To followup, visit:
http://www.zope.org/Collectors/Zope/2305
==============================================================
= Edit - Entry #2 by ajung on Apr 14, 2007 2:27 am
Changes: submitter email, importance (critical => medium)
________________________________________
= Request - Entry #1 by teyc on Apr 4, 2007 9:23 pm
line 420 of asyncore's error handler calls close()
this calls producer's more() method.
sometimes producers can throw exceptions (in my case, reading from UNC path fails with IOError 22 when the system doesn't have sufficient resources), and this is not caught, bringing down the entire system.
The net result is the entire process comes down.
Traceback (most recent call last):
File "c:\dw304\lib\python\Zope\Startup\run.py", line 52, in ?
run()
File "c:\dw304\lib\python\Zope\Startup\run.py", line 21, in run
start_zope(opts.configroot)
File "c:\dw304\lib\python\Zope\Startup\__init__.py", line 68, in start_zope
Lifetime.loop()
File "c:\dw304\lib\python\Lifetime.py", line 43, in loop
lifetime_loop()
File "c:\dw304\lib\python\Lifetime.py", line 70, in lifetime_loop
asyncore.poll(timeout, map)
File "c:\dw304\bin\lib\asyncore.py", line 125, in poll
write(obj)
File "c:\dw304\bin\lib\asyncore.py", line 81, in write
obj.handle_error()
File "c:\dw304\lib\python\ZServer\medusa\http_server.py", line 445, in handle_error
asynchat.async_chat.handle_error (self)
File "c:\dw304\bin\lib\asyncore.py", line 420, in handle_error
self.close()
File "c:\dw304\lib\python\ZServer\HTTPServer.py", line 350, in close
p.more() # free up resources held by producer
File "c:\dw304\lib\python\ZServer\Producers.py", line 107, in more
return self.iterator.next()
File "C:\DW304\DW30500\lib\python\DataWrks\Iterators.py", line 71, in next
data = self._iterator.next() # throws StopIteration
File "c:\dw304\lib\python\ZPublisher\Iterators.py", line 43, in next
raise IOError(22, '')
IOError: (22, '')
if we don't want to patch asyncore, then HTTPServer should catch the error.
==============================================================