develooper Front page | perl.perl5.porters | Postings from February 2015

[perl #123841] On Windows, some tests hang possibly due to race condition

Thread Next
From:
A . Sinan Unur
Date:
February 15, 2015 23:14
Subject:
[perl #123841] On Windows, some tests hang possibly due to race condition
Message ID:
rt-4.0.18-24904-1424024667-182.123841-75-0@perl.org
# New Ticket Created by  A. Sinan Unur 
# Please include the string:  [perl #123841]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123841 >


This is a bug report for perl from nanis@cpan.org,
generated with the help of perlbug 1.40 running under perl 5.20.2.


-----------------------------------------------------------------
[Please describe your issue here]

Hello:

I have run into some problems trying to build 5.20.2 since last night,
and it seems like something changed since last December that causes
spawned perls to hang.

This is on 64-bit Windows 8.1 Pro using Microsoft Visual Studio 2013,
building both 5.20.2 and blead (4242547a ...)

During `nmake test`, some tests in `t\run`, `t\io\argv.t`, and
`t\op\blocks.t` hang. The specific test that hangs varies. Repeatedly
running

C:\...\src\perl-5.20.2> for %f in (t\run\*.t) do perl %f

will result in a different test in a different file hanging. When this
happens, task manager shows several `perl.exe` processes, and checking
the wait chain for the stuck process shows something similar to the
following:

http://i.imgur.com/nj9I8i6.png

See also http://t.co/GxdyoDoqM7 for a `nmake test` screenshot.

Exiting the test using CTRL-C terminates all `perl.exe` instances
except for the one with a nonempty wait chain. Terminating all
`perl.exe` instances, and then trying to run all the tests in the
directory will usually, but not always, cause another stall. If
another stall happens, it is not necessarily in the same test or test
file.

Identifying the hung process, and killing it via Windows Task Manager
will then let the rest of the tests proceed. I have also observed this
with some tests in `t/io/argv.t` while being run from `nmake test`.

I have tried to debug this to no avail. Tried several sessions of `git
bisect` but managed to come up empty handed.

I didn't have this problem with 5.20.1. I also did not have it with
the blead I pulled & built on 2014-12-19.

I am now observing it with both 5.20.2, and
blead (4242547a9668e2369d6269a51b4854e061a1faec).

The build environment and Makefile settings are the same for all the builds.

Hope this helps.

-- Sinan


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl 5.20.2:

Configured by sinan at Sun Feb 15 12:14:21 2015.

Summary of my perl5 (revision 5 version 20 subversion 2) configuration:

  Platform:
    osname=MSWin32, osvers=6.3, archname=MSWin32-x64-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags ='-nologo -GF -W3 -O1 -favor:INTEL64 -MD -Zi
-DNDEBUG -GL -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64
-DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
-DUSE_64_BIT_ALL -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO',
    optimize='-O1 -favor:INTEL64 -MD -Zi -DNDEBUG -GL -fp:precise',
    cppflags='-DWIN32'
    ccversion='18.00.31101', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='__int64', ivsize=8, nvtype='double', nvsize=8,
Off_t='__int64', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf
-ltcg  -libpath:"c:\perl-5.20.2\lib\CORE"  -machine:AMD64
"/manifestdependency:type='Win32'
name='Microsoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitecture='*' publicKeyToken='6595b64144ccf1df'
language='*'"'
    libpth="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\amd64"
    libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib
odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
    perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl520.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf -ltcg  -libpath:"c:\perl-5.20.2\lib\CORE"  -machine:AMD64
"/manifestdependency:type='Win32'
name='Microsoft.Windows.Common-Controls' version='6.0.0.0'
processorArchitecture='*' publicKeyToken='6595b64144ccf1df'
language='*'"'


---
@INC for perl 5.20.2:
    C:/Users/nanis/src/perl-5.20.2/lib
    .

---
Environment for perl 5.20.2:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=c:\opt\OpenSSL\bin;C:\opt\bin;C:\opt\vim\vim74;C:\opt\gs\gs9.14\bin;C:\opt\gs\gs9.14\lib;c:\opt\gm;c:\opt\kdiff3;c:\opt\ffmpeg\bin;C:\Program
Files\TortoiseHg;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft
Windows Performance Toolkit\;C:\Program Files (x86)\Windows
Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft
SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL
Server\120\Tools\Binn;c:\opt\wrk;C:\Program
Files\TortoiseHg\;C:\Program Files\TortoiseSVN\bin;
    PERLDOC_PAGER=c:\opt\cygwin64\bin\less.exe -+C -E -F -g -i
    PERL_BADLANG (unset)
    SHELL (unset)


-- 
A. Sinan Unur
http://www.unur.com/sinan/


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