toddr / Net-Daemon

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

Net::Daemon tests hang on IRIX [rt.cpan.org #28652] #13

Closed toddr closed 4 years ago

toddr commented 4 years ago

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

Requestors:

Attachments:

From mnooning@cpan.org on 2007-08-03 18:17:03 :

This was originally reported by Stuart Shelton.
I don't know if there's an offical bug-tracker, or whether you already
know of this issue:

When trying to install Net::Daemon via the CPAN shell, the test suite
hangs on IRIX, which requires killing both the build and CPAN with it.

The output (from "make Net::Daemon", "look Net::Daemon") is:

# gmake test
PERL_DL_NONLAZY=1 /usr/bsd/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/base..........ok
t/config........no connection to syslog available
        - /dev/conslog is not a socket at blib/lib/Net/Daemon/Log.pm
line 114
Server process didn't create a file 'ndtest.prt'. at
/usr/bsd/var/tmp/cpan/build/Net-Daemon-XXAnno/blib/lib/Net/Daemon/Test.pm
line 317.
t/config........dubious
        Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-5
        Failed 5/5 tests, 0.00% okay
t/fork..........no connection to syslog available
        - /dev/conslog is not a socket at blib/lib/Net/Daemon/Log.pm
line 114
Server process didn't create a file 'ndtest.prt'. at
/usr/bsd/var/tmp/cpan/build/Net-Daemon-XXAnno/blib/lib/Net/Daemon/Test.pm
line 317.
FAILED before any test output arrived
t/forkm.........Unexpected return from Bind().
Server died: no connection to syslog available
        - /dev/conslog is not a socket at blib/lib/Net/Daemon/Log.pm
line 114

... and, indeed, on IRIX /dev/conslog does exist, but is a
character-special file.

$ ls -l /dev/*log*
crw-rw-rw- 1 root sys 10, 80 2007-08-01 11:28 /dev/conslog
crw-r--r-- 1 root sys 41,  0 2007-06-28 10:41 /dev/klog
crw-rw-rw- 1 root sys 10, 80 2007-08-01 05:25 /dev/log

The man page for syslogd(1M) states:

     syslogd reads and logs messages into a set of files described by the
     configuration file /etc/syslog.conf.  Each message is one line.  A
     message can contain a priority code, marked by a number in angle braces
     at the beginning of the line.  Priorities are defined in
<sys/syslog.h>.
     syslogd reads from the stream device /dev/log, from an Internet domain
     socket specified in /etc/services, and from the special device
/dev/klog
     (to read kernel messages).

Can I provide you with any further information in order to fix this
issue on IRIX?

P.S. In the Net::Daemon documentation, the only contact listed is
Jochen, and I can't seem to find any email lists (via Google) where
Malcolm's email address hasn't been censored.  Hopefully, this message
will find the right person...

Cheers,

Stuart 

------------------------------Response by M. Nooning follows
Hello Stuart,

It may be that there is a problem that is unrelated to Net::Daemon.  If
you go to http://search.cpan.org/~saper/Sys-Syslog-0.18/Syslog.pm  you
will see that the error message "no connection to syslog available"
comes from syslog() failing to connect to the specified socket

Make sure syslogd is running when you run the tests, too. 
Make sure you have the latest Sys::Syslog (0.18).

On the other hand, I would like to try something in Temp.pm.  If all
else fails, please go to blib/lib/Net/Daemon/Test.pm.  The reason is,
from your error messages, the file "ndtest.prt" is not being created in
the parent or the child is not waiting properly before it looks for it.
------------Begin try this
Go to line 316 and change
        for (my $secs = 20;  $secs  &&  ! -s 'ndtest.prt';  $secs -=
sleep 1) {
        }
to

   for (my $secs = 20;  $secs  &&  ! -s 'ndtest.prt';  $secs -= 1) {
               select(undef, undef, undef, 1);
   }

------------End try this

You are *not* getting the error message "Error while creating
'ndtest.prt' so I suspect maybe there is something wrong with sleep. 
The "select" will wait 1 second and not depend upon the same signal that
"sleep" does.  Yes, I know this is long shot.

I doubt that it is a permissions problem because you could not have
unzipped and untarred your Net::Daemon download, etcetera, without
having the permissions to create a file.

Please let me know how you have fared. 

---------------------Stuart Shelton responded as below

Hi Sebastien & Malcolm,

Sebastien - Hi, I'm trying to track down a problem which not only
prevents Net::Daemon from passing its test-suite on IRIX, but which
causes the perl build process to hang indefinitely.  You'll notice the
output from Sys::Syslog during the Net::Daemon tests.  The problem seems
to be that Sys::Syslog is expecting a socket at /dev/conslog (Solaris?)
whereas on IRIX this is a character device - and this seems to be
confusing things.

I've double-checked, and I definitely have Sys::Syslog 0.18 installed.

I've made the change to blib/lib/Net/Daemon/Test.pm at line 314 (which I
assume was the one you meant with Temp.pm at line 316 ;) and the same
output is produced:

cpan[5]> install Sys::Syslog
Sys::Syslog is up to date (0.18).

cpan[6]> test Net::Daemon
Running test for module 'Net::Daemon'
Running make for M/MN/MNOONING/Net-Daemon/Net-Daemon-0.43.tar.gz
  Has already been unwrapped into directory
/usr/bsd/var/tmp/cpan/build/Net-Daemon-kclMUV
  Has already been made
Running make test
PERL_DL_NONLAZY=1 /usr/bsd/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/base..........ok
t/config........no connection to syslog available
        - /dev/conslog is not a socket at blib/lib/Net/Daemon/Log.pm
line 114
Server process didn't create a file 'ndtest.prt'. at
/usr/bsd/var/tmp/cpan/build/Net-Daemon-kclMUV/blib/lib/Net/Daemon/Test.pm
line 318.
t/config........dubious
        Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-5
        Failed 5/5 tests, 0.00% okay
t/fork..........no connection to syslog available
        - /dev/conslog is not a socket at blib/lib/Net/Daemon/Log.pm
line 114
Server process didn't create a file 'ndtest.prt'. at
/usr/bsd/var/tmp/cpan/build/Net-Daemon-kclMUV/blib/lib/Net/Daemon/Test.pm
line 318.
FAILED before any test output arrived
t/forkm.........Unexpected return from Bind().
Server died: no connection to syslog available
        - /dev/conslog is not a socket at blib/lib/Net/Daemon/Log.pm
line 114

[Test process hangs at this point - sent a HUP]

gmake: *** [test_dynamic] Hangup
  MNOONING/Net-Daemon/Net-Daemon-0.43.tar.gz
  /usr/bsd/bin/gmake test -- NOT OK
Failed during this command:
 MNOONING/Net-Daemon/Net-Daemon-0.43.tar.gz   : make_test NO

cpan[7]>

Incidentally, if I (force-)test Sys::Syslog, then I get:

cpan[8]> test Sys::Syslog
Running test for module 'Sys::Syslog'
Running make for S/SA/SAPER/Sys-Syslog-0.18.tar.gz
  Checksum was ok
Sys-Syslog-0.18/
Sys-Syslog-0.18/Syslog.pm
Sys-Syslog-0.18/Changes
Sys-Syslog-0.18/t/
Sys-Syslog-0.18/t/distchk.t
Sys-Syslog-0.18/t/constants.t
Sys-Syslog-0.18/t/portfs.t
Sys-Syslog-0.18/t/podspell.t
Sys-Syslog-0.18/t/00-load.t
Sys-Syslog-0.18/t/pod.t
Sys-Syslog-0.18/t/syslog.t
Sys-Syslog-0.18/t/podcover.t
Sys-Syslog-0.18/MANIFEST
Sys-Syslog-0.18/fallback/
Sys-Syslog-0.18/fallback/const-c.inc
Sys-Syslog-0.18/fallback/const-xs.inc
Sys-Syslog-0.18/ppport.h
Sys-Syslog-0.18/Syslog.xs
Sys-Syslog-0.18/README
Sys-Syslog-0.18/Makefile.PL
Sys-Syslog-0.18/META.yml

  CPAN.pm: Going to build S/SA/SAPER/Sys-Syslog-0.18.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Sys::Syslog
/usr/bsd/bin/perl /usr/bsd/lib/perl5/5.8.0/ExtUtils/xsubpp -noprototypes
-typemap /usr/bsd/lib/perl5/5.8.0/ExtUtils/typemap  Syslog.xs >
Syslog.xsc && mv Syslog.xsc Syslog.c
Running Mkbootstrap for Sys::Syslog ()
cp Syslog.pm blib/lib/Sys/Syslog.pm
chmod 644 Syslog.bs
cp Syslog.bs blib/arch/auto/Sys/Syslog/Syslog.bs
chmod 644 blib/arch/auto/Sys/Syslog/Syslog.bs
cc -c99 -n32 -mips4 -r14000 -float_const -use_readonly_const
-TARG:isa=mips4:platform=ip30:processor=r14000 -TENV:zeroinit_in_bss=ON
-c   -woff 1174,1183,1184,1185,1188,1196,1204,1548,1552,3970,3968
-D_BSD_TYPES -D_BSD_TIME -DLANGUAGE_C -I/usr/bsd/include -c99 -O2 -n32
-mips4 -r14000 -apo -float_const -use_readonly_const
-TARG:isa=mips4:platform=ip30:processor=r14000 -TENV:zeroinit_in_bss=ON
-OPT:fast_io=ON:Olimit=10240:reorg_common=ON:swp=ON
-LNO:auto_dist=ON:fusion_peeling_limit=8:gather_scatter=2
-DVERSION=\"0.18\" -DXS_VERSION=\"0.18\"
"-I/usr/bsd/lib/perl5/5.8.0/mipseb-irix6.5/CORE"   Syslog.c
rm -f blib/arch/auto/Sys/Syslog/Syslog.so
cc -c99 -n32 -mips4 -r14000 -float_const -use_readonly_const
-TARG:isa=mips4:platform=ip30:processor=r14000 -TENV:zeroinit_in_bss=ON
-Wl,-v,-s,-x,-n32,-mips4,-rdata_shared,-allow_jump_at_eop,-rpath,/usr/bsd/lib
-shared -L/usr/bsd/lib Syslog.o  -o blib/arch/auto/Sys/Syslog/Syslog.so
    \
                \

ld32: Mapped ===   Syslog.o    ====   at address  0x4000000
ld32: 1: loading Syslog.o.
ld32: Trying to open /usr/bsd/lib/libc.so...
ld32: Trying to open /usr/bsd/lib/libc.a...
ld32: Trying to open /usr/lib32/mips4/r10000/libc.so...
ld32: Trying to open /usr/lib32/mips4/r10000/libc.a...
ld32: Trying to open /usr/lib32/mips4/libc.so...
ld32: Mapped ===   /usr/lib32/mips4/libc.so    ====   at address  0x4008000
ld32: Processing /usr/lib32/mips4/libc.so.
ld32: Laying out sections and assigning virtual addresses.
ld32: Fixing up symbol values.
ld32: Sorting symbol table.
ld32: Pass2:  creating output file.
ld32: .MIPS.options.
ld32: .reginfo.
ld32: .dynamic.
ld32: .liblist.
ld32: .dynstr.
ld32: .hash.
ld32: .dynsym.
ld32: .MIPS.symlib.
ld32: .rel.dyn.
ld32: .msym.
ld32: .MIPS.stubs.
ld32: .text.
ld32: .rodata.
ld32: .got.
ld32: .sbss.
ld32: .srdata.
ld32: .debug_abbrev.
ld32: .debug_info.
ld32: .debug_frame.
ld32: .debug_aranges.
ld32: .comment.
ld32: .MIPS.interfaces.
ld32: .MIPS.events.text.
ld32: .MIPS.content.rodata.
ld32: .shstrtab.
ld32: Sorting dynamic relocation records.
chmod 755 blib/arch/auto/Sys/Syslog/Syslog.so
  SAPER/Sys-Syslog-0.18.tar.gz
  /usr/bsd/bin/gmake -j3 -j3 -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bsd/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-load......ok 1/1# Testing Sys::Syslog 0.18, Perl 5.008008,
/usr/bsd/bin/perl
t/00-load......ok
t/constants....ok
        7/88 skipped: various reasons
t/distchk......ok
t/pod..........ok
t/podcover.....ok
t/podspell.....skipped
        all skipped: Pod spelling: for developer interest only :)
t/portfs.......ok
t/syslog.......ok
        34/159 skipped: various reasons
All tests successful, 1 test and 41 subtests skipped.
Files=8, Tests=258,  3 wallclock secs ( 2.53 cusr +  0.56 csys =  3.09 CPU)
  SAPER/Sys-Syslog-0.18.tar.gz
  /usr/bsd/bin/gmake test -- OK

... which seems to suggest that it is okay (or that the Syslog test
suite is not as comprehensive as it might be...)

Cheers guys,

Stuart 

From saper@cpan.org on 2007-08-04 00:58:57 :

Hello Malcolm and Stuart,

Stuart Shelton wrote:

> Hi Sebastien & Malcolm,
>
> Sebastien - Hi, I'm trying to track down a problem which not only  
> prevents Net::Daemon from passing its test-suite on IRIX, but which  
> causes the perl build process to hang indefinitely.  You'll notice  
> the output from Sys::Syslog during the Net::Daemon tests.  The  
> problem seems to be that Sys::Syslog is expecting a socket at /dev/ 
> conslog (Solaris?) whereas on IRIX this is a character device - and  
> this seems to be confusing things.
>
> I've double-checked, and I definitely have Sys::Syslog 0.18 installed.
>
> cpan[6]> test Net::Daemon
> [...]
> Server died: no connection to syslog available
>         - /dev/conslog is not a socket at blib/lib/Net/Daemon/ 
> Log.pm line 114
>
> [Test process hangs at this point - sent a HUP]

> Incidentally, if I (force-)test Sys::Syslog, then I get:
>
> [Sys::Syslog: All tests successful, 1 test and 41 subtests skipped.]
>
> ... which seems to suggest that it is okay (or that the Syslog test  
> suite is not as comprehensive as it might be...)

Of course, I can't offer a warranty, but I think that the current  
test suite checks the module in most if not all code paths (hard to  
prove because code paths are OS dependent).

The real problem in your case is that Net::Daemon uses Sys::Syslog is  
the old way, which has always been very wrong (but it was documented  
this way so Malcolm can't be blamed for this). The current correct  
way is to use the "native" mechanism which should have been the one  
used since years ago. It's the default on all operating systems  
except Win32 where Sys::Syslog will use Win32::EventLog (in the soon- 
to-be-released version). See the note in L<Sys::Syslog/setlogck> for  
more details.
   » http://search.cpan.org/dist/Sys-Syslog/Syslog.pm#setlogsock

Malcolm, attached to this mail is a patch which removes the operating  
system dance from Net::Daemon::Log.

From saper@cpan.org on 2007-08-10 06:44:34 :

Hello Malcolm and Stuart,

I haven't heard back from you. Did one of you tried to apply the  
patch I sent in my previous mail?

Sébastien Aperghis-Tramoni wrote:

> The real problem in your case is that Net::Daemon uses Sys::Syslog  
> is the old way, which has always been very wrong (but it was  
> documented this way so Malcolm can't be blamed for this). The  
> current correct way is to use the "native" mechanism which should  
> have been the one used since years ago. It's the default on all  
> operating systems except Win32 where Sys::Syslog will use  
> Win32::EventLog (in the soon-to-be-released version). See the note  
> in L<Sys::Syslog/setlogck> for more details.
>   » http://search.cpan.org/dist/Sys-Syslog/Syslog.pm#setlogsock
>
> Malcolm, attached to this mail is a patch which removes the  
> operating system dance from Net::Daemon::Log.
> <Net-Daemon-0.43-sys-syslog-01.diff>
>
> The second patch does the same but also simplifies the loading of  
> the module, as I see no reason for doing this. It also removes some  
> "&" when used to call functions because, unless you really known  
> what you're doing, it doesn't do exactly what you think (and in  
> such case, its usage it just obsolete).
> <Net-Daemon-0.43-sys-syslog-02.diff>

Regards,

-- 
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.

From mnooning@cpan.org on 2007-08-11 01:08:24 :

From: Sébastien Aperghis-Tramoni
Hello Malcolm and Stuart,

Stuart Shelton wrote:

> Hi Sebastien & Malcolm,
>
> Sebastien - Hi, I'm trying to track down a problem which not only
prevents Net::Daemon from passing its test-suite on IRIX, but which
causes the perl build process to hang indefinitely.  You'll notice the
output from Sys::Syslog during the Net::Daemon tests.  The problem seems
to be that Sys::Syslog is expecting a socket at /dev/conslog (Solaris?)
whereas on IRIX this is a character device - and this seems to be
confusing things.
>
> I've double-checked, and I definitely have Sys::Syslog 0.18 installed.
>
> cpan[6]> test Net::Daemon
> [...]
> Server died: no connection to syslog available
>         - /dev/conslog is not a socket at blib/lib/Net/Daemon/Log.pm
line 114
>
> [Test process hangs at this point - sent a HUP]

> Incidentally, if I (force-)test Sys::Syslog, then I get:
>
> [Sys::Syslog: All tests successful, 1 test and 41 subtests skipped.]
>
> ... which seems to suggest that it is okay (or that the Syslog test
suite is not as comprehensive as it might be...)

Of course, I can't offer a warranty, but I think that the current test
suite checks the module in most if not all code paths (hard to prove
because code paths are OS dependent).

The real problem in your case is that Net::Daemon uses Sys::Syslog is
the old way, which has always been very wrong (but it was documented
this way so Malcolm can't be blamed for this). The current correct way
is to use the "native" mechanism which should have been the one used
since years ago. It's the default on all operating systems except Win32
where Sys::Syslog will use Win32::EventLog (in the soon-to-be-released
version). See the note in L<Sys::Syslog/setlogck> for more details.
  » http://search.cpan.org/dist/Sys-Syslog/Syslog.pm#setlogsock

Malcolm, attached to this mail is a patch which removes the operating
system dance from Net::Daemon::Log.

The second patch does the same but also simplifies the loading of the
module, as I see no reason for doing this. It also removes some "&" when
used to call functions because, unless you really known what you're
doing, it doesn't do exactly what you think (and in such case, its usage
it just obsolete).

Regards,

-- 
Sébastien Aperghis-Tramoni

From mnooning@cpan.org on 2007-08-11 01:11:40 :

From: Sébastien Aperghis-Tramoni
Hello Malcolm and Stuart,

Stuart Shelton wrote:

> Hi Sebastien & Malcolm,
>
> Sebastien - Hi, I'm trying to track down a problem which not only
prevents Net::Daemon from passing its test-suite on IRIX, but which
causes the perl build process to hang indefinitely.  You'll notice the
output from Sys::Syslog during the Net::Daemon tests.  The problem seems
to be that Sys::Syslog is expecting a socket at /dev/conslog (Solaris?)
whereas on IRIX this is a character device - and this seems to be
confusing things.
>
> I've double-checked, and I definitely have Sys::Syslog 0.18 installed.
>
> cpan[6]> test Net::Daemon
> [...]
> Server died: no connection to syslog available
>         - /dev/conslog is not a socket at blib/lib/Net/Daemon/Log.pm
line 114
>
> [Test process hangs at this point - sent a HUP]

> Incidentally, if I (force-)test Sys::Syslog, then I get:
>
> [Sys::Syslog: All tests successful, 1 test and 41 subtests skipped.]
>
> ... which seems to suggest that it is okay (or that the Syslog test
suite is not as comprehensive as it might be...)

Of course, I can't offer a warranty, but I think that the current test
suite checks the module in most if not all code paths (hard to prove
because code paths are OS dependent).

The real problem in your case is that Net::Daemon uses Sys::Syslog is
the old way, which has always been very wrong (but it was documented
this way so Malcolm can't be blamed for this). The current correct way
is to use the "native" mechanism which should have been the one used
since years ago. It's the default on all operating systems except Win32
where Sys::Syslog will use Win32::EventLog (in the soon-to-be-released
version). See the note in L<Sys::Syslog/setlogck> for more details.
  » http://search.cpan.org/dist/Sys-Syslog/Syslog.pm#setlogsock

Malcolm, attached to this mail is a patch which removes the operating
system dance from Net::Daemon::Log.

The second patch does the same but also simplifies the loading of the
module, as I see no reason for doing this. It also removes some "&" when
used to call functions because, unless you really known what you're
doing, it doesn't do exactly what you think (and in such case, its usage
it just obsolete).

Regards,

-- 
Sébastien Aperghis-Tramoni
-------------------------------paste Part 1p3
<div class="moz-text-flowed" style="font-family: -moz-fixed">
The second patch does the same but also simplifies the loading of the  
module, as I see no reason for doing this. It also removes some "&"  
when used to call functions because, unless you really known what  
you're doing, it doesn't do exactly what you think (and in such case,  
its usage it just obsolete).</div>

--------------------------------paste Part 1p5
<div class="moz-text-flowed" style="font-family: -moz-fixed">

Regards,

-- 
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.

</div>
-------------------------------paste first diff
diff -ru Net-Daemon-0.43-orig/lib/Net/Daemon/Log.pm
Net-Daemon-0.43/lib/Net/Daemon/Log.pm
--- Net-Daemon-0.43-orig/lib/Net/Daemon/Log.pm  2007-05-23
15:56:02.000000000 +0200
+++ Net-Daemon-0.43/lib/Net/Daemon/Log.pm   2007-08-04 02:27:37.000000000
+0200
@@ -57,11 +57,6 @@
    if ($@) {
        die "Cannot open Syslog: $@";
    }
-   if ($^O ne 'solaris'  &&  $^O ne 'freebsd'  &&
-       defined(&Sys::Syslog::setlogsock)  &&
-       eval { &Sys::Syslog::_PATH_LOG() }) {
-       &Sys::Syslog::setlogsock('unix');
-   }
    &Sys::Syslog::openlog($self->{'logname'} || ref($self), 'pid',
                  $self->{'facility'} || 'daemon');
     }
-----------------------------paste second diff
diff -ru Net-Daemon-0.43-orig/lib/Net/Daemon/Log.pm
Net-Daemon-0.43/lib/Net/Daemon/Log.pm
--- Net-Daemon-0.43-orig/lib/Net/Daemon/Log.pm  2007-05-23
15:56:02.000000000 +0200
+++ Net-Daemon-0.43/lib/Net/Daemon/Log.pm   2007-08-04 02:38:43.000000000
+0200
@@ -53,16 +53,8 @@
        or die "Cannot open EventLog:" . &Win32::GetLastError();
    $self->{'$eventId'} = 0;
     } else {
-   eval { require Sys::Syslog };
-   if ($@) {
-       die "Cannot open Syslog: $@";
-   }
-   if ($^O ne 'solaris'  &&  $^O ne 'freebsd'  &&
-       defined(&Sys::Syslog::setlogsock)  &&
-       eval { &Sys::Syslog::_PATH_LOG() }) {
-       &Sys::Syslog::setlogsock('unix');
-   }
-   &Sys::Syslog::openlog($self->{'logname'} || ref($self), 'pid',
+   require Sys::Syslog;
+   Sys::Syslog::openlog($self->{'logname'} || ref($self), 'pid',
                  $self->{'facility'} || 'daemon');
     }
     $self->{'logfile'} = 0;
@@ -111,7 +103,7 @@
        'Data' => $tid
        });
     } else {
-   &Sys::Syslog::syslog($level, "$tid$format", @args);
+   Sys::Syslog::syslog($level, "$tid$format", @args);
     }
 }

From mnooning@cpan.org on 2007-08-11 01:39:00 :

First of all, my apologies for the duplication of the last messages. 
What a pain.

I have decided to keep use Sebastien's patch, modified to keep the eval
and the check for $@ and the die statement.  If there is a problem with
require Sys::Syslog the "Cannot open Syslog: $@" line at least lets the
user know what happened.

The forkm test hung for me on a linux machine.  It was a quickie type of
test on someone else's machine so I was not able to triage it.  When I
get a chance I will test it further.

Thanks

From m.nooning@comcast.net on 2007-08-11 01:41:19 :

Sébastien Aperghis-Tramoni wrote:
> Hello Malcolm and Stuart,
>
>
> Stuart Shelton wrote:
>
>> Hi Sebastien & Malcolm,
>>
>> Sebastien - Hi, I'm trying to track down a problem which not only 
>> prevents Net::Daemon from passing its test-suite on IRIX, but which 
>> causes the perl build process to hang indefinitely.  You'll notice 
>> the output from Sys::Syslog during the Net::Daemon tests.  The 
>> problem seems to be that Sys::Syslog is expecting a socket at 
>> /dev/conslog (Solaris?) whereas on IRIX this is a character device - 
>> and this seems to be confusing things.
>>
>> I've double-checked, and I definitely have Sys::Syslog 0.18 installed.
>>
>> cpan[6]> test Net::Daemon
>> [...]
>> Server died: no connection to syslog available
>>         - /dev/conslog is not a socket at blib/lib/Net/Daemon/Log.pm 
>> line 114
>>
>> [Test process hangs at this point - sent a HUP]
>
>> Incidentally, if I (force-)test Sys::Syslog, then I get:
>>
>> [Sys::Syslog: All tests successful, 1 test and 41 subtests skipped.]
>>
>> ... which seems to suggest that it is okay (or that the Syslog test 
>> suite is not as comprehensive as it might be...)
>
> Of course, I can't offer a warranty, but I think that the current test 
> suite checks the module in most if not all code paths (hard to prove 
> because code paths are OS dependent).
>
> The real problem in your case is that Net::Daemon uses Sys::Syslog is 
> the old way, which has always been very wrong (but it was documented 
> this way so Malcolm can't be blamed for this). The current correct way 
> is to use the "native" mechanism which should have been the one used 
> since years ago. It's the default on all operating systems except 
> Win32 where Sys::Syslog will use Win32::EventLog (in the 
> soon-to-be-released version). See the note in L<Sys::Syslog/setlogck> 
> for more details.
>   » http://search.cpan.org/dist/Sys-Syslog/Syslog.pm#setlogsock
>
> Malcolm, attached to this mail is a patch which removes the operating 
> system dance from Net::Daemon::Log.
>
> The second patch does the same but also simplifies the loading of the 
> module, as I see no reason for doing this. It also removes some "&" 
> when used to call functions because, unless you really known what 
> you're doing, it doesn't do exactly what you think (and in such case, 
> its usage it just obsolete).
>
>
> Regards,
>
Thanks Sebastien,

Thanks for the analysis and the patches.

I have posted your email to 
http://rt.cpan.org/Ticket/Display.html?id=28652, and posted my reply 
there, too.

Thanks

From saper@cpan.org on 2007-08-11 13:37:53 :

Malcolm Nooning wrote:

> Thanks for the analysis and the patches.

You're welcome.

> I have posted your email to http://rt.cpan.org/Ticket/Display.html? 
> id=28652, and posted my reply there, too.

There's no need to copy mails in the ticket: it is automatically done  
as long as we send mails to bug-Net-Daemon@rt.cpan.org with the  
ticket number in the subject. That's why RT is nice to use: in a  
typical ticket, you can discuss and exchange patches with people  
through the mail gateway, and only use the web interface when it's  
done, to close the ticket.

-- 
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.

From stuart@openobjects.com on 2007-08-31 17:56:40 :

Sorry it took so long - I can confirm that with Patch #2, Net::Daemon 
does indeed build, test, and install cleanly on IRIX.

I've not tried actually using it - but this is obvisouly a great 
improvement :)

Cheers,

Stuart
toddr commented 4 years ago

Sounds like this was merged and resolved. closing.