develooper Front page | perl.perl5.porters | Postings from March 2014

[perl #38723] Backticks don't work in Win32 multithreaded perl

Thread Previous | Thread Next
From:
bulk88 via RT
Date:
March 24, 2014 08:22
Subject:
[perl #38723] Backticks don't work in Win32 multithreaded perl
Message ID:
rt-4.0.18-8700-1395649359-1152.38723-15-0@perl.org
On perl512 DEBUGGING (not sure if that is relevent), lock holder loop happened.


thread 
-----------------------------------------------------
 	ntdll.dll!_KiFastSystemCallRet@0() 	
 	ntdll.dll!_ZwWaitForSingleObject@12()  + 0xc	
 	ntdll.dll!_RtlpWaitForCriticalSection@4()  + 0x8c	
 	ntdll.dll!_RtlEnterCriticalSection@4()  + 0x46	
	perl512.dll!win32_popen(const char * command=0x00890144, const char * mode=0x28206874)  Line 3065	C
 	perl512.dll!PerlProcPopen(IPerlProc * piPerl=0x00287190, const char * command=0x00890144, const char * mode=0x28206874)  Line 1637 + 0xd	C++
 	perl512.dll!Perl_pp_backtick(interpreter * my_perl=0x00876e54)  Line 309 + 0x1e	C
 	perl512.dll!Perl_runops_debug(interpreter * my_perl=0x00876e54)  Line 2049 + 0xd	C
 	perl512.dll!win32_start_child(void * arg=0x00876e54)  Line 1771 + 0xd	C++
 	kernel32.dll!_BaseThreadStart@8()  + 0x37	
--------------------------------
is at line "		`dir`;"  and waits on TID 11560
--------------------------------
 	ntdll.dll!_KiFastSystemCallRet@0() 	
 	ntdll.dll!_ZwWaitForSingleObject@12()  + 0xc	
 	ntdll.dll!_RtlpWaitForCriticalSection@4()  + 0x8c	
 	ntdll.dll!_RtlEnterCriticalSection@4()  + 0x46	
	msvcr71.dll!_lock(int locknum=11)  Line 319 + 0x8	C
 	msvcr71.dll!_alloc_osfhnd()  Line 59 + 0x7	C
 	msvcr71.dll!_dup_lk(int fh=1)  Line 104 + 0x5	C
 	msvcr71.dll!_dup(int fh=1)  Line 74 + 0x6	C
 	perl512.dll!win32_dup(int fd=1)  Line 3535 + 0xa	C
 	perl512.dll!win32_popen(const char * command=0x0084868c, const char * mode=0x28206874)  Line 3069 + 0x9	C
 	perl512.dll!PerlProcPopen(IPerlProc * piPerl=0x00286278, const char * command=0x0084868c, const char * mode=0x28206874)  Line 1637 + 0xd	C++
 	perl512.dll!Perl_pp_backtick(interpreter * my_perl=0x0083093c)  Line 309 + 0x1e	C
 	perl512.dll!Perl_runops_debug(interpreter * my_perl=0x0083093c)  Line 2049 + 0xd	C
 	perl512.dll!win32_start_child(void * arg=0x0083093c)  Line 1771 + 0xd	C++
 	kernel32.dll!_BaseThreadStart@8()  + 0x37	

-----------------------------------------
is at line "		`dir`;"  and waits on TID 6824
-----------------------------------------
 	ntdll.dll!_KiFastSystemCallRet@0() 	
 	ntdll.dll!_ZwWaitForSingleObject@12()  + 0xc	
 	ntdll.dll!_RtlpWaitForCriticalSection@4()  + 0x8c	
 	ntdll.dll!_RtlEnterCriticalSection@4()  + 0x46	
	msvcr71.dll!_alloc_osfhnd()  Line 112	C
 	msvcr71.dll!_pipe(int * phandles=0x00b9fd9c, unsigned int psize=512, int textmode=128)  Line 87 + 0x5	C
 	perl512.dll!win32_pipe(int * pfd=0x00b9fd9c, unsigned int size=512, int mode=128)  Line 2999 + 0x12	C
 	perl512.dll!win32_popen(const char * command=0x009a64fc, const char * mode=0x28206874)  Line 3059 + 0x12	C
 	perl512.dll!PerlProcPopen(IPerlProc * piPerl=0x00289a30, const char * command=0x009a64fc, const char * mode=0x28206874)  Line 1637 + 0xd	C++
 	perl512.dll!Perl_pp_backtick(interpreter * my_perl=0x0098d3bc)  Line 309 + 0x1e	C
 	perl512.dll!Perl_runops_debug(interpreter * my_perl=0x0098d3bc)  Line 2049 + 0xd	C
 	perl512.dll!win32_start_child(void * arg=0x0098d3bc)  Line 1771 + 0xd	C++
 	kernel32.dll!_BaseThreadStart@8()  + 0x37	

-------------------------------------------------------------
is at line "		`dir`;"  and waits on TID 11560 (a loop)

I've seen this before on Perl RT and wrote this up, about CRT global "lock 11". https://rt.perl.org/Ticket/Display.html?id=87410  Note the perl510 stacks showed a block on a WriteFile. On my 8 core machine (im not making any stacks from it), it takes NFORK = 60 to get a frequent (1 in 10 or better hangs) hang on Active non-debugging Perl 5.12. On the one that gave all the callstacks in this post and last is a 2 core machine. Strawberry 5.14 at NFORK 60 hangs on 8 core. ActivePerl 5.16 at NFORK 60  hangs on 8 core. ActivePerl 5.18 hangs at NFORK 60 on 8 core at NFORK 60. Perl random blead self compiled calling itself 5.19.4 hangs on WriteFile. Like the 5.10 call stacks. I can't rule out that some of the hangs are the lock 11 bug, or that both WriteFile and lock 11 randomly cause hangs.

-- 
bulk88 ~ bulk88 at hotmail.com

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=38723

Thread Previous | 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