Skip Menu |
 

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 128383
Status: open
Priority: 0/
Queue: CPAN

People
Owner: Nobody in particular
Requestors: WAGNERC [...] cpan.org
Cc: wagnerc [...] plebeian.com
AdminCc:

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



CC: wagnerc [...] plebeian.com
Subject: CPAN endless loop if can't fork()
Download (untitled) / with headers
text/plain 4.4k
I tried to run perldoc inside the CPAN shell and it couldn't fork for some reason. The issue is that I couldn't break out of the loop. Hitting Ctrl-C just made it loop again. I had to kill the Perl process. Obviously, hitting Ctrl-C should make it stop trying to fork and fail gracefully. My CPAN version is 2.22 and Perl is 5.22.4. OS is Cygwin 2.11.2. Thanks. cpan[18]> perldoc Pod::Perldoc Running perldoc for module 'Pod::Perldoc' Fetching with LWP: http://search.cpan.org/perldoc?Pod::Perldoc 2 [main] perl 56028 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. 2 [main] perl 173060 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. 2 [main] perl 174664 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. 2 [main] perl 52204 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. $ perl -V Summary of my perl5 (revision 5 version 22 subversion 4) configuration: Platform: osname=cygwin, osvers=2.8.1(0.31253), archname=cygwin-thread-multi uname='cygwin_nt-6.3 cygwin 2.8.1(0.31253) 2017-07-03 14:11 x86_64 cygwin ' config_args='-des -Dprefix=/usr -Dmksymlinks -Darchname=x86_64-cygwin-threads -Dlibperl=cygperl5_22.dll -Dcc=gcc -Dld=g++ -Accflags=-ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.22.4-1 -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-5.22.4=/usr/src/debug/perl-5.22.4-1 -fwrapv' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -D_GNU_SOURCE -U__STRICT_ANSI__ -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.22.4-1 -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-5.22.4=/usr/src/debug/perl-5.22.4-1 -fwrapv -fno-strict-aliasing -fstack-protector-strong -D_FORTIFY_SOURCE=2', optimize='-O3', cppflags='-DPERL_USE_SAFE_PUTENV -D_GNU_SOURCE -U__STRICT_ANSI__ -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/build=/usr/src/debug/perl-5.22.4-1 -fdebug-prefix-map=/mnt/share/maint/perl.x86_64/src/perl-5.22.4=/usr/src/debug/perl-5.22.4-1 -fwrapv -fno-strict-aliasing -fstack-protector-strong' ccversion='', gccversion='5.4.0', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong' libpth=/usr/lib libs=-lpthread -lgdbm -ldb -ldl -lcrypt -lgdbm_compat perllibs=-lpthread -ldl -lcrypt libc=/usr/lib/libcygwin.a, so=dll, useshrplib=true, libperl=cygperl5_22.dll gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV PERL_USE_SAFE_PUTENV USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under cygwin Compiled at Jul 15 2017 20:11:53
Download (untitled) / with headers
text/plain 2.6k
Hitting Ctrl-Break on the other hand results in a core dump. (The fork() itself failing is just a nuisance I can fix by rebooting.) cpan[1]> perldoc Module::Build CPAN: CPAN::SQLite loaded ok (v0.211) Database was generated on Thu, 24 Jan 2019 00:38:15 GMT Running perldoc for module 'Module::Build' CPAN: File::Temp loaded ok (v0.2304) CPAN: LWP loaded ok (v6.15) Fetching with LWP: http://search.cpan.org/perldoc?Module::Build 3 [main] perl 174900 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. 2 [main] perl 174676 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. 2 [main] perl 158936 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. 1 [main] perl 173236 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. 2 [main] perl 47372 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. 2 [main] perl 174916 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. 2 [main] perl 51552 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. 2 [main] perl 174920 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. 2 [main] perl 50168 child_info_fork::abort: address space needed by 'Parser.dll' (0x60000) is already occupied Can't fork, trying again in 5 seconds at /usr/lib/perl5/5.22/CPAN/Distribution.pm line 4223. Quit (core dumped) Stack trace: Frame Function Args 000FFFFC390 0018005FAE9 (00000000000, 0000000FD20, 00000000000, 000FFFFDE50) 00000000002 0018006195A (00000000001, 0000000005B, 00600000010, 00000000000) 000FFFFC790 0018011DFE0 (00000000001, 0000000005B, 00600000010, 00000000000) 000FFFFC790 003F97EAFFE (00000000001, 0000000005B, 00600000010, 00000000000) End of stack trace
Download (untitled) / with headers
text/plain 625b
Thank you for letting me know the interesting experience you had with the cpan shell. This is what perldiag has to say: Can't fork, trying again in 5 seconds (W pipe) A fork in a piped open failed with EAGAIN and will be retried after five seconds. So this is a warning from perl. It doesn't come from the CPAN shell. I'm not sure I can do anything about it. Did you hit ^C repeatedly or just once? Under normal circumstances, the cpan shell has quite a tried and tested signal handling, but maybe not during this situation in util.c's Perl_my_popen()? I'm not sure how I could emulate this situation.
Download (untitled) / with headers
text/plain 648b
I think it came about from having Parser.dll from the wrong version of Perl in the vendor_perl directory. It stopped happening after compiled my own HTML::Parser. I tried hitting Ctrl-C at various speeds and just laying on the button. It just kept forking at keyboard-repeat speed! A couple times it did actually say that it caught SIGINT and recovered but I couldn't reproduce it. Hitting Ctrl-C made it instantly loop and try to fork again. So whatever got the signal didn't break the loop (usually). I'm thinking that setting a %SIG handler might be all we can do. If that's already correct then this is probably a core bug. Thanks.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.