🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
12 messages
12 total messages Started by Terry Kennedy Tue, 18 Feb 1997 00:00
Problems streaming to Linux systems?
#15129
Author: Terry Kennedy
Date: Tue, 18 Feb 1997 00:00
27 lines
2116 bytes
  I have a news server (number 81 in the Freenix top 1000 list) which feeds
a large number of sites using innxmit (INN 1.5.1). I have 2 sites which give
me frequent "unexpected response code" errors. The received response code is
always part of an article header or body. I only have this problem with these
2 sites, and they're both running Linux - 2.0.18 w/ INN 1.4unoff4 in one case
and 2.0.28 w/ INN 1.5.1 in the other.

  I don't see how it's anything my innxmit is doing (since it only happens
with these 2 sites) and since I can't think of any reason for nnrpd to spit
back parts of article headers or bodies to the feeder.

  In one case (the 2.0.28/1.5.1 system) I was previously using non-streaming
mode and did not have this problem, but when we switched to streaming mode
for increased performance the problem surfaced.

  Has anyone seen this sort of thing before? I don't have a lot of configur-
ation info (none, really) for the 2 Linux systems I'm feeding, but I've asked
both of them to monitor this newsgroup, so if anyone has any questions, hope-
fully they'll see them and respond here.

	Thanks,
	Terry Kennedy		  Operations Manager, Academic Computing
	terry@spcvxa.spc.edu	  St. Peter's College, Jersey City, NJ USA
        +1 201 915 9381 (voice)   +1 201 435-3662 (FAX)

Re: Problems streaming to Linux systems?
#15141
Author: Richard Todd
Date: Tue, 18 Feb 1997 00:00
47 lines
3233 bytes
In article <E5t578.M6x@spcuna.spc.edu> Terry Kennedy <terry@spcuna.spc.edu> writes:

>  I have a news server (number 81 in the Freenix top 1000 list) which feeds
>a large number of sites using innxmit (INN 1.5.1). I have 2 sites which give
>me frequent "unexpected response code" errors. The received response code is
>always part of an article header or body. I only have this problem with these
>2 sites, and they're both running Linux - 2.0.18 w/ INN 1.4unoff4 in one case
>and 2.0.28 w/ INN 1.5.1 in the other.


You mean something like this (as seen from the receiving end)?
choctaw# grep bad_comm /var/log/news/news.notice | tail -10
Feb 18 16:44:04 choctaw innd: apple.telalink.net:20 bad_command Organization: AOL http://www.aol.com
Feb 18 16:44:04 choctaw innd: apple.telalink.net:20 bad_command Lines: 16
Feb 18 16:44:04 choctaw innd: apple.telalink.net:20 bad_command Message-ID: <19970218182800.NAA01076@ladder01.news.aol.com>
Feb 18 16:44:04 choctaw innd: apple.telalink.net:20 bad_command References: <19970218113501.GAA13942@ladder01.news.aol.com>
Feb 18 16:52:41 choctaw innd: news-out.direct.ca:19 bad_command 43@memyam.dinoco.de>
Feb 18 16:52:45 choctaw innd: serv.hinet.net:22 bad_command 5447.833740234375.diff.faq.p6_856232723@pilhuhn.de>
Feb 18 17:08:52 choctaw innd: news-out.direct.ca:19 bad_command 702141444.JAA18501@atlanta.american.edu>
Feb 18 17:12:46 choctaw innd: serv.hinet.net:22 bad_command bc1de0$1b07b120$LocalHost@default>
Feb 18 17:13:43 choctaw innd: apple.telalink.net:18 bad_command dd2.gwi.net>
Feb 18 17:15:26 choctaw innd: serv.hinet.net:22 bad_command 07@news>

>  I don't see how it's anything my innxmit is doing (since it only happens
>with these 2 sites) and since I can't think of any reason for nnrpd to spit
>back parts of article headers or bodies to the feeder.

