savannah-hackers-public
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Savannah-hackers-public] git accumulations on vcs


From: James Cloos
Subject: Re: [Savannah-hackers-public] git accumulations on vcs
Date: Wed, 06 Mar 2013 17:38:56 -0500
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

>>>>> "KB" == Karl Berry <address@hidden> writes:

KB> The whole script is this:

KB> #!/bin/bash
KB> exec timeout 120m /usr/lib/git-core/git-daemon "$@"

Oh.  D'oh.

I completely missed the fact that coreutils has a timeout(1) command,
and that sv uses that for the timeout.

Anyway, from git/daemon.c:run_service():

        /*
         * We'll ignore SIGTERM from now on, we have a
         * good client.
         */
        signal(SIGTERM, SIG_IGN);

so that is why timeout(1) fails.  You need to use timeout(1)'s -k option
to send the git daemon a SIGKILL, or its -s option to send SIGKILL instead
of SIGTERM after the initial timeout.  If there is any chance that the
process is stuck in D mode, a realtime signal (such as SIGRTMIN) will work
even where SIGKILL would fail.  So, perhaps:

exec timeout --signal=SIGKILL 120m /usr/lib/git-core/git-daemon "$@"

or:

exec timeout --signal=SIGRTMIN --kill-after=240m 120m 
/usr/lib/git-core/git-daemon "$@"

As for git not having an internal timeout, I'm sure address@hidden
would welcome a note about it, but I don't know whether Junio would
accept such a change.  The regulars there might prefer sv's current
solution to an internal one.

-JimC
-- 
James Cloos <address@hidden>         OpenPGP: 1024D/ED7DAEA6



reply via email to

[Prev in Thread] Current Thread [Next in Thread]