Affects Version/s: 3.3.1
Fix Version/s: None
Windows XP SP3, using Apache 2.2, Python 2.5.2
Ubuntu 7.10, using Apache 2.2, Python 2.5.2
When the logging module is passed the Apache req object as a handler, and the req object is never removed, subsequent calls to logging crash mod_python and Apache. I expected the page to display a Traceback instead.
This code demonstrates the crash:
Reliably crash server (on 2nd page access)
Open as: http://server/index.py/testCrash
handler = logging.StreamHandler(req)
logging.getLogger('').addHandler( handler )
#removing this line will cause an apache crash on the
- second web page access
This code clearly has a bug if that last line is indeed commented out (causing Apache to crash), but crashing is an unhelpful way of notifying the user of that.