(You mean 'innd', not nnrpd.) 

There's been a bug in the streaming patches since the beginning that
occasionally seems to cause the receiving end to 'lose sync' and start 
thinking that the next NNTP command should come from somewhere in the buffer
that actually conatins part of an article.  It seems to be usually triggered
by the 'rejecting huge article' code.  You might try asking what your peers
are using as an article size limit and make sure you don't feed them articles
bigger than that.

And no, this bug doesn't have anything to do with Linux.  I've seen it on
FreeBSD and BSDI systems as well.

And yes, I've tried previously to find exactly what the bug is, back in the
inn1.4unoff3 days.  I did stomp on a couple similar bugs (and the fixes got
incorporated), but this one still eludes me.


Re: Problems streaming to Linux systems?
#15144
Author: Barry Bouwsma
Date: Tue, 18 Feb 1997 00:00
48 lines
2964 bytes
On Tue, 18 Feb 1997, Terry Kennedy wrote:

>   I have a news server (number 81 in the Freenix top 1000 list) which feeds
> a large number of sites using innxmit (INN 1.5.1). I have 2 sites which give
> me frequent "unexpected response code" errors. The received response code is
> always part of an article header or body. I only have this problem with these
> 2 sites, and they're both running Linux - 2.0.18 w/ INN 1.4unoff4 in one case
> and 2.0.28 w/ INN 1.5.1 in the other.

    *ZIIIIP*  I have a news server in the Freenix top 1000 too :-)

    I've seen a comparable problem on the sending end.  The problem seems
to be most severe with Linux, although I have seen this with an
experimental filesystem from Solaris->SGI and SGI->SGI.  In the case of
Linux, I was seeing it (and other corruption) quite frequently with
innfeed sending data, as were other users also with Linux.

    I wouldn't be surprised if your receiving sites are experiencing
something related to the problem I had, as this appears to be a problem
with the libc that is supplied with (at least) stock Slackware.

    To quote a message from Clayton O'Neill -- he also has a news server
in the Freenix top 1000, and it's better than mine and yours:

``My guess is that people that are still seeing this are using an old
version of libc under Linux.  I tracked this down during te 0.7 versions
of innfeed to a bug in libc w/regards to writev's to non-blocking sockets.
I reported this to James and asked that he document it somewhere.  I
should suggest that you upgrade to libc 5.4.x or higher and see if that
fixes your problem.''


    I saw this most frequently the more data I was trying to fling around. 
If this is in fact the source of the problem, I would venture to say that
the additional throughput streaming gives you was enough to trigger this
bug.  At the point where I was saturating the local net with innfeed on
Linux, I'd see this problem almost continuously, with maybe one or two
articles sent uncorrupted. 

    Or it could be something else entirely...


Barry Bouwsma, Radio Praha Newsbastard
http://www.fileita.it/webitalia/netscum/bouwsmb0.html


Re: Problems streaming to Linux systems?
#15161
Author: Terry Kennedy
Date: Wed, 19 Feb 1997 00:00
31 lines
2161 bytes
Richard Todd <rmtodd@comanche.wildstar.net> writes:
> You mean something like this (as seen from the receiving end)?
> choctaw# grep bad_comm /var/log/news/news.notice | tail -10
> Feb 18 16:44:04 choctaw innd: apple.telalink.net:20 bad_command Organization: AOL http://www.aol.com

  Nope - that's a different problem which is happening with far less frequency
than the one I'm talking about. When the problem you describes happens, I log
"500 Syntax error or bad command".

> >  I don't see how it's anything my innxmit is doing (since it only happens
> >with these 2 sites) and since I can't think of any reason for nnrpd to spit
> >back parts of article headers or bodies to the feeder.
>
> (You mean 'innd', not nnrpd.) 

  Yes, I did. I wasn't really awake at the time I posted my original note 8-)

