From dinoex@net2.dinoex.sub.org  Mon Apr 16 04:21:30 2001
Return-Path: <dinoex@net2.dinoex.sub.org>
Received: from net2.dinoex.sub.org (net2.dinoex.de [212.184.201.182])
	by hub.freebsd.org (Postfix) with ESMTP id 6DAC737B43E
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Apr 2001 04:21:28 -0700 (PDT)
	(envelope-from dinoex@net2.dinoex.sub.org)
Received: (from dinoex@localhost)
	by net2.dinoex.sub.org (8.11.3/8.11.3) id f3GBL8P10309; Mon, 16 Apr 2001 13:21:08 +0200 (CEST)
	(envelope-from dinoex)
Message-Id: <200104161121.f3GBL8P10309@net2.dinoex.sub.org>
Date: Mon, 16 Apr 2001 13:21:08 +0200 (CEST)
From: dirk.meyer@dinoex.sub.org
Reply-To: dirk.meyer@dinoex.sub.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: ethernet vr0 hangs
X-Send-Pr-Version: 3.2

>Number:         26613
>Category:       kern
>Synopsis:       ethernet vr0 hangs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    silby
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 16 04:30:00 PDT 2001
>Closed-Date:    Thu Jun 06 22:42:09 PDT 2002
>Last-Modified:  Thu Jun 06 22:42:09 PDT 2002
>Originator:     Dirk Meyer
>Release:        FreeBSD 4.3-RC
>Organization:
privat
>Environment:

	FreeBSD 4.3-RC #8: Sun Apr 15 01:16:51 CEST 2001 (GENERIC)

	vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0x6800-0x68ff mem 0xe4000000-0xe40000ff \
		irq 10 at device 10.0 on pci0
	vr0: Ethernet address: 00:50:ba:65:c2:13
	miibus0: <MII bus> on vr0
	ukphy0: <Generic IEEE 802.3u media interface> on miibus0
	ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

	vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 217.X.XXX.XXX netmask 0xffffff00 broadcast 217.X.XXX.XXX
        inet6 fe80::250:baff:fe65:c213%vr0 prefixlen 64 scopeid 0x1 
        inet 62.XXX.XX.XXX netmask 0xffffffc0 broadcast 62.XXX.XX.XXX
        inet 217.X.XXX.XXX netmask 0xffffffc0 broadcast 217.X.XXX.XXX
        ether 00:50:ba:65:c2:13 
        media: autoselect (10baseT/UTP) status: active
        supported media: autoselect 100baseTX <full-duplex> 100baseTX 10baseT/UTP <full-duplex> 10baseT/UTP none


>Description:

	Network seems unstable, NSF hangs, interactive Login lags sometimes.

>How-To-Repeat:

	NFS exported volumume (server on this machine)
	Client hangs when copy to much data.
	A ping from the server to the client shows stray packages!

[...]
64 bytes from 217.6.200.196: icmp_seq=17604 ttl=255 time=4.292 ms
64 bytes from 217.6.200.196: icmp_seq=17605 ttl=255 time=30.590 ms
64 bytes from 217.6.200.196: icmp_seq=17607 ttl=255 time=0.523 ms
64 bytes from 217.6.200.196: icmp_seq=17608 ttl=255 time=0.513 ms
64 bytes from 217.6.200.196: icmp_seq=17609 ttl=255 time=18.057 ms
64 bytes from 217.6.200.196: icmp_seq=17610 ttl=255 time=0.538 ms
64 bytes from 217.6.200.196: icmp_seq=17606 ttl=255 time=4518.681 ms
64 bytes from 217.6.200.196: icmp_seq=17611 ttl=255 time=0.523 ms
64 bytes from 217.6.200.196: icmp_seq=17611 ttl=255 time=0.523 ms
64 bytes from 217.6.200.196: icmp_seq=17612 ttl=255 time=22.136 ms
64 bytes from 217.6.200.196: icmp_seq=17613 ttl=255 time=27.047 ms
64 bytes from 217.6.200.196: icmp_seq=17614 ttl=255 time=0.507 ms
64 bytes from 217.6.200.196: icmp_seq=17615 ttl=255 time=0.528 ms
64 bytes from 217.6.200.196: icmp_seq=17616 ttl=255 time=11.841 ms
64 bytes from 217.6.200.196: icmp_seq=17617 ttl=255 time=17.809 ms
64 bytes from 217.6.200.196: icmp_seq=17618 ttl=255 time=7.396 ms
64 bytes from 217.6.200.196: icmp_seq=17619 ttl=255 time=23.490 ms
64 bytes from 217.6.200.196: icmp_seq=17620 ttl=255 time=0.724 ms
64 bytes from 217.6.200.196: icmp_seq=17621 ttl=255 time=14.023 ms
error: No Buffer Space

	to reactivate the Line:
	$ ifconfig vr0 down
	$ ifconfig vr0 up

	After the copy is done, teh ping keeps "dancing"

