Mailing List Archive

[mod_backhand-users] duplicate stat packets
hi there.

i've been testing mod_backhand-1.2.0 for a couple of days, and today i
noticed with tcpdump that broadcast stats are sent twice or more from same
host.
the number seem to increase after each apache restart. is this a known bug?
any workaround for it?

13:54:25.096316 eth0 B 10.0.0.7.4445 > 10.255.255.255.4445: udp 104
13:54:25.096454 eth0 B 10.0.0.7.4445 > 10.255.255.255.4445: udp 104
13:54:25.096591 eth0 B 10.0.0.7.4445 > 10.255.255.255.4445: udp 104
13:54:25.120312 eth0 > 10.0.0.2.4445 > 10.255.255.255.4445: udp 104
13:54:25.548926 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:25.549062 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:25.549198 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:25.549334 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:25.549470 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:25.549606 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:25.549764 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:25.550019 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:25.550141 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:25.550277 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:26.106326 eth0 B 10.0.0.7.4445 > 10.255.255.255.4445: udp 104
13:54:26.106574 eth0 B 10.0.0.7.4445 > 10.255.255.255.4445: udp 104
13:54:26.106710 eth0 B 10.0.0.7.4445 > 10.255.255.255.4445: udp 104
13:54:26.128328 eth0 > 10.0.0.2.4445 > 10.255.255.255.4445: udp 104
13:54:26.546589 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:26.546748 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:26.546907 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:26.547044 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:26.547242 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:26.547850 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:26.548941 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:26.549078 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:26.549212 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:26.549429 eth0 B 10.0.0.4.4445 > 10.255.255.255.4445: udp 104 (DF)
13:54:27.116289 eth0 B 10.0.0.7.4445 > 10.255.255.255.4445: udp 104
13:54:27.116496 eth0 B 10.0.0.7.4445 > 10.255.255.255.4445: udp 104
13:54:27.116633 eth0 B 10.0.0.7.4445 > 10.255.255.255.4445: udp 104
13:54:27.139768 eth0 > 10.0.0.2.4445 > 10.255.255.255.4445: udp 104

apache error log shows after restart this:
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- UnixSocketDir set to
/var/tmp
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Broadcast
10.255.255.255:4445 added
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Broadcast
10.255.255.255:4445 added
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Broadcast
10.255.255.255:4445 added
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Broadcast
10.255.255.255:4445 added
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Broadcast
10.255.255.255:4445 added
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Broadcast
10.255.255.255:4445 added
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Broadcast
10.255.255.255:4445 added
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Broadcast
10.255.255.255:4445 added
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Broadcast
10.255.255.255:4445 added
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Broadcast
10.255.255.255:4445 added
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Multicast accept
10.0.0.0/24
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Multicast accept
10.0.0.0/24
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Multicast accept
10.0.0.0/24
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Multicast accept
10.0.0.0/24
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Multicast accept
10.0.0.0/24
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Multicast accept
10.0.0.0/24
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Multicast accept
10.0.0.0/24
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Multicast accept
10.0.0.0/24
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Multicast accept
10.0.0.0/24
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand -- Multicast accept
10.0.0.0/24
[Tue Nov 20 13:50:41 2001] [notice] FastCGI: process manager initialized
(pid 8714)
[Tue Nov 20 13:50:41 2001] [notice] backhand_init(17321) spawning moderator
(PID 8715)
[Tue Nov 20 13:50:41 2001] [notice] mod_backhand moderator ready to go



--
glen
[mod_backhand-users] duplicate stat packets [ In reply to ]
On Tuesday, November 20, 2001, at 06:58 AM, glen wrote:
> i've been testing mod_backhand-1.2.0 for a couple of days, and today i
> noticed with tcpdump that broadcast stats are sent twice or more from
> same
> host.
> the number seem to increase after each apache restart. is this a known
> bug?
> any workaround for it?

How many times do you specify MulticastStats and AcceptStats in your
httpd.conf file. You should put them in there once in the main server
config (not in each virtual host).

--
Theo Schlossnagle
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7
[mod_backhand-users] duplicate stat packets [ In reply to ]
hi,


Today, Theo Schlossnagle wrote:

> Date: Wed, 21 Nov 2001 01:52:37 -0500
> From: Theo Schlossnagle <jesus@omniti.com>
> Reply-To: backhand-users@lists.backhand.org
> To: backhand-users@lists.backhand.org
> Subject: Re: [mod_backhand-users] duplicate stat packets
>
> On Tuesday, November 20, 2001, at 06:58 AM, glen wrote:
> > i've been testing mod_backhand-1.2.0 for a couple of days, and today i
> > noticed with tcpdump that broadcast stats are sent twice or more from
> > same
> > host.
> > the number seem to increase after each apache restart. is this a known
> > bug?
> > any workaround for it?
>
> How many times do you specify MulticastStats and AcceptStats in your
> httpd.conf file. You should put them in there once in the main server
> config (not in each virtual host).
both tags once.

12:26:37 glen@heart[0:358] conf$ grep Stats *.conf
backhand.conf:# MulticastStats 128.220.221.255:4445
backhand.conf:# MulticastStats 225.220.221.20:4445,1
backhand.conf:# MulticastStats 194.106.99.76:4445,1
backhand.conf:# MulticastStats 194.106.99.64:4445,1
backhand.conf:#MulticastStats 10.0.0.5 10.0.0.255:4445
backhand.conf:MulticastStats 10.0.0.4 10.255.255.255:4445
backhand.conf:# MulticastStats 10.0.0.4 10.0.0.255:4445
backhand.conf:# AcceptStats 128.220.221.0/24
backhand.conf:# AcceptStats 194.106.99.64/26
backhand.conf:AcceptStats 10.0.0.0/24



glen


>
> --
> Theo Schlossnagle
> 1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
> 2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7
[mod_backhand-users] duplicate stat packets [ In reply to ]
This is a multi-part message in MIME format.
--------------948ECEF91CC4E4F9724900F7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

hi,

i dig around a little mod_backhand.c and added two bzero() calls which make
check for duplicate lines succeed.

there is also need similiar fix for acceptstats linkedlist UDPacl.

patch attached

glen wrote:

> hi,
>
> Today, Theo Schlossnagle wrote:
>
> > Date: Wed, 21 Nov 2001 01:52:37 -0500
> > From: Theo Schlossnagle <jesus@omniti.com>
> > Reply-To: backhand-users@lists.backhand.org
> > To: backhand-users@lists.backhand.org
> > Subject: Re: [mod_backhand-users] duplicate stat packets
> >
> > On Tuesday, November 20, 2001, at 06:58 AM, glen wrote:
> > > i've been testing mod_backhand-1.2.0 for a couple of days, and today i
> > > noticed with tcpdump that broadcast stats are sent twice or more from
> > > same
> > > host.
> > > the number seem to increase after each apache restart. is this a known
> > > bug?
> > > any workaround for it?
> >
> > How many times do you specify MulticastStats and AcceptStats in your
> > httpd.conf file. You should put them in there once in the main server
> > config (not in each virtual host).
> both tags once.
>
> 12:26:37 glen@heart[0:358] conf$ grep Stats *.conf
> backhand.conf:# MulticastStats 128.220.221.255:4445
> backhand.conf:# MulticastStats 225.220.221.20:4445,1
> backhand.conf:# MulticastStats 194.106.99.76:4445,1
> backhand.conf:# MulticastStats 194.106.99.64:4445,1
> backhand.conf:#MulticastStats 10.0.0.5 10.0.0.255:4445
> backhand.conf:MulticastStats 10.0.0.4 10.255.255.255:4445
> backhand.conf:# MulticastStats 10.0.0.4 10.0.0.255:4445
> backhand.conf:# AcceptStats 128.220.221.0/24
> backhand.conf:# AcceptStats 194.106.99.64/26
> backhand.conf:AcceptStats 10.0.0.0/24
>
> glen

--
glen

--------------948ECEF91CC4E4F9724900F7
Content-Type: text/plain; charset=us-ascii;
name="duplicate_broadcast.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="duplicate_broadcast.patch"

--- mod_backhand.c~ Thu Nov 22 16:10:22 2001
+++ mod_backhand.c Thu Nov 22 16:10:26 2001
@@ -173,7 +173,10 @@

cfg->local = 1;

- sin.sin_port=0;
+ // zero the variables, otherwise duplicate check will fail since they contain garbage. -glen, 22/11/2001
+ bzero(&sin, sizeof(struct sockaddr_in));
+ bzero(&from, sizeof(struct in_addr));
+
if(!word2) { /* Not two args, just one -- shuffle and set first to hst ip */
struct hostent *he;
word2=word1;

--------------948ECEF91CC4E4F9724900F7--
[mod_backhand-users] duplicate stat packets [ In reply to ]
On Thursday, November 22, 2001, at 09:20 AM, glen wrote:
> i dig around a little mod_backhand.c and added two bzero() calls which
> make
> check for duplicate lines succeed.
>
> there is also need similiar fix for acceptstats linkedlist UDPacl.
>
> patch attached

I changed it to use memset to conform to the rest of the code and
dropped the sin.sin_port=0 as that is unnecessary if you are going to
zero it out.

It has been committed to CVS.

Thank you very much.

--
Theo Schlossnagle
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7