-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test.pl's watchdog() always times out and blocks harness while it is timing out on Win32 #13647
Comments
From @bulk88Created by @bulk88On Win32 re/subst.t and other subst*.t tests take 300 Here is the problematic code from test.pl # If we still have a fake PID, we can't use this method at all # Launch watchdog process # Add END block to parent to terminate and The problem is, the system() above, $watchdog contains a PID for 1st solution the above issue is being worked out in 2nd solution is to a process group kill [on Win32] the watchdog, the wait() if kill('KILL', $watchdog); };"; wait() if kill('-KILL', $watchdog); };"; 3rd solution is to not kill the process with perl's kill(), but call a Perl Info
|
From @bulk88Patch attached. Since this should go in for 5.20, I picked the easiest path, which is use process group kill to kill the cmd.exe and the perl.exe underneath that, since that is now committed under #121230 (121230 still has a unresolved smoker problem, but watchdog doesnt block now with this patch, I hope it wont block with the smoker). The patch saves about 900 seconds/15 minutes. Files=2406, Tests=691402, 3263 wallclock secs (125.98 usr + 4.88 sys = 130.86 C All tests successful. Ignore the fail, it was to prevent a hang so I get a accurate before time count. -- |
From @bulk880001-121395-fix-on-Win32-test.pl-watchdog-always-blocks-f.patchFrom fb9c5a1a0fcfb4a2365d1e1e33b5e738d5ff9302 Mon Sep 17 00:00:00 2001
From: bulk88 <bulk88@hotmail.com>
Date: Sun, 23 Mar 2014 21:01:15 -0400
Subject: [PATCH] #121395 fix, on Win32 test.pl watchdog always blocks for
entire timeout
See Perl RT #121395 for details.
---
pod/perldelta.pod | 7 +++++++
t/test.pl | 10 ++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 5906e78..358aea3 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -309,6 +309,13 @@ L</Modules and Pragmata> section.
XXX
+=item Win32
+
+About 15 minutes of idle sleeping was removed from running C<make test> due to
+a bug in which the timeout monitor used for tests could not be cancelled once
+the test completes, and the full timeout period elapsed before running the next
+test file.
+
=back
=head1 Internal Changes
diff --git a/t/test.pl b/t/test.pl
index 15282ca..30db88c 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -1558,8 +1558,14 @@ sub watchdog ($;$)
# Add END block to parent to terminate and
# clean up watchdog process
- eval "END { local \$! = 0; local \$? = 0;
- wait() if kill('KILL', $watchdog); };";
+ # Win32 watchdog is launched by cmd.exe shell, so use process group
+ # kill, otherwise the watchdog is never killed and harness waits
+ # every time for the timeout, #121395
+ eval( $is_mswin ?
+ "END { local \$! = 0; local \$? = 0;
+ wait() if kill('-KILL', $watchdog); };"
+ : "END { local \$! = 0; local \$? = 0;
+ wait() if kill('KILL', $watchdog); };");
return;
}
--
1.7.9.msysgit.0
|
From @steve-m-hayThanks, patch applied as 18ae2ab. |
The RT System itself - Status changed from 'new' to 'open' |
@steve-m-hay - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#121395 (status was 'resolved')
Searchable as RT121395$
The text was updated successfully, but these errors were encountered: