[mrtg-developers] fork problem with 2.10.8 and perl 5.6.0
Larry Fahnoe
fahnoe at FahnoeTech.com
Tue Dec 2 18:52:52 MET 2003
With the new fork code on a Red Hat 7.0 (2.2.24, perl 5.6.0) system
I'm getting the following warnings:
Use of uninitialized value in vec at /usr/bin/mrtg line 2040.
Use of uninitialized value in vec at /usr/bin/mrtg line 2043.
The two lines are:
2040: if (vec($eout, fileno($hand[$i]), 1)) {
2043: next unless vec($rout, fileno($hand[$i]), 1);
Tobi has already cautioned me that the new forks code is not
compatible with perl 5.6, but since I cannot easily upgrade perl on
the system I use for mrtg, I thought I'd add a debug() line just
before the first of the two vec() checks to see if I could spot the
problem:
--- mrtg-2.10.8 Tue Dec 2 07:53:13 2003
+++ mrtg Tue Dec 2 11:15:15 2003
@@ -2037,6 +2037,7 @@
die sprintf("ERROR: select returned %d: $!\n",
$nfound);
}
for (my $i = 0; $i < $forks; $i++) {
+ debug ('fork',"Check child $i");
if (vec($eout, fileno($hand[$i]), 1)) {
die "ERROR: fork $i has died ahead of time?\n";
}
The resulting debug output suggests that once the child has been read,
it should not be read again. After the first time the parent has read
the child, subsequent calls to check on the child result in the
uninitialized value warning. Looks to me like the eout & rout
filehandle vectors ought to be updated once the child has been read.
However, since I'm not familiar with the guts of the processes, I'm
not inclined to try to fix this. Does the following output help
someone who is qualified to fix it?
--Larry
Tue Dec 2 11:20:00 CST 2003
--fork: Child 0 (32364) after fork
--fork: Parent 32310 after fork of child 0
--fork: Parent 32310 after fork of child 1
--fork: Parent 32310 after fork of child 2
--fork: Child 1 (32367) after fork
--fork: Parent 32310 after fork of child 3
--fork: Child 4 (32370) after fork
--fork: Child 3 (32369) after fork
--fork: Child 2 (32368) after fork
--fork: Parent 32310 after fork of child 4
--fork: Parent 32310 after fork of child 5
--fork: Parent 32310 after fork of child 6
--fork: Parent 32310 after fork of child 7
--fork: Child 5 (32371) after fork
--fork: Child 6 (32372) after fork
--fork: Child 7 (32373) after fork
--fork: Child 0 (32364) waiting to deliver
--fork: Check child 0
--fork: Parent reading child 0
--fork: Check child 1
--fork: Check child 2
--fork: Check child 3
--fork: Check child 4
--fork: Check child 5
--fork: Check child 6
--fork: Check child 7
--fork: Child 7 (32373) waiting to deliver
--fork: Check child 0
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 1
--fork: Check child 2
--fork: Check child 3
--fork: Check child 4
--fork: Check child 5
--fork: Check child 6
--fork: Check child 7
--fork: Parent reading child 7
--fork: Child 2 (32368) waiting to deliver
--fork: Check child 0
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 1
--fork: Check child 2
--fork: Parent reading child 2
--fork: Child 5 (32371) waiting to deliver
--fork: Check child 3
--fork: Check child 4
--fork: Check child 5
--fork: Check child 6
--fork: Check child 7
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 0
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 1
--fork: Check child 2
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 3
--fork: Check child 4
--fork: Check child 5
--fork: Parent reading child 5
--fork: Check child 6
--fork: Check child 7
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Child 1 (32367) waiting to deliver
--fork: Check child 0
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 1
--fork: Parent reading child 1
--fork: Check child 2
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 3
--fork: Check child 4
--fork: Check child 5
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 6
--fork: Check child 7
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Child 4 (32370) waiting to deliver
--fork: Check child 0
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 1
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 2
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 3
--fork: Check child 4
--fork: Parent reading child 4
--fork: Check child 5
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 6
--fork: Check child 7
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Child 6 (32372) waiting to deliver
--fork: Check child 0
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 1
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 2
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 3
--fork: Check child 4
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 5
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 6
--fork: Parent reading child 6
--fork: Check child 7
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Child 3 (32369) waiting to deliver
--fork: Check child 0
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 1
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 2
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 3
--fork: Parent reading child 3
--fork: Check child 4
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 5
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 6
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--fork: Check child 7
Use of uninitialized value in vec at /usr/bin/mrtg line 2041.
Use of uninitialized value in vec at /usr/bin/mrtg line 2044.
--
Larry Fahnoe, Fahnoe Technology Consulting, fahnoe at FahnoeTech.com
952/925-0744 Minneapolis, Minnesota www.FahnoeTech.com
--
Unsubscribe mailto:mrtg-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/mrtg-developers
More information about the mrtg-developers
mailing list