[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Apache refuses to execute hooks after a while in connection with websvn

From: Markus Henschel <markus-henschel_at_gmx.de>
Date: 2006-04-24 12:30:12 CEST

Hello,

this will get a little bit longer as the problem seems to be some
interference of different components.

I run an apache prefork 2.0.50 with subversion 1.3.1 on suse linux. The
server worked flawlessly until I decided to install a pre commit hook
checking for a valid log message and preventing case sensitivity problem
with windows clients. It's this:

***************
#!/bin/sh

REPOS="$1"
TXN="$2"

# Make sure that the log message contains some text.
LOGMSGOK=1
SVNLOOK=/usr/local/bin/svnlook
$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" > /dev/null ||
LOGMSGOK=0

if [ $LOGMSGOK = 0 ]; then
     echo "Empty log messages are not allowed." >&2
     exit 1
fi

#check for adding a file deffering only by case
$REPOS/hooks/check-case-insensitive.pl "$REPOS" "$TXN" || exit 1

# All checks passed, so allow the commit.
exit 0

***************

This hook does what it is proposed - for a time. I noticed that after
running the server for a while sometimes a commit fails stating the
pre-commit hook failed. There are several strange things about that:

1. The hooks are executed and reach the exit 0. I know that because when
I output something to stderr before the "exit 0" it is displayed to the
client.

2. The failing frequency increases to a point where all (pre-commit)
hooks fail no matter what's in them. Even a dummy hook only containing
"exit 0" will fail.

Unfortunately there are no more additional information in the apache
logs even when the log level is increased to debug. It just states that
a pre-commit hook failed with an empty error output. When I restart the
apache everything is fine again for the moment but the problem reoccurs
again after some uptime.

As the only other thing this apache is doing is WebSVN I tested if it
had anything to do with it. I wrote a script that continuously wrote
noise to a 1MB file and committed it every 3 seconds. This worked for
hours but as soon as I started using websvn the problem occurred. When
displaying the head revision of a text file in websvn and hitting
refresh in the web browser very fast the problem occurred just 10
seconds after the server was restarted. So I think WebSVN might have
something to do with it as if it is trashing some resource on apache
that disturbs the process of hook executing by mod_dav_svn.

My solution so far was to disable websvn completely. I don't really can
experiment with different apache versions as I'm not the admin of the
server (just for the apache and svn). Switching to svnserver is not an
option as I will need the domain authentication feature of apache later.

I'd really appreciate any help. How can websvn interfere with
mod_dav_svn that way? What could I try?

Thank you for your help.

Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Apr 24 12:31:30 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.