Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

26fork.t frequently hangs on WIndows #21

Closed
chorny opened this issue Aug 2, 2014 · 26 comments
Closed

26fork.t frequently hangs on WIndows #21

chorny opened this issue Aug 2, 2014 · 26 comments

Comments

@chorny
Copy link

chorny commented Aug 2, 2014

with no output

Inline-C-0.62_03 and Inline-C-0.62

@sisyphus
Copy link
Collaborator

sisyphus commented Aug 6, 2014

Haven't struck that "hangs with no output" issue on any of my Win32 perls.
Does it happen reliably ? That is, for some given perl, if the hang occurs once does it hang every time ? ... or does it seem to be quite random ?
Could you give us a 'perl -V' for a perl that is subject to this problem.
What version of Windows are you running ? (I'm on Windows 7.)

@chorny
Copy link
Author

chorny commented Aug 6, 2014

Hangs every time on different versions of Strawberry Perl (5.18.2, 5.18.1, 5.16.0, 5.12.2). Windows XP Russian and English.
matrix confirms this http://matrix.cpantesters.org/?dist=Inline-C+0.62_03

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

  Platform:
    osname=MSWin32, osvers=6.2, archname=MSWin32-x86-multi-thread-64int
    uname='Win32 strawberry-perl 5.18.2.1 #1 Tue Jan  7 16:30:36 2014 i386'
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags =' -s -O2 -DWIN32  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fno-strict-aliasing -mms-bitfields',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='4.7.3', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags ='-s -L"C:\strawberry182\perl\lib\CORE" -L"C:\strawberry182\c\lib"'
    libpth=C:\strawberry182\c\lib C:\strawberry182\c\i686-w64-mingw32\lib C:\strawberry182\c\lib\gcc\i686-w64-mingw32\4.7.3
    libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=, so=dll, useshrplib=true, libperl=libperl518.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry182\perl\lib\CORE" -L"C:\strawberry182\c\lib"'


Characteristics of this binary (from libperl): 
  Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
                        PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
                        PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_SAWAMPERSAND
                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                        USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
  Built under MSWin32
  Compiled at Jan  7 2014 16:39:31
  %ENV:
    PERL_HASH_SEED="0x11111111"
  @INC:
    C:/strawberry182/perl/site/lib
    C:/strawberry182/perl/vendor/lib
    C:/strawberry182/perl/lib

@sisyphus
Copy link
Collaborator

sisyphus commented Aug 6, 2014

Turns out I have the exact same build of Strawberry Perl ('Win32 strawberry-perl 5.18.2.1 #1 Tue Jan 7 16:30:36 2014 i386') on Windows 7 (English). Amazingly, when I use this version of Strawberry Perl, 26fork.t actually passes for 0.62, as well as 0.62_03. Even the TODO tests pass with 0.62_03.
Buggered if I know what's going on.

@mohawk2
Copy link
Collaborator

mohawk2 commented Aug 6, 2014

The obvious difference between your installations is the OS: XP vs 7. @chorny, do you have access to the XP box and could you run the test with BUILD_NOISY=1 to see at what stage it hangs?

@chorny
Copy link
Author

chorny commented Aug 6, 2014

BUILD_NOISY=1 in environment? Same result.

@mohawk2
Copy link
Collaborator

mohawk2 commented Aug 6, 2014

Sorry, not as an env var, as a "use Inline" option, eg "use Inline C => 'whatever', BUILD_NOISY => 1".

@chorny
Copy link
Author

chorny commented Aug 6, 2014

use Inline Config => DIRECTORY => $TestInlineSetup::DIR, BUILD_NOISY => 1;

Different results before hanging:
1.

validate Stage
validate Stage
Starting Build Preprocess Stage
get_maps Stage
Finished Build Preprocess Stage

Starting Build Parse Stage
Finished Build Parse Stage

Starting Build Glue 1 Stage
Finished Build Glue 1 Stage

Starting Build Glue 2 Stage
Finished Build Glue 2 Stage

Starting Build Glue 3 Stage
Finished Build Glue 3 Stage

Starting Build Compile Stage
  Starting "perl Makefile.PL" Stage
validate Stage
Starting Build Preprocess Stage
get_maps Stage
Finished Build Preprocess Stage

Starting Build Parse Stage
Finished Build Parse Stage

Starting Build Glue 1 Stage
Finished Build Glue 1 Stage

Starting Build Glue 2 Stage
Finished Build Glue 2 Stage

Starting Build Glue 3 Stage
Finished Build Glue 3 Stage

Starting Build Compile Stage
  Starting "perl Makefile.PL" Stage
validate Stage
Writing Makefile for _26fork_t_0cc7
Writing MYMETA.yml and MYMETA.json
  Finished "perl Makefile.PL" Stage

  Starting "make" Stage

@mohawk2
Copy link
Collaborator

mohawk2 commented Aug 6, 2014

@chorny, thanks for this - that's two separate runs?

@sisyphus, what do you think of if BUILD_NOISY, adding verbose options to make to get more specifics of what's going on?

@chorny
Copy link
Author

chorny commented Aug 6, 2014

that's two separate runs?

yes

@mohawk2
Copy link
Collaborator

mohawk2 commented Aug 6, 2014

@chorny, Ok. Do you feel like hacking up your Inline::C module (in the methods makefile_pl and make) to add debugging flags to get more verbose output? If you could also add a warn of $$, and make TestInlineSetup also warn its initial $$ so we can tell which is parent and which is child, to see if that makes a difference?

Separate, could you help me check your perl on XP's locking capability, using the check in #8 (comment)?

@chorny
Copy link
Author

chorny commented Aug 6, 2014

Same result for locking - second program prints 'lock' only after first exits.

@mohawk2
Copy link
Collaborator

mohawk2 commented Aug 6, 2014

That's reassuring. Any luck with making debugging output?

@bulk88
Copy link
Contributor

bulk88 commented Aug 8, 2014

Remember MS localizes C:/Program Files and DOcuments & settings per language. http://en.wikipedia.org/wiki/Program_Files but russian isn't in that list.

@mohawk2
Copy link
Collaborator

mohawk2 commented Aug 8, 2014

@bulk88, how does that affect the matters here?

@chorny
Copy link
Author

chorny commented Nov 29, 2014

It hangs in system($cmd) in sub system_call

pid=5272
validate Stage
validate Stage
Starting Build Preprocess Stage
get_maps Stage
Finished Build Preprocess Stage

Starting Build Parse Stage
Finished Build Parse Stage

Starting Build Glue 1 Stage
Finished Build Glue 1 Stage

Starting Build Glue 2 Stage
Finished Build Glue 2 Stage

Starting Build Glue 3 Stage
Finished Build Glue 3 Stage

Starting Build Compile Stage
  Starting "perl Makefile.PL" Stage
calling system_call("C:\strawberry514\perl\bin\perl.exe Makefile.PL", 'out.make')
calling system(C:\strawberry514\perl\bin\perl.exe Makefile.PL) from C:/strawberry514/cpan/build/Inline-C-0.67-zpkUdW/_Inline_26fork.5272/build/_26fork_t_0cc7

Does not return from system(...)

Inline-C 0.67

@mohawk2
Copy link
Collaborator

mohawk2 commented Nov 30, 2014

@chorny, good work! That looks to me like a Perl bug, what do you think?

@sisyphus
Copy link
Collaborator

From: Alexandr Ciornii
Sent: Sunday, November 30, 2014 7:35 AM
To: ingydotnet/inline-c-pm
Cc: sisyphus
Subject: Re: [inline-c-pm] 26fork.t frequently hangs on WIndows (#21)

Does not return from system(...)

I don't get the hang on any of my mingw-built perls (including 32-bit 5.14.0
and 64-bit 5.14.0) - all of which are running on Windows 7.
I don't actually have a 5.14 build of Strawberry Perl to try out but I
experienced no such hang with Strawberry-5.20.0.

Is there something that allows us to know in advance whether the hang is
going to occur ? Or (heaven forbid)does it happen at random ?
Could the version of Windows itself be a key factor here ?
IOW exactly which versions of perl, built with which versions of gcc,
running on which versions of Windows, are experiencing the hang ?
Is it actually causing a smoker to hang ? .... or do smokers have some
inbuilt detection that allows them to abort and continue on ?

Cheers,
Rob

@chorny
Copy link
Author

chorny commented Dec 1, 2014

@mohawk2 I think it is, but I was not able to replicate it with a standalone program.

@mohawk2
Copy link
Collaborator

mohawk2 commented Dec 1, 2014

@chorny, could you give us a perl -V and tell us what compiler etc you're working with?

@chorny
Copy link
Author

chorny commented Dec 1, 2014

Summary of my perl5 (revision 5 version 14 subversion 0) configuration:

  Platform:
    osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
    uname='Win32 strawberryperl 5.14.0.0.beta_1 #1 Thu Jun  9 01:53:47 2011 i386'
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags =' -s -O2 -DWIN32  -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='4.4.3', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags ='-s -L"C:\strawberry514\perl\lib\CORE" -L"C:\strawberry514\c\lib"'
    libpth=C:\strawberry514\c\lib C:\strawberry514\c\i686-w64-mingw32\lib
    libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=, so=dll, useshrplib=true, libperl=libperl514.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry514\perl\lib\CORE" -L"C:\strawberry514\c\lib"'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
                        PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PL_OP_SLAB_ALLOC
                        USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF
                        USE_SITECUSTOMIZE
  Built under MSWin32
  Compiled at Jun  9 2011 02:27:43
  %ENV:
    PERL_JSON_BACKEND="JSON::XS"
    PERL_YAML_BACKEND="YAML"
  @INC:
    C:/strawberry514/perl/site/lib
    C:/strawberry514/perl/vendor/lib
    C:/strawberry514/perl/lib

or #21 (comment)

Tested portable 5.20.1, does not hang on Windows 7, only on XP. Did not test other perl versions on Windows 7 yet.

@sisyphus
Copy link
Collaborator

sisyphus commented Dec 2, 2014

From: Alexandr Ciornii
Sent: Tuesday, December 02, 2014 9:08 AM
Subject: Re: [inline-c-pm] 26fork.t frequently hangs on WIndows (#21)

Summary of my perl5 (revision 5 version 14 subversion 0) configuration:
Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
uname='Win32 strawberryperl 5.14.0.0.beta_1 #1 Thu Jun 9 01:53:47 2011

I was going to test that particular strawberry version on my Windows 7
system, but I can't find it - it's no longer listed at
http://strawberryperl.com/releases.html

Are there any other builds available from that page that exhibit the hang ?

I think "osvers" relates to the Windows version (ancient NT4, IINM) upon
which the binaries were built - which version of Window are you actually
running:

perl -MWin32 -le "print Win32::GetOSName();"

I don't know whether the fact that your binaries were built on such an old
version of Windows could be the cause of the problem.

Maybe we could just skip that troublesome 26fork.t script entirely if:

$^O =~ /mswin32/i && $Config{osvers} <= 4.0

but it would be nice to know that doing so isn't being overly restrictive.
(I'm wondering whether there are other versions of Strawberry built on 4.0
that don't hang or crash with 26fork.t.)

Cheers,
Rob

@chorny
Copy link
Author

chorny commented Dec 7, 2014

It does not depend on which version of Windows Strawberry was compiled, only on which it is run. I'll write a patch that skips this test depending on Windows version.

@RBarrabas
Copy link

I'm also seeing this - system hangs 100% of the time on the my system. Using the newest (5.20.1) version of Strawberry on WinXP. I've included a Perl -V below, but I think it's the same bug.

Let me know if you need another tester. GitHub (dot) 9 (dot) OkianWarrior (at) SpamGourmet (dot) com.

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

Platform:
osname=MSWin32, osvers=6.3, archname=MSWin32-x86-multi-thread-64int
uname='Win32 strawberry-perl 5.20.1.1 #1 Mon Sep 15 18:25:23 2014 i386'
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='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields',
optimize='-s -O2',
cppflags='-DWIN32'
ccversion='', gccversion='4.8.3', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++', ldflags ='-s -L"C:\STRAWB1\perl\lib\CORE" -L"C:\STRAWB1\c\lib"'
libpth=C:\STRAWB1\c\lib C:\STRAWB1\c\i686-w64-mingw32\lib C:\STRAWB1\c\lib\gcc\i686-w64-mingw32\4.8.3
libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
libc=, so=dll, useshrplib=true, libperl=libperl520.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-mdll -s -L"C:\STRAWB
1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"'

Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE
PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS
USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
USE_PERL_ATOF
Built under MSWin32
Compiled at Sep 15 2014 18:29:20
%ENV:
PERL5LIB="f:/AI/lib"
@inc:
f:/AI/lib
C:/strawberry/perl/site/lib
C:/strawberry/perl/vendor/lib
C:/strawberry/perl/lib
.

@jelty
Copy link

jelty commented Dec 24, 2014

Hi,

I've got the same problem on Windows XP with portable strawberry perl 5.20.1 and Inline-C-0.67, reproduction rate 100%

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

Platform:
osname=MSWin32, osvers=6.3, archname=MSWin32-x86-multi-thread-64int
uname='Win32 strawberry-perl 5.20.1.1 #1 Mon Sep 15 18:25:23 2014 i386'
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='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields',
optimize='-s -O2',
cppflags='-DWIN32'
ccversion='', gccversion='4.8.3', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++.exe', ldflags ='-s -L"C:\SPerl\5.20.1.1_32b\perl\lib\CORE" -L"C:\SPerl\5.20.1.1_32b\c\lib"'
libpth=C:\SPerl\5.20.1.1_32b\c\lib C:\SPerl\5.20.1.1_32b\c\i686-w64-mingw32\lib C:\SPerl\5.20.1.1_32b\c\lib\gcc\i686-w64-mingw32\4.8.3
libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
libc=, so=dll, useshrplib=true, libperl=libperl520.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-mdll -s -L"C:\SPerl\5.20.1.1_32b\perl\lib\CORE" -L"C:\SPerl\5.20.1.1_32b\c\lib"'

Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE
PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS
USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
USE_PERL_ATOF
Built under MSWin32
Compiled at Sep 15 2014 18:29:20
@inc:
C:/SPerl/5.20.1.1_32b/perl/site/lib
C:/SPerl/5.20.1.1_32b/perl/vendor/lib
C:/SPerl/5.20.1.1_32b/perl/lib
.

@mohawk2
Copy link
Collaborator

mohawk2 commented Dec 24, 2014

skip_all if WinXP in 256e470. Waiting for clearance from @ingydotnet to release.

@ingydotnet
Copy link
Owner

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants