Bug 182030 - [patch] www/mod_wsgi3 segfaults under apache 2.4
Summary: [patch] www/mod_wsgi3 segfaults under apache 2.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-apache (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-12 11:50 UTC by Trevor Caira
Modified: 2013-09-12 21:30 UTC (History)
0 users

See Also:


Attachments
file.diff (1.43 KB, patch)
2013-09-12 11:50 UTC, Trevor Caira
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Trevor Caira 2013-09-12 11:50:00 UTC
Hello world WSGI application segfaults using process groups (WSGIProcessGroup) under apache 2.4.

Documented in https://groups.google.com/forum/#!topic/modwsgi/yNdFjWrqgJw

Fix: Patch committed upstream. There has not been an official release incorporating this patch, but debian and ubuntu both ship patched version.

I have attached a patch which bumps the PORTREVISION and includes the patch from upstream.

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2013-09-12 19:43:51 UTC
Responsible Changed
From-To: freebsd-ports-bugs->apache

apache@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer 2013-09-12 19:43:52 UTC
Maintainer of www/mod_wsgi3,

Please note that PR ports/182030 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/182030

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer 2013-09-12 19:43:53 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Douglas Thrift 2013-09-12 20:08:06 UTC
Hello,

This looks fine. Approved.

Thanks!

Douglas William Thrift
<douglas@douglasthrift.net>
<http://douglasthrift.net/>

On 9/12/2013 11:43 AM, Edwin Groothuis wrote:
> Maintainer of www/mod_wsgi3,
> 
> Please note that PR ports/182030 has just been submitted.
> 
> If it contains a patch for an upgrade, an enhancement or a bug fix
> you agree on, reply to this email stating that you approve the patch
> and a committer will take care of it.
> 
> The full text of the PR can be found at:
>     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/182030
>
Comment 5 dfilter service freebsd_committer 2013-09-12 21:21:38 UTC
Author: ohauer
Date: Thu Sep 12 20:21:31 2013
New Revision: 327109
URL: http://svnweb.freebsd.org/changeset/ports/327109

Log:
  - Scoreboard handle in daemon mode should be set to NULL
    for Apache 2.4 to avoid crash in lingering close.
  
  PR:		ports/182030
  Submitted by:	Trevor Caira <trevor@bitba.se>
  Reviewed by:	Douglas Thrift <douglas@douglasthrift.net> (maintainer)
  Obtained from:	upstream revision: 20979c8abd2f

Added:
  head/www/mod_wsgi3/files/patch-mod_wsgi.c   (contents, props changed)
Modified:
  head/www/mod_wsgi3/Makefile

Modified: head/www/mod_wsgi3/Makefile
==============================================================================
--- head/www/mod_wsgi3/Makefile	Thu Sep 12 20:18:06 2013	(r327108)
+++ head/www/mod_wsgi3/Makefile	Thu Sep 12 20:21:31 2013	(r327109)
@@ -2,6 +2,7 @@
 
 PORTNAME=	mod_wsgi
 PORTVERSION=	3.4
+PORTREVISION=	1
 CATEGORIES=	www python
 MASTER_SITES=	GOOGLE_CODE
 PKGNAMEPREFIX=	${APACHE_PKGNAMEPREFIX}
@@ -11,7 +12,6 @@ COMMENT=	Python WSGI adapter module for 
 
 LICENSE=	AL2
 
-
 #LATEST_LINK=	mod_wsgi
 CONFLICTS=	${PKGNAMEPREFIX}mod_wsgi-2.* mod_wsgi-2.*
 

Added: head/www/mod_wsgi3/files/patch-mod_wsgi.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/mod_wsgi3/files/patch-mod_wsgi.c	Thu Sep 12 20:21:31 2013	(r327109)
@@ -0,0 +1,16 @@
+--- mod_wsgi.c.orig	2012-08-22 23:10:44.000000000 -0400
++++ mod_wsgi.c		2013-09-12 06:29:36.718830524 -0400
+@@ -10600,7 +10600,13 @@
+      * will add their own input/output filters to the chain.
+      */
+ 
++#if AP_MODULE_MAGIC_AT_LEAST(20110619,0)
++    /* For 2.4 a NULL sbh pointer should work. */
++    sbh = NULL;
++#else
++    /* For 2.2 a dummy sbh pointer is needed. */
+     ap_create_sb_handle(&sbh, p, -1, 0);
++#endif
+ 
+     c = (conn_rec *)apr_pcalloc(p, sizeof(conn_rec));
+ 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Olli Hauer freebsd_committer 2013-09-12 21:21:52 UTC
State Changed
From-To: feedback->closed

Committed,  
Thanks!