nrdvana / perl-Proc-Background

Generic interface in Perl to Unix and Win32 background process management
http://metacpan.org/pod/Proc::Background
0 stars 2 forks source link

RT 30991: Windows Vista Problem #5

Closed nrdvana closed 3 years ago

nrdvana commented 5 years ago

From https://rt.cpan.org/Public/Bug/Display.html?id=30991

Mon Nov 26 16:59:57 2007 cpan [...] vance.com

Test 47 fails on Windows Vista. I don't know if the failure is in a new implementation of waitpid(), in the way processes are reaped and reported dead, or in kill(0, $pid).

This was discovered and verified with an in-house build of Perl 5.8.8. The same distribution runs the tests perfectly on Windows XP Professional. The test failure executes the same sequence of system calls as the problem that made me try Proc::Background in the first place.

nrdvana commented 5 years ago
Sun Jul 05 21:20:44 2009 TJC [...] cpan.org

On Mon Nov 26 16:59:57 2007, SRVANCE wrote: Hide quoted text

Test 47 fails on Windows Vista. I don't know if the failure is in a new implementation of waitpid(), in the way processes are reaped and reported dead, or in kill(0, $pid).

This was discovered and verified with an in-house build of Perl 5.8.8. The same distribution runs the tests perfectly on Windows XP Professional. The test failure executes the same sequence of system calls as the problem that made me try Proc::Background in the first place.

I note that Proc::Background passes its unit tests successfully on Strawberry Perl 5.10.0, on Vista/Win7. Perhaps it's worth upgrading your in-house Perl?

nrdvana commented 5 years ago
Sun Jul 05 23:35:02 2009 steve [...] vance.com

Unfortunately, we're skipping Vista. Vista and Win7 aren't the same. It's also too early for us to adopt Perl 5.10, as well. Not something that can be done lightly.

Steve

nrdvana commented 5 years ago
Mon Sep 06 05:52:22 2010 erez.schatz [...] gmail.com

On Mon Jul 06 04:20:44 2009, TJC wrote: Hide quoted text

The same distribution runs the tests perfectly on Windows XP Professional. The test failure executes the same sequence of system calls as the problem that made me try Proc::Background in the first place. Hide quoted text

I note that Proc::Background passes its unit tests successfully on Strawberry Perl 5.10.0, on Vista/Win7.

Bug replicated on WinXP sp2 with Perl 5.12.1

osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread uname='Win32 strawberryperl 5.12.1.0 #1 Thu Jul 29 10:08:11 2010 i386'

twata1 commented 3 years ago

Hello,

I tried to install Proc::Background v1.21.

It seems to me that sometimes test 47 fails on Strawberry Perl 5.28.0 32 bit under Windows 10 20H2 32 bit. It seems to me that test 47 always fails on Strawberry Perl 5.28.2 64 bit under Windows 8.1 64 bit.

nrdvana commented 3 years ago

Hi, I'd love to get this fixed, but I don't have access to a system where it fails. I'm wondering if it is simply a race condition. Could you increase the sleep value and see if 47 passes? and maybe recommend a new sleep value? I don't want to increase it arbitrarily because it slows down the testing for everyone.

twata1 commented 3 years ago

Hi, Thank you for your reply.

For test 47, My recommended sleep value is 5 if possible.

There are the following differences between my Windows 10 PC and Windows 8.1 PC.

Windows 10 32 bit: Third party anti‐virus software is not installed.

Windows 8.1 64 bit: Third party anti‐virus software (ESET Internet Security) is installed.

For Windows 10 20H2 32 bit:

I repeated the command prove -lv t\01proc.t 20 times. The result is as follows.

sleep value test 47 result
1 Failed 6 times out of 20 times.
2 Failed 7 times out of 20 times.
3 Failed 3 times out of 20 times.
4 Failed 1 times out of 20 times.
5 Failed 0 times out of 20 times.

For Strawberry Perl 5.28.2 64 bit under Windows 8.1 64 bit:

The test 47 almost passes when I disable Host-based Intrusion Prevention System (HIPS) in ESET Internet Security. I'm sorry I couldn't notice this. Because it fails very occasionally, so I tried to measure it, and when I tested it (prove -lv t\01proc.t) 20 times, the test was successful 20 times.

Thank you,

nrdvana commented 3 years ago

I came up with a slightly better idea where I just call kill on 1-second intervals until it succeeds. The fix is released in version 1.22, on its way to cpan.