> And no, this bug doesn't have anything to do with Linux.  I've seen it on
> FreeBSD and BSDI systems as well.

  I agree - I've seen a low level of the problem you describe across all of
the platforms I feed. The problem I reported seems to only happen with Linux
boxes, though. A previous followup suggested a problem with the version of one
of the Linux libraries.

	Terry Kennedy		  Operations Manager, Academic Computing
	terry@spcvxa.spc.edu	  St. Peter's College, Jersey City, NJ USA
        +1 201 915 9381 (voice)   +1 201 435-3662 (FAX)

Re: Problems streaming to Linux systems?
#15206
Author: bill davidsen
Date: Thu, 20 Feb 1997 00:00
35 lines
2160 bytes
In article <E5t578.M6x@spcuna.spc.edu>,
Terry Kennedy  <terry@spcuna.spc.edu> wrote:

|   Has anyone seen this sort of thing before? I don't have a lot of configur-
| ation info (none, really) for the 2 Linux systems I'm feeding, but I've asked
| both of them to monitor this newsgroup, so if anyone has any questions, hope-
| fully they'll see them and respond here.

Unfortunately the Linux net code seems to be subject to problems
like this under heavy load. I have seen it with non-news programs,
so I don't think that it's news related per se. But when you start
beating on the network and have lots of connections open at once,
every once in a while data intended for one socket seems to go out
on another, resulting in lost data on one and "found" data on the
other.

I'm currently running libc 5.4.7 on one machine, and _probably_
5.4.13 on another, but I can't easily check.

My reading is number of sockets open rather than total data rate,
but that's based on a limited debugging time.

