Skip Menu |

This queue is for tickets about the IPC-Run3 CPAN distribution.

Report information
The Basics
Id: 16339
Status: resolved
Priority: 0/
Queue: IPC-Run3

People
Owner: Nobody in particular
Requestors: dagolden [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.033
Fixed in: (no value)



Subject: fork.t fails on Win32
It looks like the "fixes" for forked proceses on Win32 still need work. I use IPC-Run3 as a dependency in other modules and I'd like to see it passing the Win32 build tests for ActiveState so it will be built as a PPM: http://ppm.activestate.com/BuildStatus/5.8-windows/windows-5.8/IPC-Run3-0.033.txt In my own test, downloading it and running the test suite on ActiveState Perl 5.8.7 Build 815, I get this error: Show quoted text
> nmake test TEST_VERBOSE=1 TEST_FILES=t\fork.t
Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(1, 'blib\lib', ' blib\arch')" t\fork.t t\fork....1..5 ok 1 - parent before fork ok 2 - single child ok 3 - parent after fork # child -2932: expected "child-2932:run1", got "" # child -2516: expected "child-2516:run1", got "child-2932:run1child-2516:run1" # child -4036: expected "child-4036:run1", got "child-3764:run1child-4036:run1" # child -3764: expected "child-3764:run1", got "" not ok 4 - 5 parallel child processes, each run 10 times # Failed test (t\fork.t at line 88) ok 5 - parent after parallel forks # Looks like you failed 1 test of 5. dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 4 Failed 1/5 tests, 80.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t\fork.t 1 256 5 1 20.00% 4 Failed 1/1 test scripts, 0.00% okay. 1/5 subtests failed, 80.00% okay. NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x1' Stop. I thought it might be the filehandle caching, but quickly hacking that out didn't seem to fix the problem. Until this is sorted out, I might suggest skipping the fork test on Win32 (since Win32 emulates forks with threads anyway) and documenting that forks on Win32 aren't supported yet.
OK, the test works for me on the same version of ActiveState perl, what version of Windows did zou test on? Note that the bug that's tested for by fork.t (and fixed in 0.032) - "crossover" io between children and parent after fork because of filehandle caching - is probably still there when using threads (on both Win32 and Unix), so skipping the test on Win32 would really be a cop out.
[RSCHUPP - Wed Dec 7 15:30:11 2005]: Show quoted text
> OK, the test works for me on the same version of ActiveState perl, > what version of Windows did zou test on? > Note that the bug that's tested for by fork.t (and fixed in 0.032) > - "crossover" io between children and parent after fork because > of filehandle caching - is probably still there when using threads > (on both Win32 and Unix), so skipping the test on Win32 would > really be a cop out.
I'm on Microsoft Windows XP Service Pack 1. But the real question is what is ActiveState runinng? Their failure is the more concerning one. I did some other digging and hacking -- getting rid of filehandle caching didn't seem to help. Ultimately, I found this perl bug that seems related: http://rt.perl.org/rt3/Ticket/Display.html?id=23331 I raised that bug on Perlmonks and haven't yet gotten much clarity: http://perlmonks.org/index.pl?node_id=514879 I realize that skipping the test is a "cop-out", but pseudo-forks on Win32 are already like voodoo. One of the things I like most about IPC::Run3 is that it seems like one of the most portable solutions. I'd rather see it pass test and be out there with a warning about fork on Win32 than not have it pass at all because of a long-standing bug in Perl.
- skip t/fork.t on MSWin32 and Cygwin - add note to limitations about likely failures with concurrent calls to run3() in threaded scenarios (incl. "forked" processes on Win32) - released as 0.034