[...]
64 bytes from 217.6.200.196: icmp_seq=100 ttl=255 time=0.524 ms
64 bytes from 217.6.200.196: icmp_seq=62 ttl=255 time=38901.325 ms
64 bytes from 217.6.200.196: icmp_seq=101 ttl=255 time=0.494 ms
[...]
64 bytes from 217.6.200.196: icmp_seq=200 ttl=255 time=0.504 ms
64 bytes from 217.6.200.196: icmp_seq=163 ttl=255 time=38231.139 ms
64 bytes from 217.6.200.196: icmp_seq=201 ttl=255 time=0.445 ms
[...]
64 bytes from 217.6.200.196: icmp_seq=536 ttl=255 time=0.570 ms
64 bytes from 217.6.200.196: icmp_seq=423 ttl=255 time=114132.380 ms
64 bytes from 217.6.200.196: icmp_seq=538 ttl=255 time=0.536 ms
[...]
64 bytes from 217.6.200.196: icmp_seq=631 ttl=255 time=0.510 ms
64 bytes from 217.6.200.196: icmp_seq=537 ttl=255 time=95722.164 ms
64 bytes from 217.6.200.196: icmp_seq=632 ttl=255 time=0.518 ms
[...]
64 bytes from 217.6.200.196: icmp_seq=940 ttl=255 time=0.543 ms
64 bytes from 217.6.200.196: icmp_seq=813 ttl=255 time=128272.599 ms
64 bytes from 217.6.200.196: icmp_seq=942 ttl=255 time=0.531 ms
[...]
64 bytes from 217.6.200.196: icmp_seq=1068 ttl=255 time=0.538 ms
64 bytes from 217.6.200.196: icmp_seq=941 ttl=255 time=128272.534 ms
64 bytes from 217.6.200.196: icmp_seq=1070 ttl=255 time=0.516 ms
[...]
64 bytes from 217.6.200.196: icmp_seq=1176 ttl=255 time=0.475 ms
64 bytes from 217.6.200.196: icmp_seq=1069 ttl=255 time=108969.408 ms
64 bytes from 217.6.200.196: icmp_seq=1177 ttl=255 time=0.529 ms
[...]
64 bytes from 217.6.200.196: icmp_seq=1228 ttl=255 time=0.489 ms
64 bytes from 217.6.200.196: icmp_seq=1199 ttl=255 time=29461.110 ms
64 bytes from 217.6.200.196: icmp_seq=1229 ttl=255 time=0.480 ms
[...]
64 bytes from 217.6.200.196: icmp_seq=1275 ttl=255 time=0.556 ms
64 bytes from 217.6.200.196: icmp_seq=1257 ttl=255 time=18230.945 ms
64 bytes from 217.6.200.196: icmp_seq=1276 ttl=255 time=0.529 ms

	$ netstat -m
124/320/4096 mbufs in use (current/peak/max):
        123 mbufs allocated to data
        1 mbufs allocated to packet headers
121/164/1024 mbuf clusters in use (current/peak/max)
408 Kbytes allocated to network (13% of mb_map in use)


>Fix:
	
	Downgrade to FreeBSD 4.2-STABLE #4: Sun Feb 18 10:48:45 CET 2001

>Release-Note:
>Audit-Trail:

