develooper Front page | perl.perl5.porters | Postings from February 2011

Re: Devel::DProf (was Re: First pass at Test::PerlRun)

Thread Previous | Thread Next
From:
George Greer
Date:
February 4, 2011 20:11
Subject:
Re: Devel::DProf (was Re: First pass at Test::PerlRun)
Message ID:
alpine.LFD.2.02.1102042248050.25323@ein.m-l.org
On Thu, 3 Feb 2011, Craig A. Berry wrote:

> On Thu, Feb 3, 2011 at 7:19 AM, Nicholas Clark <nick@ccl4.org> wrote:
>
>>> As I think Jesse said on IRC, I also feel that the code from which_perl()
>>> should have copyright attribution. git blame log says that it's
>>> Schwern, Jarkko, Craig Berry, Paul Green, and me.
>
> Jerry Hedden wrote the watchdog code and I think George Greer made
> some important improvements to it.

On Win32 there was a case in openpid.t where the call chain was:

1.  perl
2.   \- cmd /c
3.       \- perl

And the watchdog in #3 would try to kill its parent (#2) but if that 
process had already terminated before the timeout and PIDs recycled fast 
enough (which seems easy in Windows 2000) then it will kill an unrelated, 
innocent process.

I was trying to reproduce the intermittant openpid.t failure at the time 
so I had a script essentially doing:

 	@echo off
 	:loop
 	.\perl -I lib t\io\openpid.t
 	if errorlevel 1 goto failed
 	goto loop
 	:failed

Watching Process Explorer (or Task Manager) showed perl processes #3 
hanging around until the full time expired then trying to kill a process 
that already terminated and the smoke tests running in the same VM had 
tests randomly terminated if they happened to have reused the same PID at 
the time.

So the extra argument let it choose an alarm strategy to avoid that.

I also made it more lenient to valgrind runs because valgrind is sloooow 
but that's not really complex.

-- 
George Greer

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About