two other cases Re: [Bug 11721] after upgrade to 2.6.27 i cannot navigate
Subsystems (3)
just as matter of information, two other cases similar to mine were reported in ubuntu bug pages:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/272896
https://bugs.launchpad.net/ubuntu/+bug/285430
i originated the first one and gave Jarek's first solution:
tcp_sack=0
which worked for the two other users.
maybe they could be contacted in order to perform further tests in a different environment.
aldo
Quoted 5 lines · Aldo Maggi
just as matter of information, two other cases similar to mine were reported in ubuntu bug pages:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/272896
https://bugs.launchpad.net/ubuntu/+bug/285430
i originated the first one and gave Jarek's first solution:
Hmm... let's say you gave my 50% of our first solution...
Jarek P.
Il giorno Tue, 21 Oct 2008 07:20:16 +0000
Jarek Poplawski <[email protected]> ha scritto:
Quoted 10 lines · Aldo Maggi
Quoted 5 lines
just as matter of information, two other cases similar to mine were reported in ubuntu bug pages:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/272896
https://bugs.launchpad.net/ubuntu/+bug/285430
i originated the first one and gave Jarek's first solution:Hmm... let's say you gave my 50% of our first solution...
Jarek P.
ehi jarek! do not be so modest! :-D
i've acted just like a bot! :-D
i didn't have even a clue of the problem! if i gave you ssh access to my lan you would have had the possibility to settle the matter with no my intervention at all!
good day to you all! :-)
aldo
Quoted 10 lines · Aldo Maggi
Il giorno Tue, 21 Oct 2008 07:20:16 +0000 Jarek Poplawski <[email protected]> ha scritto:
Quoted 7 lines · Aldo Maggi
Quoted 5 lines
just as matter of information, two other cases similar to mine were reported in ubuntu bug pages:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/272896
https://bugs.launchpad.net/ubuntu/+bug/285430
i originated the first one and gave Jarek's first solution:
Quoted 7 lines
Quoted 3 lines
Hmm... let's say you gave my 50% of our first solution...
Jarek P.
ehi jarek! do not be so modest! :-D i've acted just like a bot! :-D
i didn't have even a clue of the problem!
You too?...
Quoted 3 lines
if i gave you ssh access to my
lan you would have had the possibility to settle the matter with no my intervention at all!
Why would you want to destroy your lan?
Cheers,
Jarek P.
Ah, I forgot to add bugzilla back last time, so added it there now.
Quoted 10 lines · Aldo Maggi
just as matter of information, two other cases similar to mine were reported in ubuntu bug pages:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/272896
https://bugs.launchpad.net/ubuntu/+bug/285430
i originated the first one and gave Jarek's first solution:
tcp_sack=0
which worked for the two other users.maybe they could be contacted in order to perform further tests in a different environment.
It's hardly surprising that I couldn't reproduce this, the non-compliance here is most probably in isp's device or in some end-user sold embedded device.
Can you try this another debug patch below (on 2.6.27.2 is fine). It moves the mss to the last position but should keep timestamps in place by making wscale as first option. It is well possible that you won't get it working at all except with all ts,sack and wscale set to 0 (the most likely result). Please try with all wscale,sack,ts combinations (no need to provide dumps, just working/not working per case)... This should tell us for quite high certaintity what is the actual option which is causing this (would it not be the mss-at-beginning which is the most likely cause), however, your finding may well be specific to your network while the other people might a bit different results.
In order to provide maximal compatibility, I think we just restore the previous ordering of the fields (basically the first patch you tested). It has no additional cost, so it won't hurt any, but it's quite ridiculous still that some devices care so little about basic tcp spec which has devastating effect on interoperatibility here, they should really fix the devices instead but knowing how little most of the isp & etc. care (or even understand) I'm not expecting too much to happen on that front, and those who care probably run some semi-sane stuff already anyway... :-). ...Sadly, it's much easier and cheaper to blame the end-user's equipment or Linux (if/once it becomes known that it's in use) and do nothing in case one is fool enough to complain to them.
Signature · 4 lines
i. --
net/ipv4/tcp_output.c +11 -11
@@ -376,6 +376,13 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, *md5_hash =NULL ; } +if (unlikely (opts->ws)) { + *ptr++ =htonl ((TCPOPT_NOP <<24 ) | + (TCPOPT_WINDOW <<16 ) | + (TCPOLEN_WINDOW <<8 ) | + opts->ws); + } +if (likely (OPTION_TS & opts->options)) {if (unlikely (OPTION_SACK_ADVERTISE & opts->options)) { *ptr++ = htonl((TCPOPT_SACK_PERM << 24) |
@@ -392,12 +399,6 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, *ptr++ =htonl (opts->tsecr); } -if (unlikely (opts->mss)) { - *ptr++ =htonl ((TCPOPT_MSS <<24 ) | - (TCPOLEN_MSS <<16 ) | - opts->mss); - } -if (unlikely (OPTION_SACK_ADVERTISE & opts->options && !(OPTION_TS & opts->options))) { *ptr++ = htonl((TCPOPT_NOP << 24) |
@@ -406,11 +407,10 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, TCPOLEN_SACK_PERM); } -if (unlikely (opts->ws)) { - *ptr++ =htonl ((TCPOPT_NOP <<24 ) | - (TCPOPT_WINDOW <<16 ) | - (TCPOLEN_WINDOW <<8 ) | - opts->ws); +if (unlikely (opts->mss)) { + *ptr++ =htonl ((TCPOPT_MSS <<24 ) | + (TCPOLEN_MSS <<16 ) | + opts->mss); }if (unlikely (opts->num_sack_blocks)) {
On Tue, Oct 21, 2008 at 12:36:33PM +0300, Ilpo Järvinen wrote:
...
Quoted 9 lines
Can you try this another debug patch below (on 2.6.27.2 is fine). It moves the mss to the last position but should keep timestamps in place by making wscale as first option. It is well possible that you won't get it working at all except with all ts,sack and wscale set to 0 (the most likely result). Please try with all wscale,sack,ts combinations (no need to provide dumps, just working/not working per case)... This should tell us for quite high certaintity what is the actual option which is causing this (would it not be the mss-at-beginning which is the most likely cause), [...]
I'd like to remind it seems to work with only sack off, so mss after ts. If so, my suspicion would be around rfc's/options' dating?
Jarek P.
Quoted 12 lines · Jarek Poplawski
On Tue, Oct 21, 2008 at 12:36:33PM +0300, Ilpo Järvinen wrote:
...Quoted 9 lines
Can you try this another debug patch below (on 2.6.27.2 is fine). It moves the mss to the last position but should keep timestamps in place by making wscale as first option. It is well possible that you won't get it working at all except with all ts,sack and wscale set to 0 (the most likely result). Please try with all wscale,sack,ts combinations (no need to provide dumps, just working/not working per case)... This should tell us for quite high certaintity what is the actual option which is causing this (would it not be the mss-at-beginning which is the most likely cause), [...]
Quoted 2 lines
I'd like to remind it seems to work with only sack off, so mss after ts. If so, my suspicion would be around rfc's/options' dating?
Thanks, I missed that case... there are so many cases already... :-) ...I'm not sure we'll find some very obvious reason for this, rfc dating probably has very little to do here.
I still think that putting an alternative option in front is useful test (though my initial mss-at-beginning thought wasn't bullet-proof) but maybe we could skip all those alternative settings of wscale,sack,ts and have them just all enabled.
Signature · 1 line
i.
Quoted 17 lines · Ilpo Järvinen
Quoted 12 lines · Jarek Poplawski
On Tue, Oct 21, 2008 at 12:36:33PM +0300, Ilpo Järvinen wrote:
...Quoted 9 lines
Can you try this another debug patch below (on 2.6.27.2 is fine). It moves the mss to the last position but should keep timestamps in place by making wscale as first option. It is well possible that you won't get it working at all except with all ts,sack and wscale set to 0 (the most likely result). Please try with all wscale,sack,ts combinations (no need to provide dumps, just working/not working per case)... This should tell us for quite high certaintity what is the actual option which is causing this (would it not be the mss-at-beginning which is the most likely cause), [...]
Quoted 2 lines
I'd like to remind it seems to work with only sack off, so mss after ts. If so, my suspicion would be around rfc's/options' dating?
Quoted 8 lines
Thanks, I missed that case... there are so many cases already... :-) ...I'm not sure we'll find some very obvious reason for this, rfc dating probably has very little to do here.
I still think that putting an alternative option in front is useful test (though my initial mss-at-beginning thought wasn't bullet-proof) but maybe we could skip all those alternative settings of wscale,sack,ts and have them just all enabled.
I agree with you, but when this test with all options enabled fails (?!), IMHO disabling sack only could be enough to get it working again.
Jarek P.
Quoted 22 lines · Jarek Poplawski
Quoted 21 lines · Ilpo Järvinen
Quoted 12 lines · Jarek Poplawski
On Tue, Oct 21, 2008 at 12:36:33PM +0300, Ilpo Järvinen wrote:
...Quoted 9 lines
Can you try this another debug patch below (on 2.6.27.2 is fine). It moves the mss to the last position but should keep timestamps in place by making wscale as first option. It is well possible that you won't get it working at all except with all ts,sack and wscale set to 0 (the most likely result). Please try with all wscale,sack,ts combinations (no need to provide dumps, just working/not working per case)... This should tell us for quite high certaintity what is the actual option which is causing this (would it not be the mss-at-beginning which is the most likely cause), [...]
Quoted 2 lines
I'd like to remind it seems to work with only sack off, so mss after ts. If so, my suspicion would be around rfc's/options' dating?
Thanks, I missed that case... there are so many cases already... :-) ...I'm not sure we'll find some very obvious reason for this, rfc dating probably has very little to do here.
Quoted 8 lines
Quoted 4 lines
I still think that putting an alternative option in front is useful test (though my initial mss-at-beginning thought wasn't bullet-proof) but maybe we could skip all those alternative settings of wscale,sack,ts and have them just all enabled.
I agree with you, but when this test with all options enabled fails (?!), IMHO disabling sack only could be enough to get it working again.
...Yes it should, but we could be all wrong and it just works with them all too :-).
Signature · 1 line
i.
On Tue, Oct 21, 2008 at 03:18:57PM +0300, Ilpo Järvinen wrote:
...
Quoted 2 lines
...Yes it should, but we could be all wrong and it just works with them all too :-).
All execept you! I guess you want it tested because you assume it's possible? (Anyway it would be really funny :-)
Jarek P.
Quoted 7 lines · Jarek Poplawski
On Tue, Oct 21, 2008 at 03:18:57PM +0300, Ilpo Järvinen wrote:
...Quoted 2 lines
...Yes it should, but we could be all wrong and it just works with them all too :-).
All execept you! I guess you want it tested because you assume it's possible? (Anyway it would be really funny :-)
We're dealing with a case with in itself is really funny, yes, I assume it's very much possible though not too likely :-). I'd have very much wanted to test it myself too but sadly my network does not exhibit this corner-case behavior (ie., bug). Whether I'm right or wrong is not that significant for me :-), just understanding what the black-box does (or is fine with) instead of just knowing how to workaround that. Or did I miss another case where the significance of mss specifically being there was decided? :-)
But whatever, if Aldo feels it's waste of his time he can just ignore me... :-)
Signature · 1 line
i.
Il giorno Tue, 21 Oct 2008 17:16:43 +0300 (EEST) "Ilpo Järvinen" <[email protected]> ha scritto:
[...]
Quoted 5 lines
But whatever, if Aldo feels it's waste of his time he can just ignore me... :-)
ARE YOU JOKIIIIING? :-)
i'm only too honoured to cooperate from my very low level with you!
you do not imagine how much i value your commitment for linux! my only dream is to see bloody ms in the dust ... and linux as a winner!
many thanks for your and your collegues work!
aldo
On Tue, Oct 21, 2008 at 05:16:43PM +0300, Ilpo Järvinen wrote:
...
Quoted 11 lines
We're dealing with a case with in itself is really funny, yes, I assume it's very much possible though not too likely :-). I'd have very much wanted to test it myself too but sadly my network does not exhibit this corner-case behavior (ie., bug). Whether I'm right or wrong is not that significant for me :-), just understanding what the black-box does (or is fine with) instead of just knowing how to workaround that. Or did I miss another case where the significance of mss specifically being there was decided? :-)
But whatever, if Aldo feels it's waste of his time he can just ignore me... :-)
Hmm... If by any chance my previous messages caused you think like this, I'm really sorry. I completely agree with the way you deal with this, and I don't pretend I know the result. I still agree there seems to be not much logic in this, so all results are probable, and worth checking - especially when we have such helpful assistant as Aldo.
Thanks,
Jarek P.
Il giorno Tue, 21 Oct 2008 12:36:33 +0300 (EEST) "Ilpo Järvinen" <[email protected]> ha scritto:
[...]
Quoted 12 lines
Can you try this another debug patch below (on 2.6.27.2 is fine). It moves the mss to the last position but should keep timestamps in place by making wscale as first option. It is well possible that you won't get it working at all except with all ts,sack and wscale set to 0 (the most likely result). Please try with all wscale,sack,ts combinations (no need to provide dumps, just working/not working per case)... This should tell us for quite high certaintity what is the actual option which is causing this (would it not be the mss-at-beginning which is the most likely cause), however, your finding may well be specific to your network while the other people might a bit different results.
i've compiled 2.6.27.2 source after having patched it with your today's patch.
it works! i.e. i can navigate (w3m kernel.org) and update (apt-get update)
i send you anyway the usual tcpdump as in previous msgs, should it be of any help.
do you want me to provide some more commands output?
waiting...
aldo
On Tue, Oct 21, 2008 at 08:18:57PM +0200, Aldo Maggi wrote:
...
Quoted 5 lines
i've compiled 2.6.27.2 source after having patched it with your today's patch.
it works! i.e. i can navigate (w3m kernel.org) and update (apt-get update)
Ilpo, I should say you're incredible! ...But, since I've promised to myself not to disturb you anymore (again), I can't do this, sorry :-(
Jarek P.
David Miller
maintainerFrom: Jarek Poplawski <[email protected]>
Date: Tue, 21 Oct 2008 20:45:39 +0200
Quoted 10 lines · Aldo Maggi
...
Quoted 5 lines
i've compiled 2.6.27.2 source after having patched it with your today's patch.
it works! i.e. i can navigate (w3m kernel.org) and update (apt-get update)
Ilpo, I should say you're incredible! ...But, since I've promised to myself not to disturb you anymore (again), I can't do this, sorry :-(
Indeed, excellent work Ilpo.
Ilpo, now that we know this fixes things for sure, could you submit this formally with a proper signoff?
I'll queue it up for -stable too.
Thanks!
Ilpo Järvinen
Tested-by Aldo MaggiQuoted 14 lines · David Miller
From: Jarek Poplawski <[email protected]>
Date: Tue, 21 Oct 2008 20:45:39 +0200Quoted 10 lines · Aldo Maggi
...
Quoted 5 lines
i've compiled 2.6.27.2 source after having patched it with your today's patch.
it works! i.e. i can navigate (w3m kernel.org) and update (apt-get update)
Ilpo, I should say you're incredible! ...But, since I've promised to myself not to disturb you anymore (again), I can't do this, sorry :-(
Quoted 8 lines
Indeed, excellent work Ilpo.
Ilpo, now that we know this fixes things for sure, could you submit this formally with a proper signoff?
I'll queue it up for -stable too.
Thanks!
Sure, here below is one with a warning (it's the first patch + comment).
Olon, can you please check this as well if it affect to your case too (though the symptoms were not that clear in your case).
It would be nice for Aldo to check what the result will be with my second patch (only) using sack=1,ts=0,wscale=0. I guess it does but it's a bit unclear if nop's in front help or not (having the patch below should anyway help also in that case as the mss option gets moved before it anyway).
--
[PATCH] tcp: Restore ordering of TCP options for the sake of inter-operability
This is not our bug! Sadly some devices cannot cope with the change of TCP option ordering which was a result of the recent rewrite of the option code (not that there was some particular reason steming from the rewrite for the reordering) though any ordering of TCP options is perfectly legal. Thus we restore the original ordering to allow interoperability with/through such broken devices and add some warning about this trap. Since the reordering just happened without any particular reason, this change shouldn't cost us anything.
There are already couple of known failure reports (within close proximity of the last release), so the problem might be more wide-spread than a single device. And other reports which may be due to the same problem though the symptoms were less obvious. Analysis of one of the case revealed (with very high probability) that sack capability cannot be negotiated as the first option (SYN never got a response).
--- net/ipv4/tcp_output.c | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-)
net/ipv4/tcp_output.c +17 -6
@@ -362,6 +362,17 @@ struct tcp_out_options {__u32 tsval, tsecr;/* need to include OPTION_TS */ }; +/* Beware: Something in the Internet is very sensitive to the ordering of +* TCP options, we learned this through the hard way, so be careful here. +* Luckily we can at least blame others for their non-compliance but from +* inter-operatibility perspective it seems that we're somewhat stuck with +* the ordering which we have been using if we want to keep working with +* those broken things (not that it currently hurts anybody as there isn't +* particular reason why the ordering would need to be changed). +* +* At least SACK_PERM as the first option is known to lead to a disaster +* (but it may well be that other scenarios fail similarly). +*/ static void tcp_options_write (__be32 *ptr,struct tcp_sock *tp,const struct tcp_out_options *opts,__u8 **md5_hash) {
@@ -376,6 +387,12 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, *md5_hash =NULL ; } +if (unlikely (opts->mss)) { + *ptr++ =htonl ((TCPOPT_MSS <<24 ) | + (TCPOLEN_MSS <<16 ) | + opts->mss); + } +if (likely (OPTION_TS & opts->options)) {if (unlikely (OPTION_SACK_ADVERTISE & opts->options)) { *ptr++ = htonl((TCPOPT_SACK_PERM << 24) |
@@ -392,12 +409,6 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp, *ptr++ =htonl (opts->tsecr); } -if (unlikely (opts->mss)) { - *ptr++ =htonl ((TCPOPT_MSS <<24 ) | - (TCPOLEN_MSS <<16 ) | - opts->mss); - } -if (unlikely (OPTION_SACK_ADVERTISE & opts->options && !(OPTION_TS & opts->options))) { *ptr++ = htonl((TCPOPT_NOP << 24) |
Signature · 1 line
1.5.2.2
Il giorno Wed, 22 Oct 2008 13:00:01 +0300 (EEST) "Ilpo Järvinen" <[email protected]> ha scritto:
[...]
Quoted 6 lines
It would be nice for Aldo to check what the result will be with my second patch (only) using sack=1,ts=0,wscale=0. I guess it does but it's a bit unclear if nop's in front help or not (having the patch below should anyway help also in that case as the mss option gets moved before it anyway).
in order to avoid misunderstandings, i list herebelow my actions:
i've used on paperino the kernel 2.6.27.2 patched with ilpo's 21.10.2008 patch (see please comment 47 in
http://bugzilla.kernel.org/show_bug.cgi?id=11721, and NOT with the patch contained in comment 58, right?)
i've modified the following files:
echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
echo 0 > /proc/sys/net/ipv4/tcp_timestamps
echo 1 > /proc/sys/net/ipv4/tcp_sack
the results are that i CAN navigate (w3m kernel.org) and update my system (apt-get update in debian).
should it be of any help to ilpo, i attach the usual tcpdump on the wan eth of topolino (my home server/gw)
ciao!
aldo
[...]
Quoted 12 lines · Aldo Maggi
Il giorno Wed, 22 Oct 2008 13:00:01 +0300 (EEST) "Ilpo J�rvinen" <[email protected]> ha scritto:
[...]
Quoted 6 lines
It would be nice for Aldo to check what the result will be with my second patch (only) using sack=1,ts=0,wscale=0. I guess it does but it's a bit unclear if nop's in front help or not (having the patch below should anyway help also in that case as the mss option gets moved before it anyway).
Quoted 6 lines
in order to avoid misunderstandings, i list herebelow my actions:
i've used on paperino the kernel 2.6.27.2 patched with ilpo's 21.10.2008 patch (see please comment 47 in
http://bugzilla.kernel.org/show_bug.cgi?id=11721, and NOT with the patch contained in comment 58, right?)
Yes, you understood me correctly. This was more or less for completeleness test only, to see if the nop's make any difference or not. You found out that they do which seemed the more sensible alternative anyway.
Quoted 10 lines
i've modified the following files:
echo 0 >/proc/sys/net/ipv4/tcp_window_scaling
echo 0 >/proc/sys/net/ipv4/tcp_timestamps
echo 1 >/proc/sys/net/ipv4/tcp_sackthe results are that i CAN navigate (w3m kernel.org) and update my system (apt-get update in debian).
should it be of any help to ilpo, i attach the usual tcpdump on the wan eth of topolino (my home server/gw)
...It confirms that you made the right test. :-)
So only thing that was problem in your case is that sackOK option (or SACK_PERM in code notation) couldn't begin TCP options. With any other option as the first one, including nop, it does work. Thanks for all the testing you made and reporting it in the first place.
We'll put the latest patch (from comment #58) and it soon makes to 2.6.28-rcsomething and hopefully with a semi-short delay to some 2.6.27.y, whichever y is appropriate at that time. I hope that the ubuntu kernel people will then include that as well but it's beoynd my control what they do.
Thanks again.
Signature · 1 line
i.
Il giorno Wed, 22 Oct 2008 15:09:40 +0300 (EEST) "Ilpo Järvinen" <[email protected]> ha scritto:
[...]
Quoted 4 lines
So only thing that was problem in your case is that sackOK option (or
SACK_PERMin code notation) couldn't begin TCP options. With any other option as the first one, including nop, it does work. Thanks for all the testing you made and reporting it in the first place.
i thank you for your efforts in solving this problem! it has been a real pleasere for me to cooperate with you!
all the best to you all
[...]
Quoted 2 lines
Thanks again.
i thank you! :-)
aldo
David Miller
maintainerFrom: "Ilpo Järvinen" <[email protected]>
Date: Wed, 22 Oct 2008 13:00:01 +0300 (EEST)
Quoted 20 lines
[PATCH] tcp: Restore ordering of TCP options for the sake of inter-operability
This is not our bug! Sadly some devices cannot cope with the change of TCP option ordering which was a result of the recent rewrite of the option code (not that there was some particular reason steming from the rewrite for the reordering) though any ordering of TCP options is perfectly legal. Thus we restore the original ordering to allow interoperability with/through such broken devices and add some warning about this trap. Since the reordering just happened without any particular reason, this change shouldn't cost us anything.
There are already couple of known failure reports (within close proximity of the last release), so the problem might be more wide-spread than a single device. And other reports which may be due to the same problem though the symptoms were less obvious. Analysis of one of the case revealed (with very high probability) that sack capability cannot be negotiated as the first option (SYN never got a response).
Quoted 3 lines
Signed-off-by Ilpo Järvinen <[email protected]>Reported-by Aldo Maggi <[email protected]>Tested-by Aldo Maggi <[email protected]>
Applied and I'll queue up for -stable, thanks!
Re: tcp_sack problem Re: [Bug 11721] after upgrade to 2.6.27 i cannot navigate
In reply to Aldo MaggiQuoted 7 lines · Aldo Maggi
Il giorno Tue, 21 Oct 2008 07:49:54 +0000
Jarek Poplawski <[email protected]> ha scritto:Quoted 3 lines · Aldo Maggi
...
Quoted 1 line
as soon as i've time i'll replace the modem and run some tests.
Quoted 8 lines
just to let you know!
i have changed my modem with a new one.
the bug has disappeared with no modification of the tcp files. this shows that the problem was due to my old zyxel.ciao!
aldo
Aldo, I think it's a very useful information, so I forward this to the people.
Thanks again,
Jarek P.