← Back to team overview

maria-developers team mailing list archive

Windows buildslaves: suggestion for remedy of 'exception' failures.

 

Hi!

Both mine and Bo's buildslave are prone to error conditions like this:
http://askmonty.org/buildbot/builders/win32-rel-nmake/builds/19/steps/bzr/logs/err.html

Here is a suggestion on how to eliminate those.

Buildslave setup
----------------
Buildslave owner needs to download pstools and handle utilites:

http://technet.microsoft.com/en-us/sysinternals/bb896683.aspx
http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx

they need to unpack the zips, then put handle.exe, pskill.exe, pdh.dll somwhere
on the path, and then run both exe files manually. The first manual run is
needed to accept the EULA.

Buildbot script
---------------

I've come up with this script that uses the above utilities to kill all stray
processes:

#!/usr/bin/perl
my $cmd="handle.exe maria-slave |" ;
open(IN, $cmd) || die("Failed to pipe from handle.exe");
my @pids = ();
print "$cmd\n";
while(<IN>) {
  print $_;
  if (/ pid: ([0-9]+) /) {
    push @pids, $1;
  }
}
close(IN);
print "\n\n";
my %hash = map { $_ => 1} @pids;
my @uniq_pids = keys %hash;
foreach (@uniq_pids) { 
  $cmd= "pskill.exe $_\n";
  print $cmd;
  system($cmd);
}

EOF

The question is, where do we put the script? Have buildslave owners put it on
the slaves manually (bad, complicates the setup)? Download through buildbot?

We can't put it into the lp:maria repository because the failure occurs before
the bzr branch command, i.e. at a point where there might be not yet a 
repository. On the other hand, if there is not yet a repository, then the 
exception condition won't occur.

Any comments?

BR
 Sergey
-- 
Sergey Petrunia, Software Developer
Monty Program AB, http://askmonty.org
Blog: http://s.petrunia.net/blog



Follow ups