You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Howard, Larry P" <la...@Vanderbilt.Edu> on 2013/10/29 13:45:12 UTC

Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

An Apache configuration serving Subversion repositories, with mod_wsgi 3.3 authentication provider, causes per request segfaults in Apache 2.2.22 with mod_dav_svn from Subversion 1.7.13.  If mod_wsgi auth directives are removed from the Apache configuration, then repositories are served properly.

The identical configuration with Subversion 1.7.9 (from https://launchpad.net/~svn/+archive/ppa) and the stock Ubuntu 12.04 Subversion 1.6.17 works as expected with mod_wsgi auth directives in place.

Environment:
Ubuntu 12.04.3 LTS (GNU/Linux 3.2.0-55-virtual x86_64)
Apache/2.2.22 (Ubuntu) DAV/2 SVN/1.7.13 mod_wsgi/3.3 Python/2.7.3
Subversion 1.7.13 (http://subversion.apache.org/packages.html Ubuntu Linux: WANdisco)

Loaded Modules:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 mpm_worker_module (static)
 http_module (static)
 so_module (static)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgid_module (shared)
 dav_module (shared)
 dav_svn_module (shared)
 authz_svn_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 reqtimeout_module (shared)
 setenvif_module (shared)
 status_module (shared)
 wsgi_module (shared)

httpd.conf:

CoreDumpDirectory /tmp/apache2-gdb-dump
LogLevel debug

listen 8080

<VirtualHost *:8080>
    ServerName svn.mydomain.org
    <Location /projects>
        DAV svn
        SVNParentPath /var/lib/svn
        SVNListParentPath Off
        WSGIAccessScript /var/lib/wsgi/access.wsgi
    </Location>
</VirtualHost>

<VirtualHost *:80>
    ServerName svn.mydomain.org
    <Location /projects>
        DAV svn
        SVNParentPath /var/lib//svn
        SVNListParentPath Off
        AuthType Basic
        AuthName "WSGIAuth"
        AuthBasicProvider wsgi
        WSGIAuthUserScript /var/lib/wsgi/access.wsgi
        Require valid-user
        WSGIAuthGroupScript /var/lib/wsgi/access.wsgi
        Require group authorized
    </Location>
</VirtualHost>

access.wsgi:

import logging
logging.basicConfig(format='%(asctime)s %(levelname)s:%(message)s',
                    level=logging.DEBUG)
LOG = logging.getLogger(__name__)

def allow_access(*args, **kwargs):
  LOG.debug("mod_wsgi allow_access called.")
  return True

def check_password(*args, **kwargs):
  LOG.debug("mod_wsgi check_password called.")
  return True

def groups_for_user(*args, **kwargs):
  LOG.debug("mod_wsgi groups_for_user called.")
  return [“authorized”]

Apache error log:

[Tue Oct 29 11:12:45 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
[Tue Oct 29 11:12:45 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Tue Oct 29 11:12:45 2013] [notice] Apache/2.2.22 (Ubuntu) DAV/2 SVN/1.7.13 mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Tue Oct 29 11:12:45 2013] [info] Server built: Jul 12 2013 13:37:15
[Tue Oct 29 11:12:45 2013] [debug] worker.c(1757): AcceptMutex: sysvsem (default: sysvsem)
[Tue Oct 29 11:12:45 2013] [info] mod_wsgi (pid=11326): Initializing Python.
[Tue Oct 29 11:12:45 2013] [info] mod_wsgi (pid=11325): Initializing Python.
[Tue Oct 29 11:12:45 2013] [info] mod_wsgi (pid=11326): Attach interpreter ''.
[Tue Oct 29 11:12:45 2013] [info] mod_wsgi (pid=11325): Attach interpreter ''.
[Tue Oct 29 11:12:55 2013] [debug] mod_deflate.c(615): [client 129.59.105.145] Zlib: Compressed 481 to 328 : URL /projects/somerepo
[Tue Oct 29 11:12:59 2013] [info] [client <elided>] mod_wsgi (pid=11326, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
[Tue Oct 29 11:12:59 2013] [info] [client <elided>] mod_wsgi (pid=11325, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
[Tue Oct 29 11:13:00 2013] [notice] child pid 11325 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
[Tue Oct 29 11:13:00 2013] [notice] child pid 11326 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
[Tue Oct 29 11:13:01 2013] [info] mod_wsgi (pid=11384): Initializing Python.
[Tue Oct 29 11:13:01 2013] [info] mod_wsgi (pid=11384): Attach interpreter ''.
[Tue Oct 29 11:13:19 2013] [info] mod_wsgi (pid=11412): Initializing Python.
[Tue Oct 29 11:13:19 2013] [info] mod_wsgi (pid=11412): Attach interpreter ''.
[Tue Oct 29 11:13:21 2013] [info] [client <elided>] mod_wsgi (pid=11384, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
[Tue Oct 29 11:13:21 2013] [info] [client <elided>] mod_wsgi (pid=11412, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
[Tue Oct 29 11:13:22 2013] [notice] child pid 11384 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
[Tue Oct 29 11:13:22 2013] [notice] child pid 11412 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
[Tue Oct 29 11:13:23 2013] [info] mod_wsgi (pid=11442): Initializing Python.
[Tue Oct 29 11:13:23 2013] [info] mod_wsgi (pid=11442): Attach interpreter ''.

No core dumps were generated.

Apache access log:

svn.mydomain.org:80 <elided> - - [29/Oct/2013:11:12:55 +0000] "OPTIONS /projects/somerepo HTTP/1.1" 401 665 "-" "SVN/1.7.13 neon/0.29.6"
svn.mydomain.org:80 <elided> - - [29/Oct/2013:11:13:18 +0000] "OPTIONS /projects/somerepo HTTP/1.1" 401 720 "-" "SVN/1.7.13 serf/1.2.1”

Subversion client commands:
$ svn co --username somebody http://svn.mydomain.org/projects/somerepo
Authentication realm: <http://svn.mydomain.org:80> WSGIAuth
Password for 'somebody':
svn: E175002: Unable to connect to a repository at URL 'http:/svn.mydomain.org/projects/somerepo'
svn: E175002: OPTIONS of 'http://svn.mydomain.org/projects/somerepo': Could not read status line: connection was closed by server (http://svn.mydomain.org)
$ svn co --config-option servers:global:http-library=serf --username somebody http:///svn.mydomain.org/projects/somerepo
Authentication realm: <http://svn.mydomain.org:80> WSGIAuth
Password for 'somebody':
svn: E120108: Unable to connect to a repository at URL 'http:///svn.mydomain.org/projects/somerepo'
svn: E120108: Error running context: APR does not understand this error code

I appreciate your help in identifying the cause of Apache segfaults with mod_dav_svn from Subversion 1.7.13.

--
Larry Howard, Sr. Research Scientist
Institute for Software Integrated Systems, Vanderbilt University




Re: Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

Posted by Ben Reser <be...@reser.org>.
On 10/30/13 10:23 AM, Howard, Larry P wrote:
> Is there something more I can do to help clarify the report?

Debug builds of httpd, mod_wsgi, and Subversion.  Run httpd under a debugger
and post the backtrace of the segfault.  For the most part you can just do:
gdb -args httpd -X -f httpd.conf

Once GDB starts up type:
run

Create the crash which will trigger a prompt in gdb.

Type the following at the GDB prompt:
backtrace

These links should be helpful:
https://subversion.apache.org/docs/community-guide/debugging.html#server-debugging
https://httpd.apache.org/dev/debugging.html

I'd suggest when you build Subversion that you'd use --enable-maintainer-mode
with configure.

It might be desirable to have a debug build of apr/apr-util as well, but let's
see what this produces first.

I usually use a setup like so to allow me to use an uninstalled copy of SVN
with httpd (if on a Mac LD_LIBRARY_PATH should be DYLD_LIBRARY_PATH):
[[[
export SVN_BUILDDIR="$HOME/builds/svn-trunk"
for d in "$SVN_BUILDDIR"/subversion/*/.libs; do
  if [ -z "$LD_LIBRARY_PATH" ]; then
    LD_LIBRARY_PATH="$d"
  else
    LD_LIBRARY_PATH="$d:$LD_LIBRARY_PATH"
  fi
done
export LD_LIBRARY_PATH
gdb --args httpd -f httpd.conf -X
]]]

Then I use the following in my httpd.conf to load the modules:
[[[
LoadModule dav_svn_module
${SVN_BUILDDIR}/subversion/mod_dav_svn/.libs/mod_dav_svn.so
LoadModule authz_svn_module
${SVN_BUILDDIR}/subversion/mod_authz_svn/.libs/mod_authz_svn.so
]]]

Everything else is just normal configuration of httpd.




Re: Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

Posted by "Howard, Larry P" <la...@Vanderbilt.Edu>.
I can confirm that this patch fixes.

Thanks guys!  Very good service, much appreciated.

Regards,
lph
--
Larry Howard, Sr. Research Scientist
Institute for Software Integrated Systems, Vanderbilt University



On Oct 30, 2013, at 7:57 PM, Ben Reser <be...@reser.org> wrote:

> On 10/30/13 12:12 PM, Philip Martin wrote:
>> Subversion's translate_name hook is setting r->filename to NULL and it
>> appears that mod_wsgi does not check for NULL.
> 
> Thanks Philip.  When I made this change I expected that other modules would be
> ok with r->filename being NULL.  I guess that's not the case.
> 
> I've fixed the problem on trunk in r1537360.  Change has been nominated for
> 1.7.x and 1.8.x backport.
> 
> Larry, I've attached a patch which should resolve the problem for you.  Thanks
> for the report.
> 
> <mod-dav-svn-bogus-filename-1.7.x.patch>


Re: Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

Posted by Ben Reser <be...@reser.org>.
On 10/30/13 5:57 PM, Ben Reser wrote:
> On 10/30/13 12:12 PM, Philip Martin wrote:
>> Subversion's translate_name hook is setting r->filename to NULL and it
>> appears that mod_wsgi does not check for NULL.
> 
> Thanks Philip.  When I made this change I expected that other modules would be
> ok with r->filename being NULL.  I guess that's not the case.
> 
> I've fixed the problem on trunk in r1537360.  Change has been nominated for
> 1.7.x and 1.8.x backport.
> 
> Larry, I've attached a patch which should resolve the problem for you.  Thanks
> for the report.

This same issue also impacts mod_hfs_apple on the Mac.


Re: Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

Posted by Ben Reser <be...@reser.org>.
On 10/30/13 12:12 PM, Philip Martin wrote:
> Subversion's translate_name hook is setting r->filename to NULL and it
> appears that mod_wsgi does not check for NULL.

Thanks Philip.  When I made this change I expected that other modules would be
ok with r->filename being NULL.  I guess that's not the case.

I've fixed the problem on trunk in r1537360.  Change has been nominated for
1.7.x and 1.8.x backport.

Larry, I've attached a patch which should resolve the problem for you.  Thanks
for the report.


Re: Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

Posted by Philip Martin <ph...@codematters.co.uk>.
Philip Martin <ph...@wandisco.com> writes:

> "Howard, Larry P" <la...@Vanderbilt.Edu> writes:
>
>> What we know is that mod_dav_svn works as expected without the
>> mod_wsgi auth directives.  mod_wsgi works as expected without
>> mod_dav_svn directives.  The intended Apache configuration works as
>> expected with mod_dav_svn from Subversion 1.7.9 and mod_wsgi 3.3.
>>
>> Is there something more I can do to help clarify the report?
>
> I can reproduce this.  I have a very simple mod_wsgi setup:
>
>   WSGIAccessScript /home/pm/sw/subversion/obj/apache2/script.wsgi
>
> where script.wsgi contains:
>
>   def allow_access(environ, start_response):
>     return True
>
> It appears to be caused by r1514941 which added the translate_name and
> map_to_storage hooks to mod_dav_svn.

Subversion's translate_name hook is setting r->filename to NULL and it
appears that mod_wsgi does not check for NULL.

-- 
Philip

Re: Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

Posted by Philip Martin <ph...@wandisco.com>.
"Howard, Larry P" <la...@Vanderbilt.Edu> writes:

> What we know is that mod_dav_svn works as expected without the
> mod_wsgi auth directives.  mod_wsgi works as expected without
> mod_dav_svn directives.  The intended Apache configuration works as
> expected with mod_dav_svn from Subversion 1.7.9 and mod_wsgi 3.3.
>
> Is there something more I can do to help clarify the report?

I can reproduce this.  I have a very simple mod_wsgi setup:

  WSGIAccessScript /home/pm/sw/subversion/obj/apache2/script.wsgi

where script.wsgi contains:

  def allow_access(environ, start_response):
    return True

It appears to be caused by r1514941 which added the translate_name and
map_to_storage hooks to mod_dav_svn.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Re: Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

Posted by "Howard, Larry P" <la...@Vanderbilt.Edu>.
Apologies for following my own message, but based on a recommendation from the mod_wsgi developer,
I upgraded the mod_wsgi module to version 3.4.  This failed, however, to remedy the situation.

[Wed Oct 30 16:22:58 2013] [notice] Apache/2.2.22 (Ubuntu) DAV/2 SVN/1.7.13 mod_wsgi/3.4 Python/2.7.3 configured -- resuming normal operations
[Wed Oct 30 16:22:58 2013] [info] Server built: Jul 12 2013 13:37:15
[Wed Oct 30 16:22:58 2013] [debug] worker.c(1757): AcceptMutex: sysvsem (default: sysvsem)
[Wed Oct 30 16:22:58 2013] [info] mod_wsgi (pid=25136): Initializing Python.
[Wed Oct 30 16:22:58 2013] [info] mod_wsgi (pid=25135): Initializing Python.
[Wed Oct 30 16:22:58 2013] [info] mod_wsgi (pid=25135): Attach interpreter ''.
[Wed Oct 30 16:22:58 2013] [info] mod_wsgi (pid=25136): Attach interpreter ''.
[Wed Oct 30 16:23:12 2013] [debug] mod_deflate.c(615): [client <elided>] Zlib: Compressed 481 to 328 : URL /projects/firetracks
[Wed Oct 30 16:23:14 2013] [info] [client <elided>] mod_wsgi (pid=25135, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
[Wed Oct 30 16:23:14 2013] [info] [client <elided>] mod_wsgi (pid=25136, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
[Wed Oct 30 16:23:14 2013] [notice] child pid 25135 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
[Wed Oct 30 16:23:14 2013] [notice] child pid 25136 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
[Wed Oct 30 16:23:15 2013] [info] mod_wsgi (pid=25194): Initializing Python.
[Wed Oct 30 16:23:15 2013] [info] mod_wsgi (pid=25194): Attach interpreter ''.

What we know is that mod_dav_svn works as expected without the mod_wsgi auth directives.  mod_wsgi works as expected
without mod_dav_svn directives.    The intended Apache configuration works as expected with mod_dav_svn from Subversion
1.7.9 and mod_wsgi 3.3.

Is there something more I can do to help clarify the report?

--
Larry Howard, Sr. Research Scientist
Institute for Software Integrated Systems, Vanderbilt University


On Oct 29, 2013, at 1:25 PM, Howard, Larry P <la...@Vanderbilt.Edu> wrote:

> On Oct 29, 2013, at 12:53 PM, Branko Čibej <br...@wandisco.com> wrote:
> 
>> Hmm ... This is reaching a bit far, but your initial post shows that the
>> crashes happen on the VirtualHost on port 80. I notice that you have
>> this parameter:
>> 
>>    SVNParentPath /var/lib//svn
>> 
>> The extra slash shouldn't hurt, but maybe it does ... can you access the
>> repository, with your original configuration, on port 8080 -- which
>> doesn't have the extra slash in the SVNParentPath parameter? And what
>> happens if you remove that slash in the port 80 vhost configuration?
>> 
>> — Brane
>> 
> 
> Unable to access through 8080 with the original Apache configuration,
> nor after removing the extra slash from the port 80 vhost configuration:
> 
> [Tue Oct 29 18:04:26 2013] [notice] Apache/2.2.22 (Ubuntu) DAV/2 SVN/1.7.13 mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
> [Tue Oct 29 18:04:26 2013] [info] Server built: Jul 12 2013 13:37:15
> [Tue Oct 29 18:04:26 2013] [debug] worker.c(1757): AcceptMutex: sysvsem (default: sysvsem)
> [Tue Oct 29 18:04:26 2013] [info] mod_wsgi (pid=13477): Initializing Python.
> [Tue Oct 29 18:04:26 2013] [info] mod_wsgi (pid=13476): Initializing Python.
> [Tue Oct 29 18:04:26 2013] [info] mod_wsgi (pid=13476): Attach interpreter ''.
> [Tue Oct 29 18:04:26 2013] [info] mod_wsgi (pid=13477): Attach interpreter ''.
> [Tue Oct 29 18:04:46 2013] [info] [client <elided>] mod_wsgi (pid=13477, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
> [Tue Oct 29 18:04:46 2013] [notice] child pid 13477 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
> [Tue Oct 29 18:07:14 2013] [debug] mod_deflate.c(615): [client <elided>] Zlib: Compressed 481 to 328 : URL /projects/firetracks/svn
> [Tue Oct 29 18:07:15 2013] [info] mod_wsgi (pid=13540): Initializing Python.
> [Tue Oct 29 18:07:15 2013] [info] mod_wsgi (pid=13540): Attach interpreter ''.
> [Tue Oct 29 18:07:17 2013] [info] [client <elided>] mod_wsgi (pid=13476, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
> [Tue Oct 29 18:07:17 2013] [info] [client <elided>] mod_wsgi (pid=13540, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
> [Tue Oct 29 18:07:17 2013] [notice] child pid 13476 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
> [Tue Oct 29 18:07:18 2013] [notice] child pid 13540 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
> [Tue Oct 29 18:07:18 2013] [info] mod_wsgi (pid=13570): Initializing Python.
> [Tue Oct 29 18:07:18 2013] [info] mod_wsgi (pid=13570): Attach interpreter ''.
> 
> httpd.conf (repaired):
> 
> CoreDumpDirectory /tmp/apache2-gdb-dump
> LogLevel debug
> 
> listen 8080
> 
> <VirtualHost *:8080>
>     ServerName svn.mydomain.org
>     <Location /projects>
>         DAV svn
>         SVNParentPath /var/lib/svn
>         SVNListParentPath Off
>         WSGIAccessScript /var/lib/wsgi/access.wsgi
>     </Location>
> </VirtualHost>
> 
> <VirtualHost *:80>
>     ServerName svn.mydomain.org
>     <Location /projects>
>         DAV svn
>         SVNParentPath /var/lib/svn
>         SVNListParentPath Off
>         AuthType Basic
>         AuthName "WSGIAuth"
>         AuthBasicProvider wsgi
>         WSGIAuthUserScript /var/lib/wsgi/access.wsgi
>         Require valid-user
>         WSGIAuthGroupScript /var/lib/wsgi/access.wsgi
>         Require group authorized
>     </Location>
> </VirtualHost>
> 
> --
> Larry Howard, Sr. Research Scientist
> Institute for Software Integrated Systems, Vanderbilt University
> 


Re: Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

Posted by "Howard, Larry P" <la...@Vanderbilt.Edu>.
On Oct 29, 2013, at 12:53 PM, Branko Čibej <br...@wandisco.com> wrote:

> Hmm ... This is reaching a bit far, but your initial post shows that the
> crashes happen on the VirtualHost on port 80. I notice that you have
> this parameter:
> 
>    SVNParentPath /var/lib//svn
> 
> The extra slash shouldn't hurt, but maybe it does ... can you access the
> repository, with your original configuration, on port 8080 -- which
> doesn't have the extra slash in the SVNParentPath parameter? And what
> happens if you remove that slash in the port 80 vhost configuration?
> 
> — Brane
> 

Unable to access through 8080 with the original Apache configuration,
nor after removing the extra slash from the port 80 vhost configuration:

[Tue Oct 29 18:04:26 2013] [notice] Apache/2.2.22 (Ubuntu) DAV/2 SVN/1.7.13 mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
[Tue Oct 29 18:04:26 2013] [info] Server built: Jul 12 2013 13:37:15
[Tue Oct 29 18:04:26 2013] [debug] worker.c(1757): AcceptMutex: sysvsem (default: sysvsem)
[Tue Oct 29 18:04:26 2013] [info] mod_wsgi (pid=13477): Initializing Python.
[Tue Oct 29 18:04:26 2013] [info] mod_wsgi (pid=13476): Initializing Python.
[Tue Oct 29 18:04:26 2013] [info] mod_wsgi (pid=13476): Attach interpreter ''.
[Tue Oct 29 18:04:26 2013] [info] mod_wsgi (pid=13477): Attach interpreter ''.
[Tue Oct 29 18:04:46 2013] [info] [client <elided>] mod_wsgi (pid=13477, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
[Tue Oct 29 18:04:46 2013] [notice] child pid 13477 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
[Tue Oct 29 18:07:14 2013] [debug] mod_deflate.c(615): [client <elided>] Zlib: Compressed 481 to 328 : URL /projects/firetracks/svn
[Tue Oct 29 18:07:15 2013] [info] mod_wsgi (pid=13540): Initializing Python.
[Tue Oct 29 18:07:15 2013] [info] mod_wsgi (pid=13540): Attach interpreter ''.
[Tue Oct 29 18:07:17 2013] [info] [client <elided>] mod_wsgi (pid=13476, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
[Tue Oct 29 18:07:17 2013] [info] [client <elided>] mod_wsgi (pid=13540, process='', application=''): Loading WSGI script '/var/lib/wsgi/access.wsgi'.
[Tue Oct 29 18:07:17 2013] [notice] child pid 13476 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
[Tue Oct 29 18:07:18 2013] [notice] child pid 13540 exit signal Segmentation fault (11), possible coredump in /tmp/apache2-gdb-dump
[Tue Oct 29 18:07:18 2013] [info] mod_wsgi (pid=13570): Initializing Python.
[Tue Oct 29 18:07:18 2013] [info] mod_wsgi (pid=13570): Attach interpreter ''.

httpd.conf (repaired):

CoreDumpDirectory /tmp/apache2-gdb-dump
LogLevel debug

listen 8080

<VirtualHost *:8080>
    ServerName svn.mydomain.org
    <Location /projects>
        DAV svn
        SVNParentPath /var/lib/svn
        SVNListParentPath Off
        WSGIAccessScript /var/lib/wsgi/access.wsgi
    </Location>
</VirtualHost>

<VirtualHost *:80>
    ServerName svn.mydomain.org
    <Location /projects>
        DAV svn
        SVNParentPath /var/lib/svn
        SVNListParentPath Off
        AuthType Basic
        AuthName "WSGIAuth"
        AuthBasicProvider wsgi
        WSGIAuthUserScript /var/lib/wsgi/access.wsgi
        Require valid-user
        WSGIAuthGroupScript /var/lib/wsgi/access.wsgi
        Require group authorized
    </Location>
</VirtualHost>

--
Larry Howard, Sr. Research Scientist
Institute for Software Integrated Systems, Vanderbilt University


Re: Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

Posted by Branko Čibej <br...@wandisco.com>.
On 29.10.2013 18:10, Howard, Larry P wrote:
> Thanks for following up.  Amending the previous httpd.conf as shown below successfully invokes the mod_wsgi auth functions.
>
> httpd.conf:
>
> CoreDumpDirectory /tmp/apache2-gdb-dump
> LogLevel debug
>
> listen 8080
>
> <VirtualHost *:8080>
>     ServerName svn.mydomain.org
>     DocumentRoot /var/www
>     <Location /index.html>
>         WSGIAccessScript /var/lib/wsgi/access.wsgi
>     </Location>
> </VirtualHost>
>
> <VirtualHost *:80>
>     ServerName svn.mydomain.org
>     DocumentRoot /var/www
>     <Location /index.html>
>         AuthType Basic
>         AuthName "WSGIAuth"
>         AuthBasicProvider wsgi
>         WSGIAuthUserScript /var/lib/wsgi/access.wsgi
>         Require valid-user
>         WSGIAuthGroupScript /var/lib/wsgi/access.wsgi
>         Require group authorized
>     </Location>
> </VirtualHost>

Hmm ... This is reaching a bit far, but your initial post shows that the
crashes happen on the VirtualHost on port 80. I notice that you have
this parameter:

    SVNParentPath /var/lib//svn

The extra slash shouldn't hurt, but maybe it does ... can you access the
repository, with your original configuration, on port 8080 -- which
doesn't have the extra slash in the SVNParentPath parameter? And what
happens if you remove that slash in the port 80 vhost configuration?

-- Brane

> On Oct 29, 2013, at 7:58 AM, Branko Čibej <br...@wandisco.com> wrote:
>
>> On 29.10.2013 13:45, Howard, Larry P wrote:
>>> An Apache configuration serving Subversion repositories, with mod_wsgi 3.3 authentication provider, causes per request segfaults in Apache 2.2.22 with mod_dav_svn from Subversion 1.7.13.  If mod_wsgi auth directives are removed from the Apache configuration, then repositories are served properly.
>> What if you remove the SVN configuration and just set up a plain server
>> with WSGI authentication? Given your description of the issue, and the
>> fact that the WSGI process crashes, I'd sooner suspect mod_wsgi or your
>> access script, even though I can't see anything obviously wrong with them.
>>
>> -- Brane
>>
>>
>> -- 
>> Branko Čibej | Director of Subversion
>> WANdisco // Non-Stop Data
>> e. brane@wandisco.com


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com

Re: Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

Posted by "Howard, Larry P" <la...@Vanderbilt.Edu>.
Thanks for following up.  Amending the previous httpd.conf as shown below successfully invokes the mod_wsgi auth functions.

httpd.conf:

CoreDumpDirectory /tmp/apache2-gdb-dump
LogLevel debug

listen 8080

<VirtualHost *:8080>
    ServerName svn.mydomain.org
    DocumentRoot /var/www
    <Location /index.html>
        WSGIAccessScript /var/lib/wsgi/access.wsgi
    </Location>
</VirtualHost>

<VirtualHost *:80>
    ServerName svn.mydomain.org
    DocumentRoot /var/www
    <Location /index.html>
        AuthType Basic
        AuthName "WSGIAuth"
        AuthBasicProvider wsgi
        WSGIAuthUserScript /var/lib/wsgi/access.wsgi
        Require valid-user
        WSGIAuthGroupScript /var/lib/wsgi/access.wsgi
        Require group authorized
    </Location>
</VirtualHost>

--
Larry Howard, Sr. Research Scientist
Institute for Software Integrated Systems, Vanderbilt University


On Oct 29, 2013, at 7:58 AM, Branko Čibej <br...@wandisco.com> wrote:

> On 29.10.2013 13:45, Howard, Larry P wrote:
>> An Apache configuration serving Subversion repositories, with mod_wsgi 3.3 authentication provider, causes per request segfaults in Apache 2.2.22 with mod_dav_svn from Subversion 1.7.13.  If mod_wsgi auth directives are removed from the Apache configuration, then repositories are served properly.
> 
> What if you remove the SVN configuration and just set up a plain server
> with WSGI authentication? Given your description of the issue, and the
> fact that the WSGI process crashes, I'd sooner suspect mod_wsgi or your
> access script, even though I can't see anything obviously wrong with them.
> 
> -- Brane
> 
> 
> -- 
> Branko Čibej | Director of Subversion
> WANdisco // Non-Stop Data
> e. brane@wandisco.com


Re: Subversion 1.7.13 mod_dav_svn with mod_wsgi auth causes Apache segfaults

Posted by Branko Čibej <br...@wandisco.com>.
On 29.10.2013 13:45, Howard, Larry P wrote:
> An Apache configuration serving Subversion repositories, with mod_wsgi 3.3 authentication provider, causes per request segfaults in Apache 2.2.22 with mod_dav_svn from Subversion 1.7.13.  If mod_wsgi auth directives are removed from the Apache configuration, then repositories are served properly.

What if you remove the SVN configuration and just set up a plain server
with WSGI authentication? Given your description of the issue, and the
fact that the WSGI process crashes, I'd sooner suspect mod_wsgi or your
access script, even though I can't see anything obviously wrong with them.

-- Brane


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com