NetBSD Problem Report #42547

From root@dale.cnst.cs.uwaterloo.ca  Thu Dec 31 03:24:01 2009
Return-Path: <root@dale.cnst.cs.uwaterloo.ca>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 8529C63B844
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 31 Dec 2009 03:24:01 +0000 (UTC)
Message-Id: <20091231032358.3197F8703D@dale.cnst.cs.uwaterloo.ca>
Date: Wed, 30 Dec 2009 22:23:58 -0500 (EST)
From: Constantine Aleksandrovich Murenin <C++@Cns.SU>
To: gnats-bugs@gnats.NetBSD.org
Cc: Constantine Aleksandrovich Murenin <C++@Cns.SU>, Marc Balmer <marc@msys.ch>
Subject: cannot establish connections after setting net.inet.tcp.recvspace sysctl to 256K
X-Send-Pr-Version: 3.95

>Number:         42547
>Category:       kern
>Synopsis:       cannot establish connections after setting net.inet.tcp.recvspace sysctl to 256K
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 31 03:25:00 +0000 2009
>Last-Modified:  Sun Jan 03 21:25:00 +0000 2010
>Originator:     Constantine A. Murenin (cnst) <cnst+netbsd@bugmail.mojo.ru>
>Release:        NetBSD 5.0.1
>Organization:
	David R. Cheriton School of Computer Science,
	University of Waterloo
>Environment:

# sysctl net.inet.tcp.{recv,send}space kern.mbuf.nmbclusters
net.inet.tcp.recvspace = 229376
net.inet.tcp.sendspace = 49152
kern.mbuf.nmbclusters = 65536

Architecture: i386
Machine: i386

>Description:
	I'm on a university network and I want to achieve 100 Mbps download 
	speeds from NetBSD mirrors.

	Setting the net.inet.tcp.recvspace sysctl to 224K works, but 
	setting it higher, for example, to 256K, stops ftp(1) and 
	other programs from working.

>How-To-Repeat:

dale# cd /tmp
dale# ftp ftp://ftp2.us.NetBSD.org/pub/NetBSD/NetBSD-5.0.1/i386/installation/cdrom/boot.iso
Connected to netbsd.mirrors.tds.net.
220-
220-
220-Welcome to TDS Internet Services - mirror3.mirrors.tds.net FTP service.
220-
220 
331 Please specify the password.
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Switching to Binary mode.
250 Directory successfully changed.
250 Directory successfully changed.
250 Directory successfully changed.
250 Directory successfully changed.
250 Directory successfully changed.
250 Directory successfully changed.
local: boot.iso remote: boot.iso
229 Entering Extended Passive Mode (|||62604|)
150 Opening BINARY mode data connection for boot.iso (6518784 bytes).
100% |*******************************************************************************************************************|  6366 KiB    6.26 MiB/s    00:00 ETA
226 File send OK.
6518784 bytes received in 00:01 (6.09 MiB/s)
221 Goodbye.
dale# sysctl -w net.inet.tcp.recvspace=262144
net.inet.tcp.recvspace: 229376 -> 262144
dale# ftp ftp://ftp2.us.NetBSD.org/pub/NetBSD/NetBSD-5.0.1/i386/installation/cdrom/boot.iso
ftp: Can't create socket to determine default socket sizes: No buffer space available
dale# traceroute ftp2.us.NetBSD.org
traceroute to netbsd.mirrors.tds.net (216.165.129.141), 64 hops max, 40 byte packets
 1  dccore-nsfw02-csresearch1net.uwaterloo.ca (129.97.7.1)  0.201 ms  0.157 ms  0.144 ms
 2  172.19.5.1 (172.19.5.1)  2.151 ms  2.283 ms  1.865 ms
 3  172.19.1.18 (172.19.1.18)  2.327 ms  1.969 ms  1.859 ms
 4  v720-cn-rt-phy.uwaterloo.ca (129.97.1.77)  0.413 ms  0.355 ms  0.346 ms
 5  ext-rt-mc-cn-rt-phy.uwaterloo.ca (129.97.1.10)  0.363 ms  0.343 ms  0.340 ms
 6  te3-5.1220.mpd01.yyz02.atlas.cogentco.com (38.99.202.213)  6.788 ms  6.740 ms  6.821 ms
 7  te8-7.mpd01.ord01.atlas.cogentco.com (154.54.27.249)  22.223 ms te2-2.mpd01.ord01.atlas.cogentco.com (154.54.6.18)  21.847 ms te7-8.mpd01.ord01.atlas.cogent
co.com (154.54.2.161)  21.914 ms
 8  te1-1.mpd01.ord03.atlas.cogentco.com (154.54.2.94)  21.928 ms  22.194 ms  22.007 ms
 9  savvis.ord03.atlas.cogentco.com (154.54.10.246)  22.059 ms  22.039 ms ber1-ge-8-8.chicagoequinix.savvis.net (208.173.176.185)  22.158 ms
10  208.172.13.198 (208.172.13.198)  22.521 ms  22.016 ms  22.170 ms
11  chcgildtcor01-gi3-0-0.network.tds.net (64.50.224.214)  22.084 ms  21.993 ms  22.031 ms
12  mdsnwigjlcr52-gi5-1.network.tds.net (64.50.228.134)  27.899 ms  27.778 ms  27.849 ms
13  mirror3-eth0.mirrors.tds.net (216.165.129.141)  26.820 ms  26.736 ms  26.787 ms
dale# 


>Fix:

>Audit-Trail:
From: Matthias Pfaller <leo@marco.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/42547: cannot establish connections after setting net.inet.tcp.recvspace
 sysctl to 256K
Date: Sun, 03 Jan 2010 20:17:56 +0100

 You have to up kern.sbmax as well or socket buffer allocation will fail.

 Regards, Matthias

From: Constantine Aleksandrovich Murenin <C++@Cns.SU>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, 
	Constantine Aleksandrovich Murenin <C++@Cns.SU>
Subject: Re: kern/42547: cannot establish connections after setting 
	net.inet.tcp.recvspace sysctl to 256K
Date: Sun, 3 Jan 2010 16:23:00 -0500

 2010/1/3 Matthias Pfaller <leo@marco.de>:
 > The following reply was made to PR kern/42547; it has been noted by GNATS=
 .
 >
 > From: Matthias Pfaller <leo@marco.de>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: kern/42547: cannot establish connections after setting net.i=
 net.tcp.recvspace
 > =A0sysctl to 256K
 > Date: Sun, 03 Jan 2010 20:17:56 +0100
 >
 > =A0You have to up kern.sbmax as well or socket buffer allocation will fai=
 l.
 >
 > =A0Regards, Matthias

 But by default sysctl kern.sbmax IS set to 256K (262144), so I think
 setting recvspace to 256K, too, should make things work without
 problems.

 C.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.