Mon Aug 01 10:26:13 2011: Request 69848 was acted upon.
Transaction: Correspondence added by RSCHUPP
       Queue: PAR-Packer
     Subject: pp created exe  crash if useing parallel loops
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: frank.w...@validusresearch.com
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=69848 >


On 2011-07-28 09:43:16, frank.w...@validusresearch.com wrote:
> The following is a minimal code example that exhibits the problem:

Thanks. The good news is that I can easily reproduce the
problem here (with e.g. ActiveState 5.10.1 on 32-bit Windows XP).
The bad news is that I have no clue what's going on.

Looks like the problem occurs in some END block or in the
global destruction phase. Note that a packed executable actually
runs in a custom Perl interpreter which might have some
problem with the fork emulation on Windows.
I keep looking into this, but don't hold your breadth.

Cheers, Roderich





> 
> #!/usr/bin/perl
> use strict;
> use warnings;
> use diagnostics;
> $|=1;
> my $workers=@ARGV ? shift : 16;
> use Parallel::Loops;
> my @modelfiles=("ct_125_gulfstream_ws_26119a.txt");
> my $pl = Parallel::Loops->new($workers);
> $pl->foreach(\@modelfiles,
> sub {
>   my $mf = $_;
>   print $mf;
> }
> );
> 
> And this is the output of perl-V:
> 
> Set up gcc environment - 4.4.5 20101001 (release) [svn/rev.164871 -
> mingw-w64/oz]
> Summary of my perl5 (revision 5 version 12 subversion 2)
> configuration:
> 
>   Platform:
>     osname=MSWin32, osvers=5.2, archname=MSWin32-x64-multi-thread
>     uname=''
>     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 =' -DNDEBUG -O2 -DWIN32 -D_CONSOLE -DNO_STRICT
> -DHAVE_DES_FCRYPT -DCONSERVATIVE -DUSE_SITECUSTOMIZE
> -DPRIVLIB_LAST_IN_INC -DPERL_IMPLI
> CIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX
> -DWIN64',
>     optimize='-O2',
>     cppflags='-DWIN32'
>     ccversion='', gccversion='4.4.5 20101001 (release) [svn/rev.164871
> - mingw-w64/oz]', 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='g++', ldflags ='-s -L"C:\Perl64\lib\CORE"'
>     libpth="C:\mingw64\lib" "C:\mingw64\x86_64-w64-mingw32\lib"
>     libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
> -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32
> -lmpr -lwinmm -lve
> rsion -lodbc32 -lodbccp32 -lcomctl32 -lmsvcrt
>     perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
> -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid
> -lws2_32 -lmpr -lwinmm
> -lversion -lodbc32 -lodbccp32 -lcomctl32 -lmsvcrt
>     libc=-lmsvcrt, so=dll, useshrplib=true, libperl=libperl512.a
>     gnulibc_version=''
>   Dynamic Linking:
>     dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
>     cccdlflags=' ', lddlflags='-s -mdll -L"C:\Perl64\lib\CORE"'
> 
> 
> Characteristics of this binary (from libperl):
>   Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
>                         PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
>                         PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC
> USE_64_BIT_INT
>                         USE_ITHREADS USE_LARGE_FILES USE_PERLIO
> USE_PERL_ATOF
>                         USE_SITECUSTOMIZE
>   Locally applied patches:
>         ActivePerl Build 1203 [294165]
>         1fd8fa4 Add Wolfram Humann to AUTHORS
>         f120055 make string-append on win32 100 times faster
>         a2a8d15 Define _USE_32BIT_TIME_T for VC6 and VC7
>         007cfe1 Don't pretend to support really old VC++ compilers
>         6d8f7c9 Get rid of obsolete PerlCRT.dll support
>         d956618 Make Term::ReadLine::findConsole fall back to STDIN if
> /dev/tty can't be opened
>         321e50c Escape patch strings before embedding them in
> patchlevel.h
>   Built under MSWin32
>   Compiled at Dec  9 2010 00:50:22
>   %ENV:
>     PERL5OPT="-MConfig_w64"
>   @INC:
>     C:/Perl64/site/lib
>     C:/Perl64/lib
>     .
> 
> 
> The file " C:\Perl64\site\lib\PAR \ Packer .pm" has
> our $VERSION = '1.010';
> 
> Actually my previous version of Par::Packer is 1.008 and showed this
> problem so I updated it to 1.010 and hope this problem will go away
> but seems it is not.
> (Also if we do not use parallel loop the packed code run fine.)
> 
> Thank you.
> 
> Frank
> 
> 
> -----Original Message-----
> From: Roderich Schupp via RT [mailto:bug-par-pac...@rt.cpan.org]
> Sent: Wednesday, July 27, 2011 6:04 PM
> To: Wang, Frank
> Subject: [rt.cpan.org #69848] pp created exe crash if useing parallel
> loops
> 
> <URL: https://rt.cpan.org/Ticket/Display.html?id=69848 >
> 
> On 2011-07-27 17:41:15, frank.w...@validusresearch.com wrote:
> > When using pp to create a stanalone executable in activeperl for
> x64,
> > if the source code used Parallel::Loops, the executable will crash
> and
> > the following is the problem detail:
> 
> This information is useless.
> 
> Please provide a minimal code example that exhibits the problem.
> Also include the output of "perl -V" and the versions of PAR and
> PAR::Packer used.
> 
> > But the perl code itself works without any problem.
> 
> By that you mean: the code works when not packed?
> 
> Cheers, Roderich
> 
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________



Reply via email to