Subject: | Net::Daemon tests hang on IRIX |
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