toddr / Net-Daemon

Read-only release history for Net-Daemon
http://metacpan.org/release/Net-Daemon
0 stars 0 forks source link

Test failures on Net-Daemon-0.48 [rt.cpan.org #75005] #15

Closed toddr closed 3 years ago

toddr commented 3 years ago

Migrated from rt.cpan.org#75005 (status was 'open')

Requestors:

Attachments:

From mkmetw@hotmail.com on 2012-02-14 17:59:45 :


Hello,

I am trying to install Net-Daemon-0.48 on Perl 5.14.2 Win XP.

Test t/ithreadm.t is fails with windows message "An unhandled win32 exception occurred in perl.exe [4360]".

Also, test t/ithread.t displays following message - 
Perl exited with active threads:
        0 running and unjoined
        1 finished and unjoined
        0 running and detached

It seems test t/ithreadm.t is failing because of "$handle->Terminate()" in the END block.

So, I have added DESTROY method for Net::Daemon::Test::Fork and Net::Daemon::Test::Win32 classes in Net\Daemon\Test.pm which will kill the child process.

The message displayed by t/ithread.t is because of the missing join call.

I am attaching the modifications needed to pass all the test on my machine.

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

  Platform:
    osname=MSWin32, osvers=5.1, archname=MSWin32-x86-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=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE  -DPERL_TEX
TMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='14.00.50727.762', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"D:\PROGRAMS\perl\5.14.2\lib\CORE"  -machine:x86 "/manifestdependency:type='Win3
2' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"'
    libpth=C:\Programs\Microsoft_Visual_Studio_8\VC\lib
    libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2
_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
    perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib
 ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl514.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"D:\PROGRAMS\perl\5.14.2\lib\CORE"  -machine:x86 "/manifestdependency
:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"'

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
  Built under MSWin32
  Compiled at Feb  6 2012 19:04:45
  @INC:
    D:/PROGRAMS/perl/site/5.14.2/lib
    D:/PROGRAMS/perl/5.14.2/lib
    .

Regards,

From m.nooning@comcast.net on 2012-02-14 19:18:02 :

Hello,

Thanks for the report, and especially for the patch.

Just because Net::Daemon installs and tests okay on my XP machine, does 
not mean you are doing anything wrong.  I know that.  However, before I 
make any changes I would like to go over your ideas.

First, your DESTROY subroutine.  I do not see how it would ever get invoked.
Second, we already have the Terminate routine.  Note that 
Net::Daemon::Test  will always invoke $handle->Terminate() as the last 
thing it does, unless something bad causes the code to exit before that 
invocation.

Could it have been that something was causing failures/exits on your 
machine prior to getting to the $handle->Terminate() instruction?

Thanks

On 2/14/2012 12:59 PM, Manoj Kumar via RT wrote:
> Tue Feb 14 12:59:45 2012: Request 75005 was acted upon.
> Transaction: Ticket created by mkmetw@hotmail.com
>         Queue: Net-Daemon
>       Subject: Test failures on Net-Daemon-0.48
>     Broken in: (no value)
>      Severity: (no value)
>         Owner: Nobody
>    Requestors: mkmetw@hotmail.com
>        Status: new
>   Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=75005>
>
>
>
> Hello,
>
> I am trying to install Net-Daemon-0.48 on Perl 5.14.2 Win XP.
>
> Test t/ithreadm.t is fails with windows message "An unhandled win32 exception occurred in perl.exe [4360]".
>
> Also, test t/ithread.t displays following message -
> Perl exited with active threads:
>          0 running and unjoined
>          1 finished and unjoined
>          0 running and detached
>
> It seems test t/ithreadm.t is failing because of "$handle->Terminate()" in the END block.
>
> So, I have added DESTROY method for Net::Daemon::Test::Fork and Net::Daemon::Test::Win32 classes in Net\Daemon\Test.pm which will kill the child process.
>
> The message displayed by t/ithread.t is because of the missing join call.
>
> I am attaching the modifications needed to pass all the test on my machine.
>
> Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
>
>    Platform:
>      osname=MSWin32, osvers=5.1, archname=MSWin32-x86-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=undef, use64bitall=undef, uselongdouble=undef
>      usemymalloc=n, bincompat5005=undef
>    Compiler:
>      cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE  -DPERL_TEX
> TMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO',
>      optimize='-MD -Zi -DNDEBUG -O1',
>      cppflags='-DWIN32'
>      ccversion='14.00.50727.762', gccversion='', gccosandvers=''
>      intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
>      d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
>      ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8
>      alignbytes=8, prototype=define
>    Linker and Libraries:
>      ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"D:\PROGRAMS\perl\5.14.2\lib\CORE"  -machine:x86 "/manifestdependency:type='Win3
> 2' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"'
>      libpth=C:\Programs\Microsoft_Visual_Studio_8\VC\lib
>      libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2
> _32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
>      perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib
>   ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
>      libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl514.lib
>      gnulibc_version=''
>    Dynamic Linking:
>      dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
>      cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"D:\PROGRAMS\perl\5.14.2\lib\CORE"  -machine:x86 "/manifestdependency
> :type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"'
>
>
> 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
>    Built under MSWin32
>    Compiled at Feb  6 2012 19:04:45
>    @INC:
>      D:/PROGRAMS/perl/site/5.14.2/lib
>      D:/PROGRAMS/perl/5.14.2/lib
>      .
>
> Regards,
>
>                       

From m.nooning@comcast.net on 2012-02-14 20:01:54 :

I attempted to reinstall Net::Daemon on my Windows XP Home computer.  I 
got the same errors you did.  Your patch worked perfectly.  I will test 
the patch on my Linux box within the next few days.

Thanks again.

On 2/14/2012 2:18 PM, Malcolm Nooning via RT wrote:
>         Queue: Net-Daemon
>   Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=75005>
>
> Hello,
>
> Thanks for the report, and especially for the patch.
>
> Just because Net::Daemon installs and tests okay on my XP machine, does
> not mean you are doing anything wrong.  I know that.  However, before I
> make any changes I would like to go over your ideas.
>
> First, your DESTROY subroutine.  I do not see how it would ever get invoked.
> Second, we already have the Terminate routine.  Note that
> Net::Daemon::Test  will always invoke $handle->Terminate() as the last
> thing it does, unless something bad causes the code to exit before that
> invocation.
>
> Could it have been that something was causing failures/exits on your
> machine prior to getting to the $handle->Terminate() instruction?
>
> Thanks
>
> On 2/14/2012 12:59 PM, Manoj Kumar via RT wrote:
>> Tue Feb 14 12:59:45 2012: Request 75005 was acted upon.
>> Transaction: Ticket created by mkmetw@hotmail.com
>>          Queue: Net-Daemon
>>        Subject: Test failures on Net-Daemon-0.48
>>      Broken in: (no value)
>>       Severity: (no value)
>>          Owner: Nobody
>>     Requestors: mkmetw@hotmail.com
>>         Status: new
>>    Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=75005>
>>
>>
>>
>> Hello,
>>
>> I am trying to install Net-Daemon-0.48 on Perl 5.14.2 Win XP.
>>
>> Test t/ithreadm.t is fails with windows message "An unhandled win32 exception occurred in perl.exe [4360]".
>>
>> Also, test t/ithread.t displays following message -
>> Perl exited with active threads:
>>           0 running and unjoined
>>           1 finished and unjoined
>>           0 running and detached
>>
>> It seems test t/ithreadm.t is failing because of "$handle->Terminate()" in the END block.
>>
>> So, I have added DESTROY method for Net::Daemon::Test::Fork and Net::Daemon::Test::Win32 classes in Net\Daemon\Test.pm which will kill the child process.
>>
>> The message displayed by t/ithread.t is because of the missing join call.
>>
>> I am attaching the modifications needed to pass all the test on my machine.
>>
>> Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
>>
>>     Platform:
>>       osname=MSWin32, osvers=5.1, archname=MSWin32-x86-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=undef, use64bitall=undef, uselongdouble=undef
>>       usemymalloc=n, bincompat5005=undef
>>     Compiler:
>>       cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE  -DPERL_TEX
>> TMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO',
>>       optimize='-MD -Zi -DNDEBUG -O1',
>>       cppflags='-DWIN32'
>>       ccversion='14.00.50727.762', gccversion='', gccosandvers=''
>>       intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
>>       d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
>>       ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8
>>       alignbytes=8, prototype=define
>>     Linker and Libraries:
>>       ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"D:\PROGRAMS\perl\5.14.2\lib\CORE"  -machine:x86 "/manifestdependency:type='Win3
>> 2' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"'
>>       libpth=C:\Programs\Microsoft_Visual_Studio_8\VC\lib
>>       libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2
>> _32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
>>       perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib
>>    ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
>>       libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl514.lib
>>       gnulibc_version=''
>>     Dynamic Linking:
>>       dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
>>       cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"D:\PROGRAMS\perl\5.14.2\lib\CORE"  -machine:x86 "/manifestdependency
>> :type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"'
>>
>>
>> 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
>>     Built under MSWin32
>>     Compiled at Feb  6 2012 19:04:45
>>     @INC:
>>       D:/PROGRAMS/perl/site/5.14.2/lib
>>       D:/PROGRAMS/perl/5.14.2/lib
>>       .
>>
>> Regards,
>>
>>                      
>

From mkmetw@hotmail.com on 2012-02-15 10:02:50 :


Hi,

Please find attached a better implementation of my corrections to Test.pm. In this case, I have modified only Test.pm and ithreadm.t. 

ithread.t has been modified to avoid the warning display.

> Subject: Re: [rt.cpan.org #75005] Test failures on Net-Daemon-0.48
> From: bug-Net-Daemon@rt.cpan.org
> To: mkmetw@hotmail.com
> Date: Tue, 14 Feb 2012 15:01:56 -0500
> 
> <URL: https://rt.cpan.org/Ticket/Display.html?id=75005 >
> 
> I attempted to reinstall Net::Daemon on my Windows XP Home computer.  I 
> got the same errors you did.  Your patch worked perfectly.  I will test 
> the patch on my Linux box within the next few days.
> 
> Thanks again.
> 
> 
> On 2/14/2012 2:18 PM, Malcolm Nooning via RT wrote:
> >         Queue: Net-Daemon
> >   Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=75005>
> >
> > Hello,
> >
> > Thanks for the report, and especially for the patch.
> >
> > Just because Net::Daemon installs and tests okay on my XP machine, does
> > not mean you are doing anything wrong.  I know that.  However, before I
> > make any changes I would like to go over your ideas.
> >
> > First, your DESTROY subroutine.  I do not see how it would ever get invoked.
> > Second, we already have the Terminate routine.  Note that
> > Net::Daemon::Test  will always invoke $handle->Terminate() as the last
> > thing it does, unless something bad causes the code to exit before that
> > invocation.
> >
> > Could it have been that something was causing failures/exits on your
> > machine prior to getting to the $handle->Terminate() instruction?
> >

I do not know exactly what is happening, but if I move $handle->Terminate() out of the END block (in the original Net::Daemon), the test passes. But, if I just move $handle->Terminate out of the END block, it will not be called if the test exits before reaching the end. That's why I added DESTROY method to the two classes.

Regards,
toddr commented 3 years ago

There is clearly something wrong with how the test is forking off a daemon which is causing an unintentional exit but only on windows. I have not been able to debug this so in the meantime, I'm going to disable the test. See de1b828015bca6216b5dacf8aa192d584e6cc5ab. I have opened a new case (#19) which will further research and may re-enable the test if we find the problem.