I suggest a repost of the original posting to this group and
comp.os.linux.networking, where there are a lot of very sharp
people. They may have an idea, or they may feel that the problem is
in the application (it's not).
--
  bill davidsen <davidsen@tmr.com>
Some people hack for fun, some because they want things their way,
some don't because they can't, and some because they can't be
bothered. Some can make anything work, some can but would rather
not, and some could misconfigure a bowling ball.

Re: Problems streaming to Linux systems?
#15223
Author: Brian Kelly
Date: Fri, 21 Feb 1997 00:00
47 lines
2742 bytes
In Article <5eg4d2$ruc@usenet1y.prodigy.net> davidsen@tmr.com (bill davidsen) writes:
>Unfortunately the Linux net code seems to be subject to problems
>like this under heavy load. I have seen it with non-news programs,
>so I don't think that it's news related per se. But when you start
>beating on the network and have lots of connections open at once,
>every once in a while data intended for one socket seems to go out
>on another, resulting in lost data on one and "found" data on the
>other.

As it happen I'm trying to track down what I believe to be this problem at
the moment. I've got two Linux boxes, connected by fast ethernet. I have a
two utilites, one spews out random length, random crosspost, random message-id
length articles in a "deep" streaming feed. The other eats this sort of feed,
but does nothing with it. With two feeders throwing data across the link
I'm reliably getting this sort of problem (more below) on one or other of the
connections. Someimes it happens after a few hundered megabytes of data,
sometimes after a couple of gigs. Once one of the connections blows up, the
other will continue without problems.

The problem appears to be on the feeder end of the connection. I'm
using non blocking I/O and only write to or read from the sockets if select()
has said I can. At a certain point in the whole procedure the read() (which 
should only be getting answers to check and takethis) receives 31k (I think
that's reliable) of data. The first few bytes of this is a proper response,
the rest is garbage, sourced on the local machine. I don't believe it's come
across the link. 

If I restrict the size of my individual write()s on the feeder machine to 4K,
the problem seems to go away.

I've tried to setup a simpler test program that exhibits this problem, but
I haven't been able to yet (you know how it is when you get a workaround).

Source Box:
P90, Linux 2.0.21, libc 5.4.17

Sink Box:
Cyrix P150+, Linux 2.0.27, libc 5.4.17

Brian
-- 
ObAFUFAQ: F. Halloween sadists randomly give poisoned candy to children.

bkelly@sulaco.com

Re: Problems streaming to Linux systems?
#15243
Author: Terry Kennedy
Date: Sat, 22 Feb 1997 00:00
25 lines
2114 bytes
Brian Kelly <bkelly@sulaco.com> writes:
> The problem appears to be on the feeder end of the connection. I'm
> using non blocking I/O and only write to or read from the sockets if select()
> has said I can. At a certain point in the whole procedure the read() (which 
> should only be getting answers to check and takethis) receives 31k (I think
> that's reliable) of data. The first few bytes of this is a proper response,
> the rest is garbage, sourced on the local machine. I don't believe it's come
> across the link. 

  Hmmm. I'm feeding from a BSD/OS V2.1 system and the only systems that are
experiencing the problem are the 2 Linux boxes I feed. I don't think there's
much code commonality between the Linux and BSD/OS networking stacks. Would
it be possible for you to run a tcpdump on that network and record all of the
traffic? That would let you pin down whether it was the sender or the recip-
ient that was causing this. Of course, if there's a bug in the Linux network-
ing code, it might affect recipients as well as senders, so this might be the
bug I'm seeing.

	Terry Kennedy		  Operations Manager, Academic Computing
	terry@spcvxa.spc.edu	  St. Peter's College, Jersey City, NJ USA
        +1 201 915 9381 (voice)   +1 201 435-3662 (FAX)


Re: Problems streaming to Linux systems?
#15248
Author: Clayton O'Neill
Date: Sat, 22 Feb 1997 00:00
31 lines
2121 bytes
On 20 Feb 1997 00:03:46 GMT, bill davidsen <davidsen@tmr.com> wrote:
>Unfortunately the Linux net code seems to be subject to problems
>like this under heavy load. I have seen it with non-news programs,
>so I don't think that it's news related per se. But when you start
>beating on the network and have lots of connections open at once,
>every once in a while data intended for one socket seems to go out
>on another, resulting in lost data on one and "found" data on the
>other.
>
>I'm currently running libc 5.4.7 on one machine, and _probably_
>5.4.13 on another, but I can't easily check.
>
>My reading is number of sockets open rather than total data rate,
>but that's based on a limited debugging time.
>
>I suggest a repost of the original posting to this group and
>comp.os.linux.networking, where there are a lot of very sharp
>people. They may have an idea, or they may feel that the problem is
>in the application (it's not).

I can honestly say that I haven't seen the problem annd I'd expect to have. 
We're running 37 full feeds w/an average of 100-120 incoming connections
and ~150 or so outgoing connections.  I'm running Linux 2.0.29/SMP w/libc
5.4.23.  Until recently I was running a patch libc 5.3.12.  Before libc
5.4.x there was definitely a bug w/using writev w/sockets in non-blocking
mode.  I specifically saw this problem with innfeed, and never with innd,
but I wouldn't rule out this occurring w/innd.  However, I have verified
that this was fixed in libc 5.4.x and up.

Re: Problems streaming to Linux systems?
#15255
Author: Brian Kelly
Date: Sun, 23 Feb 1997 00:00
50 lines
3173 bytes
In article <E5zFIA.4uM@spcuna.spc.edu> Terry Kennedy <terry@spcunb.spc.edu> writes:
>Brian Kelly <bkelly@sulaco.com> writes:
>> The problem appears to be on the feeder end of the connection. I'm
>> using non blocking I/O and only write to or read from the sockets if select()
>> has said I can. At a certain point in the whole procedure the read() (which 
>> should only be getting answers to check and takethis) receives 31k (I think
>> that's reliable) of data. The first few bytes of this is a proper response,
>> the rest is garbage, sourced on the local machine. I don't believe it's come
>> across the link. 
>
>  Hmmm. I'm feeding from a BSD/OS V2.1 system and the only systems that are
>experiencing the problem are the 2 Linux boxes I feed. I don't think there's
>>much code commonality between the Linux and BSD/OS networking stacks. Would
>it be possible for you to run a tcpdump on that network and record all of the
>traffic? That would let you pin down whether it was the sender or the recip-
>ient that was causing this. Of course, if there's a bug in the Linux network-
>ing code, it might affect recipients as well as senders, so this might be the
>bug I'm seeing.

Ok, I've just been having a baptism of fire with tcpdump. It would appear the
data is coming over the link after all. The sink machine, at some point in the
whole procedure decides to send me a single 31K (exactly) TCP packet (which
gets fragmented properly). Now the first 80 or so bytes of this data is
correct (and that's where it should have stopped), but the rest is pure
garbage.

I kick off tcpdump thus:
tcpdump -S -s 128 -i eth1 -x 'src <sink-machine> and ip[6]&32 = 32'

And it stays permanently quiet for the several hundred megabytes of simulated
news screaming in on two streaming feeds, each averaging over 1 Mbyte per
second (average article size, 15k). However, when it all goes horribly wrong,
tcpdump fires and spews out all the fragmented packets who's data corresponds
directly with the garbage I'm receiving. I'm not writing this data to the
socket on the sink machine, so the net code is doing this off it's own bat.

If the two linux machines you're feeding are under heavy load, then they may
also be exhibiting this problem and giving you the behaviour you're seeing.

I'll continue my investigations, and try and get a simple test program that
shows the behaviour so that the real Linux TCP guys can have a bash at it.

Brian
-- 
ObAFUFAQ: T. Computers have been stolen.

bkelly@sulaco.com

Re: Problems streaming to Linux systems?
#15282
Author: bill davidsen
Date: Mon, 24 Feb 1997 00:00
36 lines
2316 bytes
In article <E5zFIA.4uM@spcuna.spc.edu>,
Terry Kennedy  <terry@spcunb.spc.edu> wrote:

|   Hmmm. I'm feeding from a BSD/OS V2.1 system and the only systems
| that are experiencing the problem are the 2 Linux boxes I feed. I
| don't think there's much code commonality between the Linux and BSD/OS
| networking stacks. Would it be possible for you to run a tcpdump on
| that network and record all of the traffic? That would let you pin
| down whether it was the sender or the recip- ient that was causing
| this. Of course, if there's a bug in the Linux network- ing code, it
| might affect recipients as well as senders, so this might be the bug
| I'm seeing.

I have seen this only when there are a lot of sockets active. When
pulling a bunch of data over a single link I never see a problem. When
pulling data of many links and at high volume, I see data written to
one socket being read on another.

Note that I have one feed sending me data which gets corrupted
regularly, I'm going to ask if that's a Linux machine by chance.

My tests were to read the data from one AIX server with another (no
problem up to massive overload), and off the same AIX server with
Linux, which gave a fairly fast fail with something like 30-40
sockets open. Since the program was opening socket/sec I didn't
pinpoint just where the failure happened.

I thought it might be in the TokenRing stuff, but I see it on 10Mbit
enet as well, and I assume faster, although I haven't a fast machine
to trash just now.

I'd love to see a fix for this, I could really use Linux in more
places.

Re: Problems streaming to Linux systems?
#15298
Author: Brian Kelly
Date: Mon, 24 Feb 1997 00:00
26 lines
1805 bytes
In article <slrn5gteq7.74k.coneill@blah.erols.com> coneill@oneill.net (Clayton O'Neill) writes:
>I can honestly say that I haven't seen the problem annd I'd expect to have. 
>We're running 37 full feeds w/an average of 100-120 incoming connections
>and ~150 or so outgoing connections.  I'm running Linux 2.0.29/SMP w/libc
>5.4.23.  Until recently I was running a patch libc 5.3.12.  Before libc
>5.4.x there was definitely a bug w/using writev w/sockets in non-blocking
>mode.  I specifically saw this problem with innfeed, and never with innd,
>but I wouldn't rule out this occurring w/innd.  However, I have verified
>that this was fixed in libc 5.4.x and up.

I've upgraded to libc-5.4.23 on both ends of the link and can still reproduce
the problem I mentioned earlier (in <BKELLY.97Feb21192329@sulaco.com> and
<BKELLY.97Feb23190824@sulaco.com>)

At the moment I believe this to be a problem in the net code in the kernel, 
not libc. I'll continue to try and track it down (seeing as I can reproduce it
reliably and in a few minutes) and report back with any results.

Brian
-- 
ObAFUFAQ: Tb....Losers go on "The Love Connection."

bkelly@sulaco.com

Re: Problems streaming to Linux systems?
#15403
Author: Brian Kelly
Date: Thu, 27 Feb 1997 00:00
80 lines
3712 bytes
[Crossposted to comp.os.linux.networking as I believe they would appreciate a
"heads-up" on this issue]

In article <BKELLY.97Feb24221926@sulaco.com> I wrote:
>At the moment I believe this to be a problem in the net code in the kernel, 
>not libc. I'll continue to try and track it down (seeing as I can reproduce it
>reliably and in a few minutes) and report back with any results.

After quite a bit of detective work I've located and (I believe) fixed this
problem. It is a problem in the kernel TCP code. What I am seeing happen is
that the advertised window from the other side of the link is set to 0, then
the congestion window is set to 0 and the connection relies on the persist
timer and window probes to start things up again. There are two problems here
I believe. The congestion window should never go to 0, otherwise the packets
in flight counter will never be less than it and so we'll never get to send
data again. The second problem is the code that is run when the persist timer
fires. If there is data waiting to go, it tries to send it as the window probe.
However the nimber of bytes it sucks out of the waiting data is governed by
the size of the currently available window, not by the amount of data in the
first buffer on the send queue!!! This is why I was seeing a single 31k TCP
packet where the first bytes were correct and the remainder were garbage.

I've sent details of what I believe to be the fix to Alan Cox and the patch is
appended here. All this was carried out on the 2.0.27 kernel, but it should 
apply gracefully to most recent kernels. [I've just got word back from Alan
that the congestion window fix will be in 2.0.30]

--------- Start of patch---------
diff -u --recursive --new-file tmp/linux/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
--- tmp/linux/net/ipv4/tcp_input.c	Wed Feb 26 23:54:06 1997
+++ linux/net/ipv4/tcp_input.c	Wed Feb 26 20:37:30 1997
@@ -830,7 +830,7 @@
 	else
 	{
 		if (sk->rcv_ack_cnt > MAX_DUP_ACKS) {
-			sk->cong_window = sk->ssthresh;
+			sk->cong_window = max(sk->ssthresh, 1);
 		}
 		sk->window_seq = window_seq;
 		sk->rcv_ack_seq = ack;
diff -u --recursive --new-file tmp/linux/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
--- tmp/linux/net/ipv4/tcp_output.c	Wed Feb 26 23:54:06 1997
+++ linux/net/ipv4/tcp_output.c	Wed Feb 26 21:35:49 1997
@@ -1048,17 +1048,18 @@
 #endif
 	
 		/*
-		 *	How many bytes can we send ?
-		 */
-		 
-		win_size = sk->window_seq - sk->sent_seq;
-
-		/*
 		 *	Recover the buffer pointers
 		 */
 		 
 	    	iph = (struct iphdr *)skb->ip_hdr;
 	    	th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
+
+		/*
+		 *	How many bytes can we send ?
+		 */
+		
+		win_size = skb->len - (((unsigned char *) th) - skb->data);
+		win_size -= th->doff * 4;
 
 		/*
 		 *	Grab the data for a temporary frame


--------- End of patch---------

Brian
-- 
ObAFUFAQ: F. Grace Hopper coined the term "bug" as a result of this event.

bkelly@sulaco.com

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads