Error message received in Heartbeat log
Alan Robertson
alanr@unix.sh
Fri, 04 Oct 2002 10:10:13 -0600
Schmidt-1, Pamela wrote:
> Alan wrote:
> If it's in heartbeat, it's probably in the 60 lines of code in ping_read().
> Ping_read() is found in lib/plugins/HBcomm/ping.c.
> If you send the ping read process a few SIGUSR1s, it will start sending
> debugging output to your logs.
>
> New:
> After looking at the ping.c code and performing multiple SIGUSR1s the error messages, shown below, that were displayed were the same as previous. I added two debug statements and the new information was never detected.
>
> heartbeat: 2002/10/02_12:46:18 debug: got 123 byte packet from 154.219.101.6
> heartbeat: 2002/10/02_12:46:18 debug: >>>
> t=NS_st
> st=ping
> at s^B
I just did a little archive searching on this...
Kevin Dwyer and Lorn Kay had the same problem - including the ^B
I don't remember the resolution, but I'm still searching for it.
OK... It looks like the code wasn't using some structures right. But, in
CVS it looks like the code is fixed correctly, and has been since
I'm not sure when 0.4.9.c was put out...
Let's see... July 30 at 05:55 AM. Lars' fix was put into CVS at 2002/07/16
11:47:53
OK. Now I'll check the tar file to see what's in it...
No, it looks like the patch is applied.
/* Now the ICMP part */ /* (there may be a better way...) */
memcpy(&icp, (buf.cbuf + hlen), sizeof(icp));
Oh...
It looks like the diagnostic line is in error...
Here's a patch that should fix that problem...
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/plugins/HBcomm/ping.c,v
retrieving revision 1.11
diff -u -r1.11 ping.c
--- ping.c 19 Sep 2002 22:40:18 -0000 1.11
+++ ping.c 4 Oct 2002 16:09:10 -0000
@@ -358,12 +358,12 @@
LOG(PIL_DEBUG, "got %d byte packet from %s"
, numbytes, inet_ntoa(their_addr.sin_addr));
}
+ msgstart = (buf.cbuf + hlen + ICMP_HDR_SZ);
+
if (DEBUGPKTCONT && numbytes > 0) {
- LOG(PIL_DEBUG, "%s", &icp.icmp_data[0]);
-
+ LOG(PIL_DEBUG, "%s", msgstart);
}
- msgstart = (buf.cbuf + hlen + ICMP_HDR_SZ);
return string2msg(msgstart, bufmax - msgstart);
}
I think this got missed when the other patches got applied. Could you see
what you get in your logs with this applied?
--