develooper Front page | perl.perl5.porters | Postings from May 2015

Misbehaving watchdog on Windows?

Thread Next
From:
Steve Hay
Date:
May 9, 2015 18:35
Subject:
Misbehaving watchdog on Windows?
Message ID:
CADED=K5z2bu+JdE_ndwd_D=ZrOCKrmE-pwXnxVFGcM-O4Y+7EA@mail.gmail.com
In the course of trying to test 5.22.0-RC0 with multiple
compilers/configurations I keep running into a nasty thing that I've
seen happen before and heard others mention before too: random
processes on my machine sometimes get killed during the test run,
sometimes even leading to the machine locking up or rebooting itself,
presumably depending on how fundamental to Windows the nuked processes
were.

I would log it as a blocker bug, but for the fact that I think it's
quite an old problem, surely pre-5.20 at least. I recall talk of the
problem at the time of the kill process tree feature (broken in
5.17.2) getting fixed (in 5.19.10) and watchdog() switching to using
it (in commit http://perl5.git.perl.org/perl.git/commit/18ae2abf04).
The kill process tree bug was reported in perl #121230 and there is
talk there (after the fix was applied) of this kind of problem
affecting George's smokers -- see
https://rt.perl.org/Ticket/Display.html?id=121230#txn-1289113 and
http://www.nntp.perl.org/group/perl.perl5.porters/2014/04/msg214650.html
.

Does anyone recall if we had this problem before the watchdog() change
cited above, changing kill('KILL', ...) to kill('-KILL', ...)?

The purpose of that change was to kill the cmd.exe->perl.exe process
tree, rather than just the cmd.exe (i.e. wrongly leaving the perl.exe
behind), since the system(1, $cmd) done in watchdog() unexpectedly
launched perl.exe via a cmd.exe rather than directly.

However, as I've just commented on perl #121283 (see
https://rt.perl.org/Ticket/Display.html?id=121283#txn-1348203) there
are ways to guarantee launching the watchdog perl.exe directly, rather
than via a cmd.exe. If we did that, e.g. change the system(1, $cmd) to
system(1, @multi_element_cmd), then we could revert the kill('-KILL',
...) to kill('KILL, ...), which *might* stop this occasional
process-nuking nastiness, unless it predated the switch to -KILL
anyway.

I'm going to try it out locally, anyway, to see if it does indeed seem
to fix the problem (although it's always hard to be sure with such
intermittent problems): That in itself would be a useful data point
regarding whether it's the restored -KILL feature that is the trouble,
or whether it's something else entirely.

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