You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by gr...@apache.org on 2006/10/08 09:24:25 UTC
svn commit: r454096 - /httpd/mod_python/trunk/src/mod_python.c
Author: grahamd
Date: Sun Oct 8 00:24:25 2006
New Revision: 454096
URL: http://svn.apache.org/viewvc?view=rev&rev=454096
Log:
(MODPYTHON-109) Amend comment relating to disabling of Python cleanup on
shutdown.
Modified:
httpd/mod_python/trunk/src/mod_python.c
Modified: httpd/mod_python/trunk/src/mod_python.c
URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/src/mod_python.c?view=diff&rev=454096&r1=454095&r2=454096
==============================================================================
--- httpd/mod_python/trunk/src/mod_python.c (original)
+++ httpd/mod_python/trunk/src/mod_python.c Sun Oct 8 00:24:25 2006
@@ -2620,16 +2620,14 @@
/*
* XXX Trying to cleanup Python on process shutdown causes
- * problems as the child memory pool is destroyed within the
- * context of a signal handler. If a request is still in the
- * process of being handled when the signal handler is
- * triggered the signal handler can block when trying to
- * acquire the Python GIL. The signal handler will therefore
- * never complete and thus Apache parent process is forced
- * to kill the child process with a SIGKILL. As well as this
- * it is also possible for the process simply to crash as
- * doing complex things in a signal handler is never a safe
- * thing to do anyway. Thus disable cleanup of Python when
+ * problems. This seems to mainly be an issue where there
+ * are user created threads which are running in parallel as
+ * the environment they are running in will be destroyed
+ * from underneath them potentially resulting in crashes,
+ * process hangs or simply Python errors. There is also a
+ * small chance that finalization code can be called within
+ * a signal handler in some configurations which could cause
+ * problems as well. Thus disable cleanup of Python when
* child processes are being shutdown. (MODPYTHON-109)
*
apr_pool_cleanup_register(p, NULL, python_finalize, apr_pool_cleanup_null);