Debian Bug report logs - #401435
debian-installer: sometimes net install does not work because of networking change in Linux 2.6.17 or later

version graph

Package: debian-installer; Maintainer for debian-installer is Debian Install System Team <debian-boot@lists.debian.org>; Source for debian-installer is src:debian-installer.

Reported by: Santiago Vila <sanvila@unex.es>

Date: Sun, 3 Dec 2006 14:33:02 UTC

Severity: important

Found in version debian-installer/20061102

Done: Christian PERRIER <bubulle@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, sanvila@unex.es, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#401435; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Santiago Vila <sanvila@unex.es>:
New Bug report received and forwarded. Copy sent to sanvila@unex.es, Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@unex.es>
To: submit@bugs.debian.org
Subject: debian-installer: sometimes net install does not work because of networking change in Linux 2.6.17 or later
Date: Sun, 3 Dec 2006 15:14:02 +0100 (CET)
Package: debian-installer
Version: 20061102
Severity: important

This is really a feature more than a bug, but the adverse effects are
so devastating that it would be nice to have a workaround in
debian-installer, or have it properly documented in the install manual.

It seems there is a buggy router between me and the Internet. As a result,
apt-get does not work at all (it hangs, waiting for who knows what).
Needless to say, this is very bad if one wants to install Debian via
the Internet.

I found a thread in the linux kernel mailing list which explains
*exactly* my problem:

http://www.gatago.com/linux/kernel/9440712.html

Short summary: A change introduced in Linux 2.6.17 makes the network
not to work properly in some cases, due to buggy routers.

There is a trivial workaround:

echo 0 > /proc/sys/net/ipv4/tcp_window_scaling

However, I had to spend several afternoons to *diagnose* this problem
and realize what exactly the nature of the problem was.

Considering that the number of systems potentially affected is very big,
it would be nice if this were at least documented somewhere.

Thanks.



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#401435; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Josip Rodin <joy@entuzijast.net>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #10 received at 401435@bugs.debian.org (full text, mbox):

From: Josip Rodin <joy@entuzijast.net>
To: 401435@bugs.debian.org, Santiago Vila <sanvila@unex.es>
Subject: Re: debian-installer: sometimes net install does not work because of networking change in Linux 2.6.17 or later
Date: Tue, 20 Mar 2007 15:50:00 +0100
On Sun, Dec 03, 2006 at 03:14:02PM +0100, Santiago Vila wrote:
> Short summary: A change introduced in Linux 2.6.17 makes the network
> not to work properly in some cases, due to buggy routers.
> 
> There is a trivial workaround:
> 
> echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
> 
> However, I had to spend several afternoons to *diagnose* this problem
> and realize what exactly the nature of the problem was.

I saw this linked from the d-i web page, so I feel I should point out a bit
of an injustice - that workaround is way too severe, as it kills off TCP
window scaling altogether.

TCP window scaling as such was by default enabled in earlier Linux kernel
versions, too, but the default window *sizes* were different, much smaller.
These are set in the tcp_rmem/tcp_wmem pseudo-files in the same directory;
you could just run something like

echo 4096 65536 65536 > /proc/sys/net/ipv4/tcp_rmem

to reset them to values supported by just about anything.

-- 
     2. That which causes joy or happiness.



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#401435; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Frans Pop <elendil@planet.nl>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #15 received at 401435@bugs.debian.org (full text, mbox):

From: Frans Pop <elendil@planet.nl>
To: Josip Rodin <joy@entuzijast.net>, 401435@bugs.debian.org
Subject: Re: Bug#401435: debian-installer: sometimes net install does not work because of networking change in Linux 2.6.17 or later
Date: Sun, 01 Apr 2007 09:30:16 +0200
[Message part 1 (text/plain, inline)]
On Tuesday 20 March 2007 15:50, Josip Rodin wrote:
> TCP window scaling as such was by default enabled in earlier Linux
> kernel versions, too, but the default window *sizes* were different,
> much smaller. These are set in the tcp_rmem/tcp_wmem pseudo-files in
> the same directory; you could just run something like
>
> echo 4096 65536 65536 > /proc/sys/net/ipv4/tcp_rmem
>
> to reset them to values supported by just about anything.

I'm willing to add that info, especially for the installed system. Do 
values in tcp_wmem also need to be modified or is modifying tcp_rmem 
sufficient? What's the difference between the two?
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#401435; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Josip Rodin <joy@debbugs.entuzijast.net>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #20 received at 401435@bugs.debian.org (full text, mbox):

From: Josip Rodin <joy@debbugs.entuzijast.net>
To: Frans Pop <elendil@planet.nl>
Cc: 401435@bugs.debian.org
Subject: Re: Bug#401435: debian-installer: sometimes net install does not work because of networking change in Linux 2.6.17 or later
Date: Sun, 1 Apr 2007 15:20:31 +0200
On Sun, Apr 01, 2007 at 09:30:16AM +0200, Frans Pop wrote:
> > TCP window scaling as such was by default enabled in earlier Linux
> > kernel versions, too, but the default window *sizes* were different,
> > much smaller. These are set in the tcp_rmem/tcp_wmem pseudo-files in
> > the same directory; you could just run something like
> >
> > echo 4096 65536 65536 > /proc/sys/net/ipv4/tcp_rmem
> >
> > to reset them to values supported by just about anything.
> 
> I'm willing to add that info, especially for the installed system. Do 
> values in tcp_wmem also need to be modified or is modifying tcp_rmem 
> sufficient? What's the difference between the two?

The r stands for read, w stands for write. tcp_rmem affects the downloads,
tcp_wmem affects the uploads.

