Skip Menu |
 

This queue is for tickets about the Net-Server CPAN distribution.

Report information
The Basics
Id: 81993
Status: open
Priority: 0/
Queue: Net-Server

People
Owner: Nobody in particular
Requestors: gabor [...] szabgab.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 2.006
  • 2.007
  • 2.008
  • 2.009
Fixed in: (no value)

Attachments
block_until_ready_to_test.StrawberryP5-14-4.patch
Server_PreForkSimple.t.StrawberryP5-14-4.patch



Subject: Net-Server-2.006 test stuck on Windows
Date: Sat, 15 Dec 2012 10:55:20 +0200
To: bug-Net-Server [...] rt.cpan.org
From: Gabor Szabo <gabor [...] szabgab.com>
Download (untitled) / with headers
text/plain 2.4k
running Strawberry Perl 5.16.2 32 bit the test gets stuck CPAN.pm: Building R/RH/RHANDOM/Net-Server-2.006.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Net::Server Writing MYMETA.yml and MYMETA.json (C:\strawberry_5_16_2_1\perl\bin\perl.exe Makefile.PL exited with 0) CPAN::Reporter: Makefile.PL result is 'pass', No errors. cp lib/Net/Server/Proto/UDP.pm blib\lib\Net\Server\Proto\UDP.pm cp lib/Net/Server/Proto/UNIX.pm blib\lib\Net\Server\Proto\UNIX.pm cp lib/Net/Server/PreFork.pm blib\lib\Net\Server\PreFork.pm cp lib/Net/Server/PSGI.pm blib\lib\Net\Server\PSGI.pm cp lib/Net/Server/Proto/SSL.pm blib\lib\Net\Server\Proto\SSL.pm cp lib/Net/Server.pm blib\lib\Net\Server.pm cp lib/Net/Server/Proto/TCP.pm blib\lib\Net\Server\Proto\TCP.pm cp lib/Net/Server/MultiType.pm blib\lib\Net\Server\MultiType.pm cp lib/Net/Server/SIG.pm blib\lib\Net\Server\SIG.pm cp lib/Net/Server/Proto/SSLEAY.pm blib\lib\Net\Server\Proto\SSLEAY.pm cp lib/Net/Server/Log/Sys/Syslog.pm blib\lib\Net\Server\Log\Sys\Syslog.pm cp lib/Net/Server/INET.pm blib\lib\Net\Server\INET.pm cp lib/Net/Server/Fork.pm blib\lib\Net\Server\Fork.pm cp lib/Net/Server/Multiplex.pm blib\lib\Net\Server\Multiplex.pm cp lib/Net/Server.pod blib\lib\Net\Server.pod cp lib/Net/Server/Proto/UNIXDGRAM.pm blib\lib\Net\Server\Proto\UNIXDGRAM.pm cp lib/Net/Server/Log/Log/Log4perl.pm blib\lib\Net\Server\Log\Log\Log4perl.pm cp lib/Net/Server/Daemonize.pm blib\lib\Net\Server\Daemonize.pm cp lib/Net/Server/PreForkSimple.pm blib\lib\Net\Server\PreForkSimple.pm cp lib/Net/Server/Proto.pm blib\lib\Net\Server\Proto.pm cp lib/Net/Server/Single.pm blib\lib\Net\Server\Single.pm cp lib/Net/Server/HTTP.pm blib\lib\Net\Server\HTTP.pm C:\strawberry_5_16_2_1\perl\bin\perl.exe -MExtUtils::Command -e cp -- bin/net-server blib\script\net-server pl2bat.bat blib\script\net-server (C:\strawberry_5_16_2_1\c\bin\dmake.exe exited with 0) CPAN::Reporter: dmake result is 'pass', No errors. RHANDOM/Net-Server-2.006.tar.gz C:\strawberry_5_16_2_1\c\bin\dmake.exe -- OK Running make test C:\strawberry_5_16_2_1\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t Error removing C:\DOCUME~1\GABORS~1\LOCALS~1\Temp\iW1Kf4ONFP.log at C:/strawberry_5_16_2_1/perl/lib/File/Temp.pm line 890. t/Options.t ............... ok t/Port_Configuration.t .... ok t/Server_BASE.t ........... ok t/Server_Fork.t ........... ok t/Server_http.t ........... ok t/Server_INET.t ........... ok t/Server_Multiplex.t ...... ok t/Server_MultiType.t ...... ok
The tests should no longer stick - though now we hopefully will see why it is failing better.
Subject: Re: [rt.cpan.org #81993] Net-Server-2.006 test stuck on Windows
Date: Thu, 10 Jan 2013 22:15:28 +0200
To: bug-Net-Server [...] rt.cpan.org
From: Gabor Szabo <gabor [...] szabgab.com>
Download (untitled) / with headers
text/plain 494b
I don't see the fix in the released code. If you add these two lines to both t\Server_PreFork.t and t\Server_PreForkSimple.t print "1..0 # SKIP Gets stuck on Windows\n" if $^O eq 'MSWin32'; exit(0); like this: use NetServerTest qw(prepare_test ok use_ok diag); print "1..0 # SKIP Gets stuck on Windows\n" if $^O eq 'MSWin32'; exit(0); my $env = prepare_test({n_tests => 5, start_port => 20600, n_ports => 2}); # runs three of its own tests That will skip the test files on windows. Gabor
Subject: Re: [rt.cpan.org #81993] Net-Server-2.006 test stuck on Windows
Date: Thu, 10 Jan 2013 22:30:19 -0700
To: bug-Net-Server [...] rt.cpan.org
From: Paul Seamons <paul [...] seamons.com>
I'd like to know what is failing - I have made them timeout faster, but I'd like to know what is hanging, and perhaps when I can bring up a windows vm i will load strawberry again and try and get it going again - it is possible the fork servers will just have to skip since they are the problem because of the apparent inability to double fork in windows. Paul On 01/10/2013 01:15 PM, Gabor Szabo via RT wrote: Show quoted text
> Queue: Net-Server > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81993 > > > I don't see the fix in the released code. > If you add these two lines to both t\Server_PreFork.t and > t\Server_PreForkSimple.t > > print "1..0 # SKIP Gets stuck on Windows\n" if $^O eq 'MSWin32'; > exit(0); > > like this: > > use NetServerTest qw(prepare_test ok use_ok diag); > print "1..0 # SKIP Gets stuck on Windows\n" if $^O eq 'MSWin32'; > exit(0); > my $env = prepare_test({n_tests => 5, start_port => 20600, n_ports => > 2}); # runs three of its own tests > > That will skip the test files on windows. > > Gabor > >
Subject: Re: [rt.cpan.org #81993] Net-Server-2.006 test stuck on Windows
Date: Fri, 11 Jan 2013 07:39:29 +0200
To: bug-Net-Server [...] rt.cpan.org
From: Gabor Szabo <gabor [...] szabgab.com>
Download (untitled) / with headers
text/plain 1.5k
As they are now, the Prefork tests just get stuck which means I need to manually stop them or just disable smoking Net-Server. If you'd like I can check certain changes in the PreFork tests manually and then let you know if something happens to work. I am also going to post on the win32 mailing list asking for other people to take a look. Gabor On Fri, Jan 11, 2013 at 7:30 AM, Paul Seamons via RT <bug-Net-Server@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=81993 > > > I'd like to know what is failing - I have made them timeout faster, but > I'd like to know what is hanging, and perhaps when I can bring up a > windows vm i will load strawberry again and try and get it going again - > it is possible the fork servers will just have to skip since they are > the problem because of the apparent inability to double fork in windows. > > Paul > > On 01/10/2013 01:15 PM, Gabor Szabo via RT wrote:
>> Queue: Net-Server >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81993 > >> >> I don't see the fix in the released code. >> If you add these two lines to both t\Server_PreFork.t and >> t\Server_PreForkSimple.t >> >> print "1..0 # SKIP Gets stuck on Windows\n" if $^O eq 'MSWin32'; >> exit(0); >> >> like this: >> >> use NetServerTest qw(prepare_test ok use_ok diag); >> print "1..0 # SKIP Gets stuck on Windows\n" if $^O eq 'MSWin32'; >> exit(0); >> my $env = prepare_test({n_tests => 5, start_port => 20600, n_ports => >> 2}); # runs three of its own tests >> >> That will skip the test files on windows. >> >> Gabor >> >>
>
Download (untitled) / with headers
text/plain 2.6k
On Thu Jan 10 03:08:54 2013, RHANDOM wrote: Show quoted text
> The tests should no longer stick - though now we hopefully will see why > it is failing better.
Still happening in 2.007 under Strawberry Perl 5.12.3. Running make for R/RH/RHANDOM/Net-Server-2.007.tar.gz Checksum for C:\strawberry\cpan\sources\authors\id\R\RH\RHANDOM\Net-Server-2.007 .tar.gz ok CPAN.pm: Building R/RH/RHANDOM/Net-Server-2.007.tar.gz Checking if your kit is complete... Looks good Writing Makefile for Net::Server Writing MYMETA.yml and MYMETA.json (C:\strawberry\perl\bin\perl.exe Makefile.PL exited with 0) CPAN::Reporter: Makefile.PL result is 'pass', No errors. cp lib/Net/Server/Proto/UDP.pm blib\lib\Net\Server\Proto\UDP.pm cp lib/Net/Server/Proto/UNIX.pm blib\lib\Net\Server\Proto\UNIX.pm cp lib/Net/Server/PreFork.pm blib\lib\Net\Server\PreFork.pm cp lib/Net/Server/PSGI.pm blib\lib\Net\Server\PSGI.pm cp lib/Net/Server/Proto/SSL.pm blib\lib\Net\Server\Proto\SSL.pm cp lib/Net/Server.pm blib\lib\Net\Server.pm cp lib/Net/Server/Proto/TCP.pm blib\lib\Net\Server\Proto\TCP.pm cp lib/Net/Server/MultiType.pm blib\lib\Net\Server\MultiType.pm cp lib/Net/Server/SIG.pm blib\lib\Net\Server\SIG.pm cp lib/Net/Server/Proto/SSLEAY.pm blib\lib\Net\Server\Proto\SSLEAY.pm cp lib/Net/Server/Log/Sys/Syslog.pm blib\lib\Net\Server\Log\Sys\Syslog.pm cp lib/Net/Server/INET.pm blib\lib\Net\Server\INET.pm cp lib/Net/Server/Fork.pm blib\lib\Net\Server\Fork.pm cp lib/Net/Server/Multiplex.pm blib\lib\Net\Server\Multiplex.pm cp lib/Net/Server.pod blib\lib\Net\Server.pod cp lib/Net/Server/Proto/UNIXDGRAM.pm blib\lib\Net\Server\Proto\UNIXDGRAM.pm cp lib/Net/Server/Log/Log/Log4perl.pm blib\lib\Net\Server\Log\Log\Log4perl.pm cp lib/Net/Server/Daemonize.pm blib\lib\Net\Server\Daemonize.pm cp lib/Net/Server/PreForkSimple.pm blib\lib\Net\Server\PreForkSimple.pm cp lib/Net/Server/Proto.pm blib\lib\Net\Server\Proto.pm cp lib/Net/Server/Single.pm blib\lib\Net\Server\Single.pm cp lib/Net/Server/HTTP.pm blib\lib\Net\Server\HTTP.pm C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e cp -- bin/net-server blib \script\net-server pl2bat.bat blib\script\net-server (C:\strawberry\c\bin\dmake.EXE exited with 0) CPAN::Reporter: dmake result is 'pass', No errors. RHANDOM/Net-Server-2.007.tar.gz C:\strawberry\c\bin\dmake.EXE -- OK Running make test C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/Options.t ............... ok # number of tests ran 35 did not match number of specified tests 51 t/Port_Configuration.t .... Failed 17/51 subtests t/Server_BASE.t ........... ok t/Server_Fork.t ........... ok t/Server_http.t ........... ok t/Server_INET.t ........... ok t/Server_Multiplex.t ...... ok t/Server_MultiType.t ...... ok
Download (untitled) / with headers
text/plain 2.3k
Under Strawberry Perl 5.16.2 it hangs in a different place. If you need help testing changes, just let me know. CPAN.pm: Building R/RH/RHANDOM/Net-Server-2.007.tar.gz CPAN: CPAN::Reporter loaded ok (v1.2009) Checking if your kit is complete... Looks good Writing Makefile for Net::Server Writing MYMETA.yml and MYMETA.json (C:\strawberry\perl\bin\perl.exe Makefile.PL exited with 0) CPAN::Reporter: Makefile.PL result is 'pass', No errors. cp lib/Net/Server/Proto/UDP.pm blib\lib\Net\Server\Proto\UDP.pm cp lib/Net/Server/Proto/UNIX.pm blib\lib\Net\Server\Proto\UNIX.pm cp lib/Net/Server/PreFork.pm blib\lib\Net\Server\PreFork.pm cp lib/Net/Server/PSGI.pm blib\lib\Net\Server\PSGI.pm cp lib/Net/Server/Proto/SSL.pm blib\lib\Net\Server\Proto\SSL.pm cp lib/Net/Server.pm blib\lib\Net\Server.pm cp lib/Net/Server/Proto/TCP.pm blib\lib\Net\Server\Proto\TCP.pm cp lib/Net/Server/MultiType.pm blib\lib\Net\Server\MultiType.pm cp lib/Net/Server/SIG.pm blib\lib\Net\Server\SIG.pm cp lib/Net/Server/Proto/SSLEAY.pm blib\lib\Net\Server\Proto\SSLEAY.pm cp lib/Net/Server/Log/Sys/Syslog.pm blib\lib\Net\Server\Log\Sys\Syslog.pm cp lib/Net/Server/INET.pm blib\lib\Net\Server\INET.pm cp lib/Net/Server/Fork.pm blib\lib\Net\Server\Fork.pm cp lib/Net/Server/Multiplex.pm blib\lib\Net\Server\Multiplex.pm cp lib/Net/Server.pod blib\lib\Net\Server.pod cp lib/Net/Server/Proto/UNIXDGRAM.pm blib\lib\Net\Server\Proto\UNIXDGRAM.pm cp lib/Net/Server/Log/Log/Log4perl.pm blib\lib\Net\Server\Log\Log\Log4perl.pm cp lib/Net/Server/Daemonize.pm blib\lib\Net\Server\Daemonize.pm cp lib/Net/Server/PreForkSimple.pm blib\lib\Net\Server\PreForkSimple.pm cp lib/Net/Server/Proto.pm blib\lib\Net\Server\Proto.pm cp lib/Net/Server/Single.pm blib\lib\Net\Server\Single.pm cp lib/Net/Server/HTTP.pm blib\lib\Net\Server\HTTP.pm C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e cp -- bin/net-server blib \script\net-server pl2bat.bat blib\script\net-server (C:\strawberry\c\bin\dmake.exe exited with 0) CPAN::Reporter: dmake result is 'pass', No errors. RHANDOM/Net-Server-2.007.tar.gz C:\strawberry\c\bin\dmake.exe -- OK Running make test C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/Options.t ............... ok # number of tests ran 35 did not match number of specified tests 51 t/Port_Configuration.t .... Failed 17/51 subtests
Download (untitled) / with headers
text/plain 1.9k
Under Strawberry Perl 5.18.2 multi-thread x64 it hangs in Server_PreFork.t as Gabor mentioned skipping the tests on windows would be appreciated. However, I do understand the want to resolve the issue. The stack info for the most childish perl process running has two threads shows(perl.exe0x14e0): ntdll.dll!NtReadFile+0xa KERNELBASE.dll!ReadFile+0x78 ConEmuHk64.dll!SetFarHookMode+0x6eb4 msvcrt.dll!swscanf+0x6fd msvcrt.dll!read+0xa9 perl518.dll!PerlIOBuf_get_base+0x458 perl518.dll!PerlIOBuf_fill+0xdf perl518.dll!Perl_PerlIO_fill+0x28 perl518.dll!PerlIOBase_read+0x100 perl518.dll!Perl_setdefout+0x18ea perl518.dll!Perl_runops_standard+0x16 perl518.dll!perl_run+0x379 perl518.dll!RunPerl+0x168 perl.exe+0x13d7 perl.exe+0x14f8 KERNEL32.DLL!BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d the stack remains the same during lock time. swscanf surprises me in that output... the other thread: (perl518.dll!Perl_get_re_arg+0x44c0) ntdll.dll!NtWaitForSingleObject+0xa ntdll.dll!AlpcFreeCompletionListMessage+0x1f1 ntdll.dll!RtlEnterCriticalSection+0xe4 msvcrt.dll!isleadbyte_l+0x20e msvcrt.dll!fstat64+0xac perl518.dll!PerlIO_init+0x2a8 perl518.dll!PerlIO_init+0x34f perl518.dll!PerlIOBase_dup+0x53 perl518.dll!PerlIOBuf_dup+0x70 perl518.dll!Perl_fp_dup+0x45 perl518.dll!PerlIO_list_free+0x327 perl518.dll!perl_clone_using+0xac6 perl518.dll!Perl_get_re_arg+0x3d3f perl518.dll!Perl_setdefout+0x74c4 perl518.dll!Perl_runops_standard+0x16 perl518.dll!Perl_get_re_arg+0x4690 KERNEL32.DLL!BaseThreadInitThunk+0xd ntdll.dll!RtlUserThreadStart+0x1d A solution or a skip is appreciated; as I am tempted to filter the module to stop having to kill the most childish process. I would be interested in a strawberry build with debug symbols that I could step through issues like this; not there yet. this stack info from procexp is the best info I've found so far. probably not illuminating enough, to resolve; idk. thanks Cheers. --dave http://perlmonks.org/?node_id=1064341 hanging camels?
Download (untitled) / with headers
text/plain 3.4k
If no skip is put in place; a smoker can not simply modify local code to include, so exclusion is a remedy but I don't want to do that just yet... Plus better to start a list of hanging tests and strange behavior than to ignore it. I haven't gone so far as to schedule it to run in the background looking for problematic on my smokers, but i may in the future. from inside a ps1 script or inside a powershell: Get-WmiObject Win32_Process -Filter "name = 'perl.exe'" | where {$_.CommandLine -eq '"C:\strawberry\perl\bin\perl.exe" t/Server_PreFork.t'} | ForEach-Object { Invoke-WmiMethod -Path $_.__Path –Name Terminate } Get-WmiObject Win32_Process -Filter "name = 'perl.exe'" | where {$_.CommandLine -eq '"C:\strawberry\perl\bin\perl.exe" t/Server_PreForkSimple.t'} | ForEach-Object { Invoke-WmiMethod -Path $_.__Path –Name Terminate } this is sorta brute force, but it's quick and works without visually expanding a process tree and having to discern details. i'm not sure how to schedule these checks best on the smoker; maybe a module to hook into the smoking process and perform a task/run a command every x minutes? idk. anyways for now I've got a quicker resolution. a solution would be appreciated. cheers to an unstuck tester. --dave http://dave.thehorners.com/tech-talk/windows-os/356-powershell-net-control-and-automation On Tue Aug 05 16:15:21 2014, MRHORNER wrote: Show quoted text
> Under Strawberry Perl 5.18.2 multi-thread x64 it hangs in > Server_PreFork.t as Gabor mentioned skipping the tests on windows > would be appreciated. However, I do understand the want to resolve > the issue. > > The stack info for the most childish perl process running has two > threads shows(perl.exe0x14e0): > ntdll.dll!NtReadFile+0xa > KERNELBASE.dll!ReadFile+0x78 > ConEmuHk64.dll!SetFarHookMode+0x6eb4 > msvcrt.dll!swscanf+0x6fd > msvcrt.dll!read+0xa9 > perl518.dll!PerlIOBuf_get_base+0x458 > perl518.dll!PerlIOBuf_fill+0xdf > perl518.dll!Perl_PerlIO_fill+0x28 > perl518.dll!PerlIOBase_read+0x100 > perl518.dll!Perl_setdefout+0x18ea > perl518.dll!Perl_runops_standard+0x16 > perl518.dll!perl_run+0x379 > perl518.dll!RunPerl+0x168 > perl.exe+0x13d7 > perl.exe+0x14f8 > KERNEL32.DLL!BaseThreadInitThunk+0xd > ntdll.dll!RtlUserThreadStart+0x1d > > the stack remains the same during lock time. > > swscanf surprises me in that output... > > the other thread: (perl518.dll!Perl_get_re_arg+0x44c0) > > ntdll.dll!NtWaitForSingleObject+0xa > ntdll.dll!AlpcFreeCompletionListMessage+0x1f1 > ntdll.dll!RtlEnterCriticalSection+0xe4 > msvcrt.dll!isleadbyte_l+0x20e > msvcrt.dll!fstat64+0xac > perl518.dll!PerlIO_init+0x2a8 > perl518.dll!PerlIO_init+0x34f > perl518.dll!PerlIOBase_dup+0x53 > perl518.dll!PerlIOBuf_dup+0x70 > perl518.dll!Perl_fp_dup+0x45 > perl518.dll!PerlIO_list_free+0x327 > perl518.dll!perl_clone_using+0xac6 > perl518.dll!Perl_get_re_arg+0x3d3f > perl518.dll!Perl_setdefout+0x74c4 > perl518.dll!Perl_runops_standard+0x16 > perl518.dll!Perl_get_re_arg+0x4690 > KERNEL32.DLL!BaseThreadInitThunk+0xd > ntdll.dll!RtlUserThreadStart+0x1d > > A solution or a skip is appreciated; as I am tempted to filter the > module to stop having to kill the most childish process. > > I would be interested in a strawberry build with debug symbols that I > could step through issues like this; not there yet. this stack info > from procexp is the best info I've found so far. probably not > illuminating enough, to resolve; idk. > > thanks > Cheers. > --dave > http://perlmonks.org/?node_id=1064341 hanging camels?
A better/more accurate callstack for Server_PreFork.t hang. first thread ---------------------------------------------------------------------- ntdll.dll!_KiFastSystemCallRet@0() ntdll.dll!_NtReadFile@36() + 0xc kernel32.dll!_ReadFile@20() + 0x67 msvcr71.dll!_read_lk(int fh=3, void * buf=0x00e5815c, unsigned int cnt=8192) Line 154 + 0x15 C msvcr71.dll!_read(int fh=3, void * buf=0x00e5815c, unsigned int cnt=8192) Line 75 + 0xc C perl523.dll!PerlLIORead(IPerlLIO * piPerl=0x003664a4, int handle=3, void * buffer=0x00e5815c, unsigned int count=8192) Line 1029 + 0x12 C perl523.dll!PerlIOUnix_read(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x00e8ef84, void * vbuf=0x00e5815c, unsigned int count=8192) Line 2730 + 0x14 C perl523.dll!Perl_PerlIO_read(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x00e8ef84, void * vbuf=0x00e5815c, unsigned int count=8192) Line 1591 + 0x27 C perl523.dll!PerlIOBuf_fill(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x008f5c74) Line 4032 + 0xb C perl523.dll!Perl_PerlIO_fill(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x008f5c74) Line 1686 + 0x23 C perl523.dll!PerlIOBase_read(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x008f5c74, void * vbuf=0x0140e624, unsigned int count=1) Line 2082 + 0xb C perl523.dll!PerlIOBuf_read(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x008f5c74, void * vbuf=0x0140e624, unsigned int count=1) Line 4056 + 0xf C perl523.dll!Perl_PerlIO_read(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x008f5c74, void * vbuf=0x0140e624, unsigned int count=1) Line 1591 + 0x27 C perl523.dll!Perl_pp_sysread(interpreter * my_perl=0x01000000) Line 1819 + 0xd C perl523.dll!Perl_runops_standard(interpreter * my_perl=0x003642d4) Line 41 + 0x4 C perl523.dll!S_run_body(interpreter * my_perl=0x00000724, long oldscope=1) Line 2448 + 0xa C perl523.dll!perl_run(interpreter * my_perl=0x003642d4) Line 2371 + 0x8 C perl523.dll!RunPerl(int argc=2, char * * argv=0x01362cf0, char * * env=0x003632a8) Line 258 + 0x6 C perl.exe!mainCRTStartup() Line 398 + 0xe C kernel32.dll!_BaseProcessStart@4() + 0x23 ---------------------------------------------------------------------- curcop is ---------------------------------------------------------------------- warn "# Checking pipe serialization\n" if debug; pipe(NST_READ, NST_WRITE); NST_READ->autoflush(1); NST_WRITE->autoflush(1); print NST_WRITE "22"; is(read(NST_READ, my $buf, 2), 2, "Pipe works") || do { SKIP: { skip ("Couldn't use working pipe", $N - 3) }; exit }; warn "# Checked pipe serialization\n" if debug; $env{'block_until_ready_to_test'} = sub { read(NST_READ, my $buf, 1) };<<<<<<<<<<<<<<<<<<<<<<<<<<<<<HERE $env{'signal_ready_to_test'} = sub { print NST_WRITE "1"; NST_WRITE->flush; }; return \%env; } ---------------------------------------------------------------------- 2nd thread ---------------------------------------------------------------------- ntdll.dll!_KiFastSystemCallRet@0() ntdll.dll!_ZwWaitForSingleObject@12() + 0xc ntdll.dll!_RtlpWaitForCriticalSection@4() + 0x8c ntdll.dll!_RtlEnterCriticalSection@4() + 0x46 msvcr71.dll!_lock_fhandle(int fh=3) Line 453 C msvcr71.dll!_fstati64(int fildes=3, _stati64 * buf=0x01bdfdcc) Line 86 + 0x6 C perl523.dll!PerlLIOFileStat(IPerlLIO * piPerl=0x00ed2e9c, int handle=3, _stati64 * buffer=0x01bdfdcc) Line 968 + 0xe C perl523.dll!PerlIOUnix_setfd(interpreter * my_perl=0x00000401, _PerlIO * * f=0x00070023, int fd=29228120, int imode=0) Line 2579 + 0x12 C perl523.dll!PerlIOUnix_dup(interpreter * my_perl=0x00f18a64, _PerlIO * * f=0x00f1d974, _PerlIO * * o=0x00edd0d4, clone_params * param=0x01bdfeb4, int flags=1) Line 2705 + 0xc C perl523.dll!PerlIOBase_dup(interpreter * my_perl=0x00f18a64, _PerlIO * * f=0x00f1d974, _PerlIO * * o=0x00e27094, clone_params * param=0x01bdfeb4, int flags=1) Line 2205 C perl523.dll!PerlIO_fdupopen(interpreter * my_perl=0x01bdfc58, _PerlIO * * f=0x00070023, clone_params * param=0x01bdfeb4, int flags=1) Line 505 + 0x13 C perl523.dll!Perl_fp_dup(interpreter * my_perl=0x00f18a64, _PerlIO * * const fp=0x00e27094, const char type=0, clone_params * const param=0x01bdfeb4) Line 12904 + 0xb C perl523.dll!PerlIO_clone(interpreter * my_perl=0x00000000, interpreter * proto=0x00000401, clone_params * param=0x01bdfeb4) Line 618 + 0xc C perl523.dll!perl_clone_using(interpreter * proto_perl=0x00e1bc9c, unsigned long flags=1, IPerlMem * ipM=0x00000001, IPerlMem * ipMS=0x00ed2d90, IPerlMem * ipMP=0x00ed2dac, IPerlEnv * ipE=0x00ed2dc8, IPerlStdIO * ipStd=0x00ed2e00, IPerlLIO * ipLIO=0x00ed2e9c, IPerlDir * ipD=0x00ed2f04, IPerlSock * ipS=0x00ed2f30, IPerlProc * ipP=0x00ed2fe0) Line 14770 C perl523.dll!PerlProcFork(IPerlProc * piPerl=0x00a50300) Line 1831 + 0x3e C perl523.dll!Perl_pp_fork(interpreter * my_perl=0x00e1bc9c) Line 4173 + 0xa C perl523.dll!Perl_runops_standard(interpreter * my_perl=0x00e1bc9c) Line 41 + 0x4 C perl523.dll!win32_start_child(void * arg=0x00e1bc9c) Line 1744 C kernel32.dll!_BaseThreadStart@8() + 0x37 ---------------------------------------------------------------------- sub run_n_children { my ($self, $n) = @_; my $prop = $self->{'server'}; return unless $n > 0; $self->run_n_children_hook($n); my ($parentsock, $childsock); $self->log(3, "Starting \"$n\" children"); $prop->{'last_start'} = time(); for (1 .. $n) { if ($prop->{'child_communication'}) { require IO::Socket::UNIX; ($parentsock, $childsock) = IO::Socket::UNIX->socketpair(IO::Socket::AF_UNIX, IO::Socket::SOCK_STREAM, IO::Socket::PF_UNSPEC); } $self->pre_fork_hook; local $!; my $pid = fork;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<HERE if (! defined $pid) { if ($prop->{'child_communication'}) { $parentsock->close(); $childsock->close(); } ---------------------------------------------------------------------- The Critical section mutex dumped, - (CRITICAL_SECTION*)0x00361fa0 0x00361fa0 {DebugInfo=0x00154c60 {Type=0 CreatorBackTraceIndex=0 CriticalSection=0x00361fa0 {DebugInfo=0x00154c60 {Type=0 CreatorBackTraceIndex=0 CriticalSection=0x00361fa0 ...} LockCount=1 RecursionCount=1 ...} ...} LockCount=1 RecursionCount=1 ...} _RTL_CRITICAL_SECTION * + DebugInfo 0x00154c60 {Type=0 CreatorBackTraceIndex=0 CriticalSection=0x00361fa0 {DebugInfo=0x00154c60 {Type=0 CreatorBackTraceIndex=0 CriticalSection=0x00361fa0 {DebugInfo=0x00154c60 LockCount=1 RecursionCount=1 ...} ...} LockCount=1 RecursionCount=1 ...} ...} _RTL_CRITICAL_SECTION_DEBUG * LockCount 1 long RecursionCount 1 long OwningThread 0x00001564 void * LockSemaphore 0x000006e4 void * SpinCount 4000 unsigned long Thread 0x00001564 is the thread blocking in the read call --------------------------------------------------------------------------- ntdll.dll!_KiFastSystemCallRet@0() ntdll.dll!_NtReadFile@36() + 0xc kernel32.dll!_ReadFile@20() + 0x67 msvcr71.dll!_read_lk(int fh=3, void * buf=0x00e5815c, unsigned int cnt=8192) Line 154 + 0x15 C msvcr71.dll!_read(int fh=3, void * buf=0x00e5815c, unsigned int cnt=8192) Line 75 + 0xc C perl523.dll!PerlLIORead(IPerlLIO * piPerl=0x003664a4, int handle=3, void * buffer=0x00e5815c, unsigned int count=8192) Line 1029 + 0x12 C perl523.dll!PerlIOUnix_read(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x00e8ef84, void * vbuf=0x00e5815c, unsigned int count=8192) Line 2730 + 0x14 C perl523.dll!Perl_PerlIO_read(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x00e8ef84, void * vbuf=0x00e5815c, unsigned int count=8192) Line 1591 + 0x27 C perl523.dll!PerlIOBuf_fill(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x008f5c74) Line 4032 + 0xb C perl523.dll!Perl_PerlIO_fill(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x008f5c74) Line 1686 + 0x23 C perl523.dll!PerlIOBase_read(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x008f5c74, void * vbuf=0x0140e624, unsigned int count=1) Line 2082 + 0xb C perl523.dll!PerlIOBuf_read(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x008f5c74, void * vbuf=0x0140e624, unsigned int count=1) Line 4056 + 0xf C perl523.dll!Perl_PerlIO_read(interpreter * my_perl=0x003642d4, _PerlIO * * f=0x008f5c74, void * vbuf=0x0140e624, unsigned int count=1) Line 1591 + 0x27 C perl523.dll!Perl_pp_sysread(interpreter * my_perl=0x01000000) Line 1819 + 0xd C perl523.dll!Perl_runops_standard(interpreter * my_perl=0x003642d4) Line 41 + 0x4 C perl523.dll!S_run_body(interpreter * my_perl=0x00000724, long oldscope=1) Line 2448 + 0xa C perl523.dll!perl_run(interpreter * my_perl=0x003642d4) Line 2371 + 0x8 C perl523.dll!RunPerl(int argc=2, char * * argv=0x01362cf0, char * * env=0x003632a8) Line 258 + 0x6 C perl.exe!mainCRTStartup() Line 398 + 0xe C kernel32.dll!_BaseProcessStart@4() + 0x23 --------------------------------------------------------------------------- So the psuedofork is blocking on fd 3 becoming unlocked, while the parent thread/psuedoproc is waiting for its pipe lock to be unblocked. The easy fix is for the Perl code to use Win32::Mutex. This problem of _lock_fhandle is P5P bug https://rt.perl.org/Ticket/Display.html?id=65136
From: twata_1 [...] yahoo.co.jp
Download (untitled) / with headers
text/plain 432b
Still happening in 2.008 under Strawberry Perl 5.14.4 etc. Here is workaround patches. (However, the test of Port_Configuration.t and Server_PreFork.t still fails. I tested Strawberry Perl: v5.14.4 v5.18.4 v5.20.3 v5.22.2 v5.24.0 on Windows 7. ) Hope this help. Thank you, -- twata On 2013-1月-10 木 03:08:54, RHANDOM wrote: Show quoted text
> The tests should no longer stick - though now we hopefully will see why > it is failing better.
Subject: Server_PreForkSimple.t.StrawberryP5-14-4.patch
--- Net-Server-2.008/t/Server_PreForkSimple.t 2014-05-06 03:43:15.000000000 +0900 +++ Net-Server-2.008-patched/t/Server_PreForkSimple.t 2016-12-24 10:20:11.440000002 +0900 @@ -41,6 +41,7 @@ print $remote "exit\n"; alarm 0; + kill 'TERM', $pid if $^O eq 'MSWin32'; return 1; ### child does the server
Subject: block_until_ready_to_test.StrawberryP5-14-4.patch
--- Net-Server-2.008/t/NetServerTest.pm 2014-05-13 00:31:32.000000000 +0900 +++ Net-Server-2.008-patched/t/NetServerTest.pm 2016-12-24 10:18:24.850000002 +0900 @@ -67,7 +67,7 @@ print NST_WRITE "22"; is(read(NST_READ, my $buf, 2), 2, "Pipe works") || do { SKIP: { skip ("Couldn't use working pipe", $N - 3) }; exit }; warn "# Checked pipe serialization\n" if debug; - $env{'block_until_ready_to_test'} = sub { read(NST_READ, my $buf, 1) }; + $env{'block_until_ready_to_test'} = sub { sleep 1 if $^O eq 'MSWin32'; read(NST_READ, my $buf, 1) }; $env{'signal_ready_to_test'} = sub { print NST_WRITE "1"; NST_WRITE->flush; }; return \%env;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.