develooper Front page | perl.perl5.porters | Postings from September 2013

Re: [perl #74854] wait and waitpid can return -1 even when there arerunning child forks.

Thread Previous | Thread Next
From:
Charlie Strauss
Date:
September 23, 2013 17:41
Subject:
Re: [perl #74854] wait and waitpid can return -1 even when there arerunning child forks.
Message ID:
A28CD576-0D01-46D7-ABD3-35F1974788BF@mac.com
I am no longer able to reproduce the bug in my current version of perl.  I don't have either of the legacy set ups where it was a cross plat form reproducible bug.  So I guess the signals /wait bug is gone.

here's the version I tested  (stock apple build)

perl -V
Summary of my perl5 (revision 5 version 12 subversion 4) configuration:
   
  Platform:
    osname=darwin, osvers=12.0, archname=darwin-thread-multi-2level
    uname='darwin b1026.apple.com 12.0 darwin kernel version 12.0.0: tue may 15 23:31:29 pdt 2012; root:xnu-2050.6.70~1release_x86_64 x86_64 '
    config_args='-ds -e -Dprefix=/usr -Dccflags=-g  -pipe  -Dldflags= -Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc=clang'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='clang', ccflags ='-arch i386 -arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include',
    optimize='-Os',
    cppflags='-g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='clang -mmacosx-version-min=10.8', ldflags ='-arch i386 -arch x86_64 -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib
    libs=-ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-arch i386 -arch x86_64 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL
                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                        USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
  Locally applied patches:
	/Library/Perl/Updates/<version> comes before system perl directories
	installprivlib and installarchlib points to the Updates directory
  Built under darwin
  Compiled at Jun 20 2012 13:55:28
  @INC:
    /Library/Perl/5.12/darwin-thread-multi-2level
    /Library/Perl/5.12
    /Network/Library/Perl/5.12/darwin-thread-multi-2level
    /Network/Library/Perl/5.12
    /Library/Perl/Updates/5.12.4
    /System/Library/Perl/5.12/darwin-thread-multi-2level
    /System/Library/Perl/5.12
    /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level
    /System/Library/Perl/Extras/5.12



On Sep 20, 2013, at 6:35 AM, Nicholas Clark via RT <perlbug-followup@perl.org> wrote:

> On Fri, Sep 20, 2013 at 01:29:31PM +0100, Nicholas Clark wrote:
>> On Fri, Sep 20, 2013 at 02:22:09PM +0200, Andreas Koenig wrote:
>>> "Father Chrysostomos via RT" <perlbug-followup@perl.org> writes:
>>> 
>>>> I get the bug on 5.8.8, but not 5.8.9.  Bisecting will take a long time,
>>>> as it requires a human slave.
>>> 
>>> No need for slaves, the answer is perl-5.8.8-990-g5f42405.
>> 
>> Or this one in blead
>> 
>> commit 48dbb59ed9af112b035bdcc063c1471a22ec25a2
>> Author: Steffen Ullrich <coyote.frank@gmx.net>
>> Date:   Tue Feb 26 20:43:00 2008 +0100
>> 
>>    Re: interrupting system() with signal depends on signal handler
>>    Message-ID:  <47C45DB4.9060306@gmx.net>
>> 
>>    p4raw-id: //depot/perl@33408
>> 
>> diff --git a/util.c b/util.c
>> index 36166fb..82f147e 100644
>> --- a/util.c
>> +++ b/util.c
>> @@ -3011,6 +3011,7 @@ Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags)
>> #endif
>>     if (result < 0 && errno == EINTR) {
>>        PERL_ASYNC_CHECK();
>> +       errno = EINTR; /* reset in case a signal handler changed $! */
>>     }
>>     return result;
>> }
>> 
>> 
>> However, there is still a long hang at the end of the test script at that
>> revision, whereas blead exits quickly.
> 
> No, it doesn't. Not sure why I thought that.
> 
> OK, I think that this bug is resolved.
> 
> (But it's strange that it shows up in a (seeming) 5.8.9. perlbug from a
> different version from the tested version?)
> 
> Nicholas Clark
> 
> 

Charlie Strauss
cems@me.com



Thread Previous | 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