Skip Menu |

This queue is for tickets about the Win32-Process-Info CPAN distribution.

Report information
The Basics
Id: 101658
Status: resolved
Priority: 0/
Queue: Win32-Process-Info

People
Owner: Nobody in particular
Requestors: PLICEASE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Failed to install on Strawberry Perl 5.18.2 64bit
Please find install log attached. I am eager to happy to do some leg work to debug / fix this.
Subject: win32-process-info-install-log.txt
cpanm (App::cpanminus) 1.7001 on perl 5.018002 built for MSWin32-x64-multi-thread Work directory is C:\Users\ollisg/.cpanm/work/1421844469.26572 You have make N:\lang\perl\strawberry\x64\5.18.2\c\bin\dmake.exe You have LWP 6.05 Falling back to Archive::Tar 1.96 You have N:\program32\GnuWin32\bin\unzip.exe Checking if you have ExtUtils::MakeMaker 6.31 ... Yes (6.84) Checking if you have ExtUtils::Install 1.46 ... Yes (1.59) Searching Win32::Process::Info on mirror http://mirror.sydney.wdlabs.com/cpan ... Downloading index file http://mirror.sydney.wdlabs.com/cpan/modules/02packages.details.txt.gz ... --> Working on Win32::Process::Info Fetching http://mirror.sydney.wdlabs.com/cpan/authors/id/W/WY/WYANT/Win32-Process-Info-1.021.tar.gz -> OK Unpacking Win32-Process-Info-1.021.tar.gz Entering Win32-Process-Info-1.021 Checking configure dependencies from META.json Checking if you have Module::Build 0.36 ... Yes (0.4203) Configuring Win32-Process-Info-1.021 Running Build.PL Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'Win32-Process-Info' version '1.021' -> OK Checking dependencies from MYMETA.json ... Checking if you have Time::Local 0 ... Yes (1.2300) Checking if you have Test::More 0.88 ... Yes (1.001002) Checking if you have Carp 0 ... Yes (1.32) Checking if you have warnings 0 ... Yes (1.18) Checking if you have strict 0 ... Yes (1.07) Checking if you have File::Spec 0 ... Yes (3.40) Building and testing Win32-Process-Info-1.021 Building Win32-Process-Info Win32::API::Call: parameter 3 had a buffer overflow at C:\Users\ollisg\.cpanm\work\1421844469.26572\Win32-Process-Info-1.021\blib\lib/Win32/Process/Info/NT.pm line 382. # Tests were run but no plan was declared and done_testing() was not seen. # Looks like your test exited with 255 just after 6. t\basic.t .. Dubious, test returned 255 (wstat 65280, 0xff00) All 6 subtests passed Test Summary Report ------------------- t\basic.t (Wstat: 65280 Tests: 6 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output Files=1, Tests=6, 1 wallclock secs ( 0.05 usr + 0.00 sys = 0.05 CPU) Result: FAIL Failed 1/1 test programs. 0/6 subtests failed. -> FAIL Installing Win32::Process::Info failed. See C:\Users\ollisg\.cpanm\work\1421844469.26572\build.log for details. Retry with --force to force install it.
Also attaching info about the Perl that I was using. Note that I did not have the same problem with Strawberry Perl 5.20.1 32 bit.
Subject: perl.txt
N:\home\ollisg>perl -V Summary of my perl5 (revision 5 version 18 subversion 2) configuration: Platform: osname=MSWin32, osvers=6.2, archname=MSWin32-x64-multi-thread uname='Win32 strawberry-perl 5.18.2.1 #1 Tue Jan 7 22:32:35 2014 x64' 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 -DWIN64 -DCONSERVATIVE -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=8, 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"N:\lang\perl\strawberry\x64\5.18.2\perl\lib\CORE" -L"N:\lang\perl\strawberry\x64\5.18.2\c\lib"' libpth=N:\lang\perl\strawberry\x64\5.18.2\c\lib N:\lang\perl\strawberry\x64\5.18.2\c\x86_64-w64-mingw32\lib N:\lang\perl\strawberry\x64\5.18.2\c\lib\gcc\x86_64-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"N:\lang\perl\strawberry\x64\5.18.2\perl\lib\CORE" -L"N:\lang\perl\strawberry\x64\5.18.2\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 22:40:30 %ENV: PERL5LIB="N:/home/ollisg/perl5/strawberry/x64/5.18.2/lib/perl5" PERL_CPANM_OPT="--mirror http://mirror.sydney.wdlabs.com/cpan/ --mirror-only" PERL_LOCAL_LIB_ROOT="N:/home/ollisg/perl5/strawberry/x64/5.18.2" PERL_MB_OPT="--install_base N:/home/ollisg/perl5/strawberry/x64/5.18.2" PERL_MM_OPT="INSTALL_BASE=N:/home/ollisg/perl5/strawberry/x64/5.18.2" @INC: N:/home/ollisg/perl5/strawberry/x64/5.18.2/lib/perl5/MSWin32-x64-multi-thread N:/home/ollisg/perl5/strawberry/x64/5.18.2/lib/perl5 N:/lang/perl/strawberry/x64/5.18.2/perl/site/lib N:/lang/perl/strawberry/x64/5.18.2/perl/vendor/lib N:/lang/perl/strawberry/x64/5.18.2/perl/lib .
Thank you very much for your report, and apologies for taking a few days to respond. Unfortunately it is going to be difficult for me to address this because I do not have a Windows system to work on, and have not for some time. Maybe I should put this module up for adoption. But that does not help you right now. If you are willing to try something for me, download and expand the kit, and edit lib/Win32/Process/Info/NT.pm. At or about line 381 you will find the code "$minws = $maxws = ' ';". What I would like you to do is to change the literal four spaces to eight spaces, and then manually build and run the test. The incantation to do this is: C:\whatever> perl Makefile.PL C:\whatever> nmake C:\whatever> nmake test You may have to use some other program than 'nmake'. The command C:\whatever> perl -V:make will tell you the name of the 'make' program to use. You _may_ also need to change the literal 'L' to 'Q' in the two unpacks a couple lines below. If all this gets you going, I will have to research how to detect a 64-bit Perl, since some of the changes, at least, won't work at 32 bits.
On Sun Jan 25 17:37:52 2015, WYANT wrote: Show quoted text
> Thank you very much for your report, and apologies for taking a few > days to respond.
No problem, I appreciate the response! Show quoted text
> Unfortunately it is going to be difficult for me to address this > because I do not have a Windows system to work on, and have not for > some time. Maybe I should put this module up for adoption. But that > does not help you right now.
I'd be happy to take over until/unless somebody more qualified comes along. I can at least evaluate and test incoming patches, though I wouldn't be adding any new features. I'm not terribly familiar with Win32::API, but I have worked extensively with FFI::Raw (and FFI::Platypus) which have a similar role. Show quoted text
> If you are willing to try something for me, download and expand the > kit, and edit lib/Win32/Process/Info/NT.pm. At or about line 381 you > will find the code "$minws = $maxws = ' ';". What I would like you > to do is to change the literal four spaces to eight spaces, and then > manually build and run the test. The incantation to do this is:
Setting the minws/maxws to eight character space seems to work. The test suite passed and the code that I was using to call Win32::Process::Info is getting the same result. You can see the attached patch and build log. Show quoted text
> You _may_ also need to change the literal 'L' to 'Q' in the two > unpacks a couple lines below. > > If all this gets you going, I will have to research how to detect a > 64-bit Perl, since some of the changes, at least, won't work at 32 > bits.
The usual incantation that I use is if($^O eq 'MSWin32') { if($Config{archname} =~ /^MSWin32-x64/) { # 64 bit Windows } else { # 32 bit Windows } } This works for Strawberry 32+64 and Visual C++ builds of 32 bit. I do not have a 64 bit build with Visual C++, but I believe it has the same archname prefix. I am not sure it is necessary since I didn't seem to need to change the unpack calls?
Subject: buuild.txt
N:\home\ollisg\dev\Win32-Process-Info>perl Makefile.PL Checking if your kit is complete... Warning: the following files are missing in your kit: README Please inform the author. Generating a dmake-style Makefile Writing Makefile for Win32::Process::Info Writing MYMETA.yml and MYMETA.json N:\home\ollisg\dev\Win32-Process-Info>make cp lib/Win32/Process/Info.pm blib\lib\Win32\Process\Info.pm cp lib/Win32/Process/Info/NT.pm blib\lib\Win32\Process\Info\NT.pm cp lib/Win32/Process/Info/PT.pm blib\lib\Win32\Process\Info\PT.pm cp lib/Win32/Process/Info/WMI.pm blib\lib\Win32\Process\Info\WMI.pm N:\home\ollisg\dev\Win32-Process-Info>make test N:\lang\perl\strawberry\x64\5.20.1\perl\bin\perl.exe "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/basic.t .. ok All tests successful. Files=1, Tests=32, 3 wallclock secs ( 0.01 usr + 0.01 sys = 0.03 CPU) Result: PASS
Subject: win32-process-info.diff
xian-x86_64% git diff diff --git a/lib/Win32/Process/Info/NT.pm b/lib/Win32/Process/Info/NT.pm index 6f59304..76c8fa3 100644 --- a/lib/Win32/Process/Info/NT.pm +++ b/lib/Win32/Process/Info/NT.pm @@ -378,7 +378,7 @@ foreach my $pid (map {$_ eq '.' ? $my_pid : $_} @args) { } my ($minws, $maxws); - $minws = $maxws = ' '; + $minws = $maxws = ' '; if ($GetProcessWorkingSetSize->Call ($prchdl, $minws, $maxws)) { $self->_build_hash ($dat, MinimumWorkingSetSize => unpack ('L', $minws),
This patch also appears to work on Cygwin 64.
Thank you very much for the feedback, and for the offer to do maintenance on the module. If you are the PLICEASE with all the Alien and FFI modules on CPAN, you are on general principals more qualified than I am to do this. If you are still willing, I cam make you either co-maintainer or (if I can figure out how to do it) actual owner of the module. The problem is making the code base available, since I have not yet taken the GitHub plunge. The code currently lives in a private Git repository, so I suppose I could put it on GitHub if that's what you would like.
On Tue Feb 10 15:49:46 2015, WYANT wrote: Show quoted text
> Thank you very much for the feedback, and for the offer to do > maintenance on the module. If you are the PLICEASE with all the Alien > and FFI modules on CPAN, you are on general principals more qualified > than I am to do this.
That is me! Show quoted text
> If you are still willing, I cam make you either co-maintainer or (if I > can figure out how to do it) actual owner of the module.
Sure. That would be good. co-maint is sufficient. If you can give me ownership, I think that enables me to later transfer ownership down the road to someone else without asking the module list or you for help. Whatever you feel comfortable with. Show quoted text
> The problem is making the code base available, since I have not yet > taken the GitHub plunge. The code currently lives in a private Git > repository, so I suppose I could put it on GitHub if that's what you > would like.
GitHub would be easiest for me, as that is ultimately where I will be hosting it. I can fetch from any publicly accessible git though. Worst case I can also import from CPAN. That would give me the various versions on CPAN in the git history, but of course the full history of your repo might be useful down the line sometime. Thanks! Graham
Any progress on this? As I mentioned, a git repository with the full history would be desirable, but by no means necessary.
On Wed Feb 25 19:49:54 2015, PLICEASE wrote: Show quoted text
> Any progress on this? As I mentioned, a git repository with the full > history would be desirable, but by no means necessary.
I have created a GitHub repository for this code at https://github.com/trwyant/perl-Win32-ProcessInfo and made PLICEASE a co-maintainer. Yes, you already know this, but I said I would document this in the ticket so the rest of the world would know what was going on.
On Thu Mar 26 14:39:10 2015, WYANT wrote: Show quoted text
> On Wed Feb 25 19:49:54 2015, PLICEASE wrote:
> > Any progress on this? As I mentioned, a git repository with the full > > history would be desirable, but by no means necessary.
> > I have created a GitHub repository for this code at > https://github.com/trwyant/perl-Win32-ProcessInfo and made PLICEASE a > co-maintainer. Yes, you already know this, but I said I would document > this in the ticket so the rest of the world would know what was going > on.
Great! Thanks! I've released a version that works with 64bit as version 1.022. When I get a chance I will see if I can reproduce the other two open rt tickets