[mod_wsgi] add possible fix for daemon mode crash (#831701)

jorton jorton at fedoraproject.org
Wed Jun 13 15:49:20 UTC 2012


commit 4851791634631852c3656f556c1a17f351623585
Author: Joe Orton <jorton at redhat.com>
Date:   Wed Jun 13 16:49:16 2012 +0100

    add possible fix for daemon mode crash (#831701)
    
    Resolves: rhbz#831701

 mod_wsgi-3.3-httpd24.patch |   27 +++++++++++++++++++--------
 mod_wsgi.spec              |    5 ++++-
 2 files changed, 23 insertions(+), 9 deletions(-)
---
diff --git a/mod_wsgi-3.3-httpd24.patch b/mod_wsgi-3.3-httpd24.patch
index 1e9a8b4..f0f3a2f 100644
--- a/mod_wsgi-3.3-httpd24.patch
+++ b/mod_wsgi-3.3-httpd24.patch
@@ -84,7 +84,18 @@ diff -r 21f4dac5959a -r 8906fb52b6b2 mod_wsgi/mod_wsgi.c
  {
      int i;
      apr_status_t rv;
-@@ -12739,8 +12756,13 @@ static int wsgi_hook_daemon_handler(conn
+@@ -11008,8 +11025,9 @@ static int wsgi_start_process(apr_pool_t
+          * shared memory segments or memory mapped files not
+          * available to code in daemon processes.
+          */
+-
++#if !AP_MODULE_MAGIC_AT_LEAST(20071023, 0)
+         ap_cleanup_scoreboard(0);
++#endif
+ 
+         /*
+          * Wipe out random value used in magic token so that not
+@@ -12739,8 +12757,13 @@ static int wsgi_hook_daemon_handler(conn
       * file for the host.
       */
  
@@ -98,7 +109,7 @@ diff -r 21f4dac5959a -r 8906fb52b6b2 mod_wsgi/mod_wsgi.c
  
      key = apr_psprintf(p, "%s|%s",
                         apr_table_get(r->subprocess_env,
-@@ -13259,6 +13281,18 @@ static PyObject *Auth_environ(AuthObject
+@@ -13259,6 +13282,18 @@ static PyObject *Auth_environ(AuthObject
          Py_DECREF(object);
      }
  
@@ -117,7 +128,7 @@ diff -r 21f4dac5959a -r 8906fb52b6b2 mod_wsgi/mod_wsgi.c
      if (c->remote_ip) {
          value = c->remote_ip;
  #if PY_MAJOR_VERSION >= 3
-@@ -13269,6 +13303,7 @@ static PyObject *Auth_environ(AuthObject
+@@ -13269,6 +13304,7 @@ static PyObject *Auth_environ(AuthObject
          PyDict_SetItemString(vars, "REMOTE_ADDR", object);
          Py_DECREF(object);
      }
@@ -125,7 +136,7 @@ diff -r 21f4dac5959a -r 8906fb52b6b2 mod_wsgi/mod_wsgi.c
  
  #if PY_MAJOR_VERSION >= 3
      value = ap_document_root(r);
-@@ -13292,6 +13327,17 @@ static PyObject *Auth_environ(AuthObject
+@@ -13292,6 +13328,17 @@ static PyObject *Auth_environ(AuthObject
          Py_DECREF(object);
      }
  
@@ -143,7 +154,7 @@ diff -r 21f4dac5959a -r 8906fb52b6b2 mod_wsgi/mod_wsgi.c
      rport = c->remote_addr->port;
      value = apr_itoa(r->pool, rport);
  #if PY_MAJOR_VERSION >= 3
-@@ -13301,6 +13347,7 @@ static PyObject *Auth_environ(AuthObject
+@@ -13301,6 +13348,7 @@ static PyObject *Auth_environ(AuthObject
  #endif
      PyDict_SetItemString(vars, "REMOTE_PORT", object);
      Py_DECREF(object);
@@ -151,7 +162,7 @@ diff -r 21f4dac5959a -r 8906fb52b6b2 mod_wsgi/mod_wsgi.c
  
      value = r->protocol;
  #if PY_MAJOR_VERSION >= 3
-@@ -14391,8 +14438,13 @@ static int wsgi_hook_access_checker(requ
+@@ -14391,8 +14439,13 @@ static int wsgi_hook_access_checker(requ
      host = ap_get_remote_host(r->connection, r->per_dir_config,
                                REMOTE_HOST, NULL);
  
@@ -165,7 +176,7 @@ diff -r 21f4dac5959a -r 8906fb52b6b2 mod_wsgi/mod_wsgi.c
  
      allow = wsgi_allow_access(r, config, host);
  
-@@ -14645,8 +14697,14 @@ static int wsgi_hook_check_user_id(reque
+@@ -14645,8 +14698,14 @@ static int wsgi_hook_check_user_id(reque
  
  #if defined(MOD_WSGI_WITH_AUTHZ_PROVIDER)
  
@@ -180,7 +191,7 @@ diff -r 21f4dac5959a -r 8906fb52b6b2 mod_wsgi/mod_wsgi.c
  {
      WSGIRequestConfig *config;
  
-@@ -14695,6 +14753,9 @@ static authz_status wsgi_check_authoriza
+@@ -14695,6 +14754,9 @@ static authz_status wsgi_check_authoriza
  static const authz_provider wsgi_authz_provider =
  {
      &wsgi_check_authorization,
diff --git a/mod_wsgi.spec b/mod_wsgi.spec
index 08c8b4b..a485f19 100644
--- a/mod_wsgi.spec
+++ b/mod_wsgi.spec
@@ -6,7 +6,7 @@
 
 Name:           mod_wsgi
 Version:        3.3
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        A WSGI interface for Python web applications in Apache
 
 Group:          System Environment/Libraries
@@ -62,6 +62,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Wed Jun 13 2012 Joe Orton <jorton at redhat.com> - 3.3-6
+- add possible fix for daemon mode crash (#831701)
+
 * Mon Mar 26 2012 Joe Orton <jorton at redhat.com> - 3.3-5
 - move wsgi.conf to conf.modules.d
 


More information about the scm-commits mailing list