You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jh...@apache.org on 2012/11/15 22:07:28 UTC
svn commit: r1410013 - /spamassassin/trunk/masses/rule-qa/reports-from-logs
Author: jhardin
Date: Thu Nov 15 21:07:27 2012
New Revision: 1410013
URL: http://svn.apache.org/viewvc?rev=1410013&view=rev
Log:
Add a timeout around ruleqa SVN operations, they have been observed to wedge on the ruleqa zone VM
Modified:
spamassassin/trunk/masses/rule-qa/reports-from-logs
Modified: spamassassin/trunk/masses/rule-qa/reports-from-logs
URL: http://svn.apache.org/viewvc/spamassassin/trunk/masses/rule-qa/reports-from-logs?rev=1410013&r1=1410012&r2=1410013&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-qa/reports-from-logs (original)
+++ spamassassin/trunk/masses/rule-qa/reports-from-logs Thu Nov 15 21:07:27 2012
@@ -493,8 +493,15 @@ sub start_hit_frequencies_at_rev {
my $needs_checkout = 0;
if (-d $hfdir && chdir $hfdir) {
- runcmd("svn up -r$rev");
- if ($?>>8 != 0 || !-f $expected_svn_file) {
+ eval {
+ # "svn up" has been observed to wedge on the ruleqa zone VM, put a timeout so we can recover
+ local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required
+ alarm 60*60; # an hour should be generous enough
+ runcmd("svn up -r$rev");
+ alarm 0;
+ };
+
+ if ($@ || $?>>8 != 0 || !-f $expected_svn_file) {
print "simple 'svn update' failed. performing full checkout instead...\n";
$needs_checkout = 1;
}
@@ -505,8 +512,13 @@ sub start_hit_frequencies_at_rev {
if ($needs_checkout) {
my $svnurl = get_svn_url();
runcmd("rm -rf $hfdir");
- runcmd("svn co $svnurl\@$rev $hfdir");
- if ($?>>8 != 0 || !-f $expected_svn_file) { die "svn co failed"; }
+ eval {
+ local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required
+ alarm 60*60; # an hour should be generous enough
+ runcmd("svn co $svnurl\@$rev $hfdir");
+ alarm 0;
+ };
+ if ($@ || $?>>8 != 0 || !-f $expected_svn_file) { die "svn co failed"; }
}
chdir "$hfdir" or die "cannot chdir $hfdir";