On 4/9/17 1:23 AM, Graham Bloice wrote:
>
>
> On 9 April 2017 at 01:54, Gerald Combs <gerald@xxxxxxxxxxxxx
> <mailto:gerald@xxxxxxxxxxxxx>> wrote:
>
> On 4/8/17 10:47 AM, Peter Wu wrote:
> >
> > There is another problem though with the Petri-Dish builder, a previous
> > build on the Petri-Dish Windows x86 builder failed and left a process on
> > the machine, breaking all following builds. Gerald, can you have a look?
>
> It's back up.
>
> > Maybe it is an idea to add a pass that kills all
> > dumpcap/tshark/wireshark processes before starting the build? (Assuming
> > that no other builds happen in parallel).
>
> Is there a straightforward equivalent to "kill -9 $( lsof -t
> /path/to/buildbot )" on Windows?
>
>
> Difficult to identify which process you want to kill with
> Stop-Process. With PS 4.0 and later you can run ((Get-Process
> -IncludeUserName).where({$_.username -AND $_.username -notmatch "^NT"})) to
> get the processes owned by the user account running the command, but
> there's still too many in there that shouldn't be stopped.
>
> Maybe Get-Process | Where-Object -Property ProcessName -match
> ".*(Process1|Process2|Process3).*" | Stop-Process would do if the number of
> processes to look for isn't too bad.
How difficult would it be to parse the output of the Sysinternals "Handle" utility in PS? That would presumably tell us which process has the build directory locked while limiting the risk of clobbering any other Buildbot instances that happen to be running.