From: dirk.meyer@dinoex.sub.org (Dirk Meyer)
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/26613: ethernet vr0 hangs
Date: Sun, 22 Apr 2001 19:35:41 +0200

 - Collisions have counted up
 - NFS packages are fragmented
 	Is this a problem here?
 
 kind regards Dirk
 
 - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
 
 cvsup and make world:
 FreeBSD 4.3-STABLE, Sat Apr 21 16:07:45 CEST 2001
 
 $ df
 net3:/data                         3969982  3245507   406877    89%    /net3
 $ mount
 net3:/data on /net3 (nfs)
 $ du /src/distfiles-local
 315798  /src/distfiles-local
 
 $ cp -pR /src/distfiles-local /net3/distfiles/ &
 $ ping net3
 PING net3 (XXX.XXX.XXX.XXX): 56 data bytes
 64 bytes from XXX.XXX.XXX.XXX: icmp_seq=0 ttl=255 time=10.349 ms
 64 bytes from XXX.XXX.XXX.XXX: icmp_seq=1 ttl=255 time=21.457 ms
 [...]
 64 bytes from XXX.XXX.XXX.XXX: icmp_seq=16 ttl=255 time=0.640 ms
 64 bytes from XXX.XXX.XXX.XXX: icmp_seq=17 ttl=255 time=4.393 ms
 ping: sendto: Host is down
 ping: sendto: Host is down
 [...]
 
 
 Copy has tranfered:
 net3$ du
 36769	/data/distfiles/
 
 net3$ netstat -m
 389/400/4096 mbufs in use (current/peak/max):
         389 mbufs allocated to data
 142/162/1024 mbuf clusters in use (current/peak/max)
 424 Kbytes allocated to network (13% of mb_map in use)
 
 net3$ netstat -i
 Name  Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs  Coll
 vr0   1500  <Link#1>    00:50:ba:65:c2:13    22263     0     6998     4  2572
 vr0   1500  n-telekom3    net3               22226     -     7213     -     -
 
 net3$ netstat -s
 tcp:
         3805 packets sent
                 2475 data packets (1036486 bytes)
                 1327 ack-only packets (118 delayed)
                 3 control packets
         5372 packets received
                 1964 acks (for 1036492 bytes)
                 3 duplicate acks
                 3891 packets (79580 bytes) received in-sequence
                 1 out-of-order packet (0 bytes)
                 1 window update packet
         3 connection accepts
         3 connections established (including accepts)
         9 connections closed (including 0 drops)
                 3 connections updated cached RTT on close
                 3 connections updated cached RTT variance on close
         1842 segments updated rtt (of 1842 attempts)
         930 correct ACK header predictions
         3091 correct data packet header predictions
 udp:
         3339 datagrams received
         3339 delivered
         3331 datagrams output
 ip:
         22252 total packets received
         16179 fragments received
         2713 packets reassembled ok
         8786 packets for this host
         7239 packets sent from this host
 icmp:
         Output histogram:
                 echo reply: 75
         Input histogram:
                 echo: 75
         75 message responses generated
         ICMP address mask responses are disabled
 
 
 ping: sendto: Host is down
 ping: sendto: Host is down
 64 bytes from XXX.XXX.XXX.XXX: icmp_seq=249 ttl=255 time=0.945 ms
 64 bytes from XXX.XXX.XXX.XXX: icmp_seq=250 ttl=255 time=0.654 ms
 [...]
 64 bytes from 217.6.200.194: icmp_seq=282 ttl=255 time=32.686 ms
 64 bytes from 217.6.200.194: icmp_seq=283 ttl=255 time=37.923 ms
 ping: sendto: Host is down
 ping: sendto: Host is down
 

From: dirk.meyer@dinoex.sub.org (Dirk Meyer)
To: freebsd-gnats-submit@FreeBSD.org,
	archie@dellroad.org (Archie Cobbs)
Cc:  
Subject: Re: kern/26613: ethernet vr0 hangs
Date: Mon, 14 May 2001 10:22:15 +0200

 I did serveral check with:
 FreeBSD 4.3-STABLE #0: Sun May  6 17:10:21 CEST 2001
 
 options         NMBCLUSTERS=8192
 - only 1 ethernet card in the system.
 
 stil don't fix this problem.
 
 Name  Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs  Coll
 vr0   1500  <Link#1>    00:50:ba:65:c2:13    94983     0    17340     8 14090
 
 It could be something with fragmented packages NFS use,
 so I tweaked the blocksize:
 
 Name  Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs  Coll
 vr0   1500  <Link#1>    00:50:ba:65:c2:13   152849     0    75162     8 47268
 vr0   1500  <Link#1>    00:50:ba:65:c2:13   351460     0   273611     8 160714
 vr0   1500  <Link#1>    00:50:ba:65:c2:13   507605     0   429471     8 249338
 
 =========== FIX ===============
 
 If the client mount with options "-w=1024" it works.!
 I can copy 400 Mbytes without a problem on an NFS mount.
 
 ================================
 
 Is this an NFS or IP-Stack problem?
 
 kind regards Dirk
 
 - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
