From: "Sébastien Boisvert" <sebastien.boisvert@calculquebec.ca>
To: Thomas Rast <trast@student.ethz.ch>
Cc: Eric Chamberland <Eric.Chamberland@giref.ulaval.ca>,
"Brian J. Murrell" <brian@interlinx.bc.ca>, <git@vger.kernel.org>,
<kusmabite@gmail.com>,
"Pyeron, Jason J CTR (US)" <jason.j.pyeron.ctr@mail.mil>,
Maxime Boissonneault <maxime.boissonneault@calculquebec.ca>,
Philippe Vaucher <philippe.vaucher@gmail.com>
Subject: Re: GIT get corrupted on lustre
Date: Wed, 23 Jan 2013 13:34:00 -0500 [thread overview]
Message-ID: <51002D18.4080201@calculquebec.ca> (raw)
In-Reply-To: <878v7keuh3.fsf@pctrast.inf.ethz.ch>
[-- Attachment #1: Type: text/plain, Size: 1198 bytes --]
Hello,
Here is a patch (with git format-patch) that removes any timer if NO_SETITIMER is set.
Éric:
To test it with your workflow:
$ module load apps/git/1.8.1.1.348.g78eb407-NO_SETITIMER-patch
$ git clone ...
Sébastien
On 01/22/2013 05:14 PM, Thomas Rast wrote:
> Eric Chamberland <Eric.Chamberland@giref.ulaval.ca> writes:
>
>> So, hum, do we have some sort of conclusion?
>>
>> Shall it be a fix for git to get around that lustre "behavior"?
>>
>> If something can be done in git it would be great: it is a *lot*
>> easier to change git than the lustre filesystem software for a cluster
>> in running in production mode... (words from cluster team) :-/
>
> I thought you already established that simply disabling the progress
> display is a sufficient workaround? If that doesn't help, you can try
> patching out all use of SIGALRM within git.
>
> Other than that I agree with Junio, from what we've seen so far, Lustre
> returns EINTR on all sorts of calls that simply aren't allowed to do so.
>
--
---
Spécialiste en granularité (1 journée / semaine)
Calcul Québec / Calcul Canada
Pavillon Adrien-Pouliot, Université Laval, Québec (Québec), Canada
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-don-t-use-timers-if-NO_SETITIMER-is-set.patch --]
[-- Type: text/x-patch; name="0001-don-t-use-timers-if-NO_SETITIMER-is-set.patch", Size: 4069 bytes --]
>From 78eb4075d98eb9cdc57210c63b8d8de8a3d0cd9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Boisvert?= <sebastien.boisvert@calculquebec.ca>
Date: Wed, 23 Jan 2013 13:10:57 -0500
Subject: [PATCH] don't use timers if NO_SETITIMER is set
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
With NO_SETITIMER, the user experience on legacy Lustre is fixed,
but there is no early progress.
The patch has no effect on the resulting git executable if NO_SETITIMER is
not set (the default). So by default this patch has no effect at all, which
is good.
git tests:
$ make clean
$ make NO_SETITIMER=YesPlease
$ make test NO_SETITIMER=YesPlease &> make-test.log
$ grep "^not ok" make-test.log |grep -v "# TODO known breakage"|wc -l
0
$ grep "^ok" make-test.log |wc -l
9531
$ grep "^not ok" make-test.log |wc -l
65
No timers with NO_SETITIMER:
$ objdump -d ./git|grep setitimer|wc -l
0
$ objdump -d ./git|grep alarm|wc -l
0
Timers without NO_SETITIMER:
$ objdump -d /software/apps/git/1.8.1/bin/git|grep setitimer|wc -l
5
$ objdump -d /software/apps/git/1.8.1/bin/git|grep alarm|wc -l
0
Signed-off-by: Sébastien Boisvert <sebastien.boisvert@calculquebec.ca>
---
builtin/log.c | 7 +++++++
daemon.c | 6 ++++++
progress.c | 8 ++++++++
upload-pack.c | 2 ++
4 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index 8f0b2e8..f8321c7 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -198,7 +198,9 @@ static void show_early_header(struct rev_info *rev, const char *stage, int nr)
printf(_("Final output: %d %s\n"), nr, stage);
}
+#ifndef NO_SETITIMER
static struct itimerval early_output_timer;
+#endif
static void log_show_early(struct rev_info *revs, struct commit_list *list)
{
@@ -240,9 +242,12 @@ static void log_show_early(struct rev_info *revs, struct commit_list *list)
* trigger every second even if we're blocked on a
* reader!
*/
+
+ #ifndef NO_SETITIMER
early_output_timer.it_value.tv_sec = 0;
early_output_timer.it_value.tv_usec = 500000;
setitimer(ITIMER_REAL, &early_output_timer, NULL);
+ #endif
}
static void early_output(int signal)
@@ -274,9 +279,11 @@ static void setup_early_output(struct rev_info *rev)
*
* This is a one-time-only trigger.
*/
+ #ifndef NO_SETITIMER
early_output_timer.it_value.tv_sec = 0;
early_output_timer.it_value.tv_usec = 100000;
setitimer(ITIMER_REAL, &early_output_timer, NULL);
+ #endif
}
static void finish_early_output(struct rev_info *rev)
diff --git a/daemon.c b/daemon.c
index 4602b46..eb82c19 100644
--- a/daemon.c
+++ b/daemon.c
@@ -611,9 +611,15 @@ static int execute(void)
if (addr)
loginfo("Connection from %s:%s", addr, port);
+ #ifndef NO_SETITIMER
alarm(init_timeout ? init_timeout : timeout);
+ #endif
+
pktlen = packet_read_line(0, line, sizeof(line));
+
+ #ifndef NO_SETITIMER
alarm(0);
+ #endif
len = strlen(line);
if (pktlen != len)
diff --git a/progress.c b/progress.c
index 3971f49..b84ccc7 100644
--- a/progress.c
+++ b/progress.c
@@ -45,7 +45,10 @@ static void progress_interval(int signum)
static void set_progress_signal(void)
{
struct sigaction sa;
+
+ #ifndef NO_SETITIMER
struct itimerval v;
+ #endif
progress_update = 0;
@@ -55,16 +58,21 @@ static void set_progress_signal(void)
sa.sa_flags = SA_RESTART;
sigaction(SIGALRM, &sa, NULL);
+ #ifndef NO_SETITIMER
v.it_interval.tv_sec = 1;
v.it_interval.tv_usec = 0;
v.it_value = v.it_interval;
setitimer(ITIMER_REAL, &v, NULL);
+ #endif
}
static void clear_progress_signal(void)
{
+ #ifndef NO_SETITIMER
struct itimerval v = {{0,},};
setitimer(ITIMER_REAL, &v, NULL);
+ #endif
+
signal(SIGALRM, SIG_IGN);
progress_update = 0;
}
diff --git a/upload-pack.c b/upload-pack.c
index 95d8313..e0b8b32 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -47,7 +47,9 @@ static int stateless_rpc;
static void reset_timeout(void)
{
+ #ifndef NO_SETITIMER
alarm(timeout);
+ #endif
}
static int strip(char *line, int len)
--
1.7.4.1
next prev parent reply other threads:[~2013-01-23 18:40 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-24 14:08 GIT get corrupted on lustre Eric Chamberland
2012-12-24 14:48 ` Andreas Schwab
2012-12-24 15:11 ` Brian J. Murrell
2013-01-08 16:11 ` Eric Chamberland
2013-01-09 21:20 ` Eric Chamberland
2013-01-17 13:07 ` Eric Chamberland
2013-01-17 14:23 ` Philippe Vaucher
2013-01-17 16:30 ` Eric Chamberland
2013-01-17 16:40 ` Pyeron, Jason J CTR (US)
2013-01-17 16:41 ` Maxime Boissonneault
2013-01-17 17:17 ` Pyeron, Jason J CTR (US)
2013-01-18 17:50 ` Eric Chamberland
2013-01-21 13:29 ` Erik Faye-Lund
2013-01-21 16:11 ` Thomas Rast
2013-01-21 16:14 ` Maxime Boissonneault
2013-01-21 16:20 ` Thomas Rast
2013-01-21 18:54 ` Brian J. Murrell
2013-01-21 19:29 ` Thomas Rast
2013-01-22 21:31 ` Eric Chamberland
2013-01-22 22:03 ` Junio C Hamano
2013-01-22 22:14 ` Thomas Rast
2013-01-22 22:46 ` Eric Chamberland
2013-01-23 14:45 ` Sébastien Boisvert
2013-01-23 14:50 ` Sébastien Boisvert
2013-01-23 15:23 ` Erik Faye-Lund
2013-01-23 15:32 ` Thomas Rast
2013-01-23 15:32 ` Erik Faye-Lund
2013-01-23 15:44 ` Thomas Rast
2013-01-23 15:54 ` Erik Faye-Lund
2013-01-23 17:23 ` Jonathan Nieder
2013-01-23 18:34 ` Sébastien Boisvert [this message]
2013-02-04 13:58 ` Eric Chamberland
2013-01-21 17:07 ` Eric Chamberland
2013-01-21 18:28 ` Eric Chamberland
2012-12-25 1:11 ` Greg Troxel
2012-12-26 22:51 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51002D18.4080201@calculquebec.ca \
--to=sebastien.boisvert@calculquebec.ca \
--cc=Eric.Chamberland@giref.ulaval.ca \
--cc=brian@interlinx.bc.ca \
--cc=git@vger.kernel.org \
--cc=jason.j.pyeron.ctr@mail.mil \
--cc=kusmabite@gmail.com \
--cc=maxime.boissonneault@calculquebec.ca \
--cc=philippe.vaucher@gmail.com \
--cc=trast@student.ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).