You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Adrian Gschwend <kt...@netlabs.org> on 2012/03/22 21:59:05 UTC
[users@httpd] mod_wsgi|fcgid and subversion >= 1.7 issues
Hi group,
I have an interesting problem on my server with mod_wsgi and mod_fcgid,
this is an update of a posting I did on the mod_wsgi list, see
http://groups.google.com/group/modwsgi/browse_thread/thread/f7171b7442965c78#
for the full thread.
The mod_wsgi developers had no explanation for the effect so I crosspost
here with some updates.
I run trac and subversion in the same configuration and on the same
vhost, see
http://ktk.netlabs.org/misc/svn.netlabs.conf for my configuration.
The configuration starts with the SVN repositories residing on /repos
and then configures trac with mod_wsgi. So far this used to work just
fine for many years. As you can see on http://svn.netlabs.org I run a
lot of TRAC repositories for several OSS projects.
A few weeks ago I upgraded subversion on the server to version 1.7,
since then I can still checkout and commit to svn repositories with
clients which are below version 1.7 (I tested 1.6.x), everything works
as expected. However, any subversion client >= 1.7 cannot _commit_
anymore, checkout works as before though.
After dumping with tcpdump I could see the following packet (decoded
TCP stream via wireshark, Subversion 1.7.x client):
--
POST /repos/sandbox/!svn/me HTTP/1.1
User-Agent: SVN/1.7.3 neon/0.29.6
Connection: TE
TE: trailers
Host: svn.netlabs.org
Content-Type: application/vnd.svn-skel
DAV: http://subversion.tigris.org/xmlns/dav/svn/depth
DAV: http://subversion.tigris.org/xmlns/dav/svn/mergeinfo
DAV: http://subversion.tigris.org/xmlns/dav/svn/log-revprops
Content-Length: 14
Accept-Encoding: gzip
( create-txn )HTTP/1.1 404 Not Found
Date: Thu, 22 Mar 2012 20:38:39 GMT
Server: Apache
Content-Length: 21
Content-Type: text/plain
Environment not found
--
full decoded TCP stream: http://pastebin.com/4bAT2TMA
tcpdump: http://ktk.netlabs.org/misc/subversion-commit_17.dmp
This "Environment not found" is definitely an error message from TRAC in
case there is no trac environment found. So for some reason mod_wsgi
hits in at this point instead of the DAV handler. Again, this works just
fine with subversion 1.6.x (it does not do a POST there though):
full decoded TCP stream: http://pastebin.com/X9J3k7kE
tcpdump: http://ktk.netlabs.org/misc/subversion-commit_16.dmp
>From the subversion changelog I can see that they changed the way
subversion interacts with the server:
http://subversion.apache.org/docs/release-notes/1.7.html#httpv2
--
Subversion 1.7 offers a simpler HTTP protocol variant that can be used
when connecting to supported servers. This simpler protocol (sometimes
referred to as HTTPv2) requires fewer client-server round trips to
establish a connection, making Subversion much more performant on high-
latency network connections.
As mentioned in the compatibility table, Subversion 1.7 will only use
HTTPv2 when connecting with a 1.7 (or greater) server, but will
continue to use existing protocols when communicating with earlier
versions of Subversion. Likewise, older clients will only use the old
protocol when connecting to a Subversion server, regardless of
version.
--
So the only explanation I have is that with 1.7 clients subversion
tries to do HTTPv2 and for some reason mod_wsgi decides to take over
even if it's not its job because the post goes to /repos, which should
be the DAV handler. Note that I can "fix" the issue if I deactivate
mod_wsgi or mod_fcgid with the current subversion configuration so the
subversion module itself seems to work fine with new clients as well.
I first suspected a bug in mod_wsgi, for that reason I changed the
configuration to mod_fcgid. Unfortunately it behaves exactly like that
so my next guess (with the limited understanding of Apache internals I
have) would be a bug in the internal processing of Apache.
Software versions (running on FreeBSD 8):
ap22-mod_wsgi-3.3_2
apache-2.2.22_5
py26-subversion-1.7.3
subversion-1.7.3
trac-0.12.3
python26-2.6.7_3
content of trac-netlabs.wsgi (looks a bit different for mod_fcgid but as
I said same bug):
--
#!/usr/local/bin/python2.6
# -*- coding: utf-8 -*-
import os
def application(environ, start_request):
os.environ['TRAC_ENV_PARENT_DIR'] = '/data/trac/netlabs.org'
os.environ['PYTHON_EGG_CACHE'] = '/tmp/egg-cache'
from trac.web.main import dispatch_request
environ['trac.locale'] = 'sv_SE.UTF-8'
return dispatch_request(environ, start_request)
--
If someone wants to try committing, there is a sandbox repository which
is world read/writable at:
http://svn.netlabs.org/repos/sandbox/
I'm more than happy to run more tests if someone has some ideas, I ran
out of them.
thanks
Adrian
--
Adrian Gschwend
@ netlabs.org
ktk [a t] netlabs.org
-------
Open Source Project
http://www.netlabs.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: mod_wsgi|fcgid and subversion >= 1.7 issues
Posted by Adrian Gschwend <kt...@netlabs.org>.
On 22.03.12 21:59, Adrian Gschwend wrote:
> I'm more than happy to run more tests if someone has some ideas, I ran
> out of them.
As no one seems to have an idea on that one, what would be the next
logical step to escalate it? devel mailing list?
thanks
Adrian
--
Adrian Gschwend
@ netlabs.org
ktk [a t] netlabs.org
-------
Open Source Project
http://www.netlabs.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org