I'm not sure how the broken routers react, but I'd guess that the tcp_rmem
is the culprit because most non-advanced users do more download than upload.

The first value in those files is the minimum window size, the middle is the
default, and the third value is the maximum. TCP window size can (and
should) be stretched as allowed by the hardware; if you enlarge it, you make
more bytes go through the pipe in the same time intervals, so you need to
have CPU power to process it and memory to hold it. And so do all hops on
the packet path (routers and switches alike).

The thing that happened was that the kernel developers got tired of the
years-old fixated default maximum, and made it vary according to local
hardware parameters.

Here's an example default from a 2.4.31 machine:

% cat /proc/sys/net/ipv4/tcp_{r,w}mem
4096    87380   174760
4096    16384   131072

(You can see there how killing off TCP window scaling altogether would have
been a bad idea - no packets would have been allowed to grow even a little
bit past the default size, as they were allowed in the old kernel versions,
even if by a fairly small amount.)

Here's an example default from a 2.6.18 on a machine with 384 MB RAM:

% cat /proc/sys/net/ipv4/tcp_{r,w}mem
4096    87380   524288
4096    16384   524288

And here's an example default from a 2.6.18 on a 2 GB RAM machine:

% cat /proc/sys/net/ipv4/tcp_{r,w}mem
4096    87380   4194304
4096    16384   4194304

I never checked exactly what the parameters for this new variation are,
but AFAIR RAM size is one of them.

This worked out well for the vast majority of people, but as always, there
are machines that don't follow protocols and can't handle these variations.
This is somewhat similar to the TCP ECN situation; Linux kernel using
features and finding a few bumps in the wild.

-- 
     2. That which causes joy or happiness.



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#401435; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Frans Pop <elendil@planet.nl>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #25 received at 401435@bugs.debian.org (full text, mbox):

From: Frans Pop <elendil@planet.nl>
To: 401435@bugs.debian.org
Cc: Josip Rodin <joy@debbugs.entuzijast.net>
Subject: Re: Bug#401435: debian-installer: sometimes net install does not work because of networking change in Linux 2.6.17 or later
Date: Tue, 03 Apr 2007 00:44:15 +0200
On Sunday 01 April 2007 15:20, Josip Rodin wrote:
> > I'm willing to add that info, especially for the installed system. Do
> > values in tcp_wmem also need to be modified or is modifying tcp_rmem
> > sufficient? What's the difference between the two?
>
> The r stands for read, w stands for write. tcp_rmem affects the
> downloads, tcp_wmem affects the uploads.

Thanks a lot for the additional info. I've just updated the errata to 
include the values you suggested.



Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#401435; Package debian-installer. Full text and rfc822 format available.

Acknowledgement sent to Pierre THIERRY <nowhere.man@levallois.eu.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. Full text and rfc822 format available.

Message #30 received at 401435@bugs.debian.org (full text, mbox):

From: Pierre THIERRY <nowhere.man@levallois.eu.org>
To: 401435@bugs.debian.org
Subject: Persistent workaround
Date: Tue, 17 Apr 2007 00:48:25 +0200
[Message part 1 (text/plain, inline)]
Writing in /proc will not persist reboot, so the bug may well hit the
user after installation again, for any network activity.

Taking the suggested values, here should be the "fix" for the installed
system to be able to do TCP networking:

# cat <<EOF >> /etc/sysctl.conf
net.ipv4.tcp_rmem = 4096 65536 65536
net.ipv4.tcp_wmem = 4096 65536 65536
EOF

Repeatedly,
Pierre
-- 
nowhere.man@levallois.eu.org
OpenPGP 0xD9D50D8A
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#401435; Package debian-installer. (Sun, 05 Sep 2010 21:18:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Miguel Figueiredo <elmig@debianpt.org>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 05 Sep 2010 21:18:06 GMT) Full text and rfc822 format available.

Message #35 received at 401435@bugs.debian.org (full text, mbox):

From: Miguel Figueiredo <elmig@debianpt.org>
To: 401435@bugs.debian.org
Subject: already added to the errata
Date: Sun, 05 Sep 2010 22:07:37 +0100
According message #25 in 2007 info was added to the errata with a fix to
improve behaviour with broken routers.

Can this bug be closed?

-- 

Melhores cumprimentos/Best regards,

Miguel Figueiredo
http://www.DebianPT.org




Reply sent to Christian PERRIER <bubulle@debian.org>:
You have taken responsibility. (Mon, 06 Sep 2010 07:09:10 GMT) Full text and rfc822 format available.

Notification sent to Santiago Vila <sanvila@unex.es>:
Bug acknowledged by developer. (Mon, 06 Sep 2010 07:09:10 GMT) Full text and rfc822 format available.

Message #40 received at 401435-done@bugs.debian.org (full text, mbox):

From: Christian PERRIER <bubulle@debian.org>
To: Miguel Figueiredo <elmig@debianpt.org>, 401435-done@bugs.debian.org
Subject: Re: Bug#401435: already added to the errata
Date: Mon, 6 Sep 2010 06:41:10 +0200
[Message part 1 (text/plain, inline)]
Quoting Miguel Figueiredo (elmig@debianpt.org):
> According message #25 in 2007 info was added to the errata with a fix to
> improve behaviour with broken routers.
> 
> Can this bug be closed?


Just Do It, IMHO.

I very much doubt anybody triple checks: you went on this bug, you
analyzed it, you found it could be closed...then just close it..:-)

And to show you that I have an entire confidence in your judgement, I
close it now.


[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 04 Oct 2010 07:33:41 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 11:01:30 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.