State-Changed-From-To: open->feedback 
State-Changed-By: cjc 
State-Changed-When: Wed Mar 27 01:04:01 PST 2002 
State-Changed-Why:  
Is this still an issue with later releases of FreeBSD? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26613 

From: dirk.meyer@dinoex.sub.org (Dirk Meyer)
To: FreeBSD-gnats-submit@FreeBSD.ORG, cjc@FreeBSD.ORG,
	freebsd-bugs@FreeBSD.ORG
Cc:  
Subject: Re: kern/26613: ethernet vr0 hangs
Date: Wed, 27 Mar 2002 18:07:05 +0100

 > State-Changed-From-To: open->feedback
 > Is this still an issue with later releases of FreeBSD?
 
 Yes, The problem still hit me under 4.5 RELEASE
 Unfortunatly the system is down at the moment,
 But I have another machine with the problem,
 that I just can't reboot/test so often with.
 
 I use as a workaround a scrin in cron:
 
         echo "fail:"
         netstat -m
         ifconfig vr0 down
         netstat -m
         ifconfig vr0 up
         netstat -m
 
 to keep the system responsive.
 
 kind regards Dirk
 
 - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
 - [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
State-Changed-From-To: feedback->open 
State-Changed-By: cjc 
State-Changed-When: Sun Mar 31 08:11:40 PST 2002 
State-Changed-Why:  
Submitter reports this is still a problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26613 
Responsible-Changed-From-To: freebsd-bugs->silby 
Responsible-Changed-By: silby 
Responsible-Changed-When: Fri May 17 10:44:59 PDT 2002 
Responsible-Changed-Why:  
I'm taking the vr-related PRs for now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26613 
State-Changed-From-To: open->feedback 
State-Changed-By: silby 
State-Changed-When: Sun May 19 18:22:18 PDT 2002 
State-Changed-Why:  
A workaround for this problem so that the driver will automatically 
reset the network card has been committed to 5.x and 4.x as of 
this week.  Please update to the latest version of if_vr.c and 
see if this effectively solves the problem for you. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26613 

From: dirk.meyer@dinoex.sub.org (Dirk Meyer)
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: kern/26613: ethernet vr0 hangs
Date: Tue, 21 May 2002 20:00:34 +0200

 > A workaround for this problem so that the driver will automatically
 > reset the network card has been committed to 5.x and 4.x as of
 
 I rebuild with the module:
  * $FreeBSD: src/sys/pci/if_vr.c,v 1.26.2.9 2002/05/20 01:18:06 silby Exp $
 
 Test shows no problem, I will run it 2 weeks to be sure.
 
 kind regards Dirk
 
 - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
 - [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]

From: dirk.meyer@dinoex.sub.org (Dirk Meyer)
To: FreeBSD-gnats-submit@FreeBSD.ORG,
	silby@silby.com (Mike Silbersack)
Cc:  
Subject: Re: kern/26613: ethernet vr0 hangs
Date: Fri, 07 Jun 2002 06:45:54 +0200

 > Have you been able to determine if the patch solved the problem you were
 > experiencing yet?
 
 Thanks, The patches does help ...
 I confirm to see the syslog line:
 
 May 22 22:38:12 ceres /kernel: vr0: watchdog timeout
 Jun  6 06:06:24 ceres /kernel: vr0: watchdog timeout
 
 kind regards Dirk
 
 - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
 - [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
State-Changed-From-To: feedback->closed 
State-Changed-By: silby 
State-Changed-When: Thu Jun 6 22:41:41 PDT 2002 
State-Changed-Why:  
The recent changes to the vr driver effectively fix 
the problem of the submitter of this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=26613 
>Unformatted:
