We're experiencing the same problems on some machines in our fleet.
Exactly the same symptoms: tcp_fastretrans_alert() warnings and
sometimes panics in tcp_sacktag_walk().
Here is an example of a backtrace with the panic log:
Hi Yuchung!
do you still see the panics if you disable RACK?
sysctl net.ipv4.tcp_recovery=0?
No, we haven't seen any crash since that.
also have you experience any sack reneg? could you post the output of
' nstat |grep -i TCP' thanks
We're experiencing the same problems on some machines in our fleet.
Exactly the same symptoms: tcp_fastretrans_alert() warnings and
sometimes panics in tcp_sacktag_walk().
Here is an example of a backtrace with the panic log:
Hi Yuchung!
quoted
do you still see the panics if you disable RACK?
sysctl net.ipv4.tcp_recovery=0?
No, we haven't seen any crash since that.
I am out of ideas how RACK can potentially cause tcp_sacktag_walk to
take an empty skb :-( Do you have stack trace or any hint on which call
to tcp-sacktag_walk triggered the panic? internally at Google we never
see that.
quoted
also have you experience any sack reneg? could you post the output of
' nstat |grep -i TCP' thanks
We're experiencing the same problems on some machines in our fleet.
Exactly the same symptoms: tcp_fastretrans_alert() warnings and
sometimes panics in tcp_sacktag_walk().
Here is an example of a backtrace with the panic log:
Hi Yuchung!
quoted
do you still see the panics if you disable RACK?
sysctl net.ipv4.tcp_recovery=0?
No, we haven't seen any crash since that.
I am out of ideas how RACK can potentially cause tcp_sacktag_walk to
take an empty skb :-( Do you have stack trace or any hint on which call
to tcp-sacktag_walk triggered the panic? internally at Google we never
see that.
hmm something just struck me: could you try
sysctl net.ipv4.tcp_recovery=1 net.ipv4.tcp_retrans_collapse=0
and see if kernel still panics on sack processing?
quoted
quoted
also have you experience any sack reneg? could you post the output of
' nstat |grep -i TCP' thanks
Hi.
Won't tell about panic in tcp_sacktag_walk() since I cannot trigger it
intentionally, but setting net.ipv4.tcp_retrans_collapse to 0 *does not* fix
warning in tcp_fastretrans_alert() for me.
On středa 27. září 2017 2:18:32 CEST Yuchung Cheng wrote:
On Tue, Sep 26, 2017 at 5:12 PM, Yuchung Cheng [off-list ref] wrote:
quoted
On Tue, Sep 26, 2017 at 6:10 AM, Roman Gushchin [off-list ref] wrote:
quoted
quoted
On Wed, Sep 20, 2017 at 6:46 PM, Roman Gushchin [off-list ref] wrote:
quoted
quoted
Hello.
Since, IIRC, v4.11, there is some regression in TCP stack resulting
in the
warning shown below. Most of the time it is harmless, but rarely it
just
causes either freeze or (I believe, this is related too) panic in
tcp_sacktag_walk() (because sk_buff passed to this function is
NULL).
Unfortunately, I still do not have proper stacktrace from panic, but
will try to capture it if possible.
Also, I have custom settings regarding TCP stack, shown below as
well. ifb is used to shape traffic with tc.
Please note this regression was already reported as BZ [1] and as a
letter to ML [2], but got neither attention nor resolution. It is
reproducible for (not only) me on my home router since v4.11 till
v4.13.1 incl.
Please advise on how to deal with it. I'll provide any additional
info if
necessary, also ready to test patches if any.
Thanks.
[1] https://bugzilla.kernel.org/show_bug.cgi?id=195835
[2]
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.spinics.ne
t_lists_netdev_msg436158.html&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJ
YgtDM7QT-W-Fz_d29HYQ&m=MDDRfLG5DvdOeniMpaZDJI8ulKQ6PQ6OX_1YtRsiTMA&s
=-n3dGZw-pQ95kMBUfq5G9nYZFcuWtbTDlYFkcvQPoKc&e=>>> >
We're experiencing the same problems on some machines in our fleet.
Exactly the same symptoms: tcp_fastretrans_alert() warnings and
sometimes panics in tcp_sacktag_walk().
quoted
quoted
Here is an example of a backtrace with the panic log:
Hi Yuchung!
quoted
do you still see the panics if you disable RACK?
sysctl net.ipv4.tcp_recovery=0?
No, we haven't seen any crash since that.
I am out of ideas how RACK can potentially cause tcp_sacktag_walk to
take an empty skb :-( Do you have stack trace or any hint on which call
to tcp-sacktag_walk triggered the panic? internally at Google we never
see that.
hmm something just struck me: could you try
sysctl net.ipv4.tcp_recovery=1 net.ipv4.tcp_retrans_collapse=0
and see if kernel still panics on sack processing?
quoted
quoted
quoted
also have you experience any sack reneg? could you post the output of
' nstat |grep -i TCP' thanks
On Thu, Sep 28, 2017 at 1:14 AM, Oleksandr Natalenko
[off-list ref] wrote:
Hi.
Won't tell about panic in tcp_sacktag_walk() since I cannot trigger it
intentionally, but setting net.ipv4.tcp_retrans_collapse to 0 *does not* fix
warning in tcp_fastretrans_alert() for me.
Hi Oleksandr: no retrans_collapse should not matter for that warning
in tcp_fstretrans_alert(). the warning as I explained earlier is
likely false. Neal and I are more concerned the panic in
tcp_sacktag_walk. This is just a blind shot but thx for retrying.
We can submit a one-liner to remove the fast retrans warning but want
to nail the bigger issue first.
On středa 27. září 2017 2:18:32 CEST Yuchung Cheng wrote:
quoted
On Tue, Sep 26, 2017 at 5:12 PM, Yuchung Cheng [off-list ref] wrote:
quoted
On Tue, Sep 26, 2017 at 6:10 AM, Roman Gushchin [off-list ref] wrote:
quoted
quoted
On Wed, Sep 20, 2017 at 6:46 PM, Roman Gushchin [off-list ref] wrote:
quoted
quoted
Hello.
Since, IIRC, v4.11, there is some regression in TCP stack resulting
in the
warning shown below. Most of the time it is harmless, but rarely it
just
causes either freeze or (I believe, this is related too) panic in
tcp_sacktag_walk() (because sk_buff passed to this function is
NULL).
Unfortunately, I still do not have proper stacktrace from panic, but
will try to capture it if possible.
Also, I have custom settings regarding TCP stack, shown below as
well. ifb is used to shape traffic with tc.
Please note this regression was already reported as BZ [1] and as a
letter to ML [2], but got neither attention nor resolution. It is
reproducible for (not only) me on my home router since v4.11 till
v4.13.1 incl.
Please advise on how to deal with it. I'll provide any additional
info if
necessary, also ready to test patches if any.
Thanks.
[1] https://bugzilla.kernel.org/show_bug.cgi?id=195835
[2]
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.spinics.ne
t_lists_netdev_msg436158.html&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJ
YgtDM7QT-W-Fz_d29HYQ&m=MDDRfLG5DvdOeniMpaZDJI8ulKQ6PQ6OX_1YtRsiTMA&s
=-n3dGZw-pQ95kMBUfq5G9nYZFcuWtbTDlYFkcvQPoKc&e=>>> >
We're experiencing the same problems on some machines in our fleet.
Exactly the same symptoms: tcp_fastretrans_alert() warnings and
sometimes panics in tcp_sacktag_walk().
quoted
quoted
Here is an example of a backtrace with the panic log:
Hi Yuchung!
quoted
do you still see the panics if you disable RACK?
sysctl net.ipv4.tcp_recovery=0?
No, we haven't seen any crash since that.
I am out of ideas how RACK can potentially cause tcp_sacktag_walk to
take an empty skb :-( Do you have stack trace or any hint on which call
to tcp-sacktag_walk triggered the panic? internally at Google we never
see that.
hmm something just struck me: could you try
sysctl net.ipv4.tcp_recovery=1 net.ipv4.tcp_retrans_collapse=0
and see if kernel still panics on sack processing?
quoted
quoted
quoted
also have you experience any sack reneg? could you post the output of
' nstat |grep -i TCP' thanks
On Thu, Sep 28, 2017 at 04:36:58PM -0700, Yuchung Cheng wrote:
On Thu, Sep 28, 2017 at 1:14 AM, Oleksandr Natalenko
[off-list ref] wrote:
quoted
Hi.
Won't tell about panic in tcp_sacktag_walk() since I cannot trigger it
intentionally, but setting net.ipv4.tcp_retrans_collapse to 0 *does not* fix
warning in tcp_fastretrans_alert() for me.
Hi Oleksandr: no retrans_collapse should not matter for that warning
in tcp_fstretrans_alert(). the warning as I explained earlier is
likely false. Neal and I are more concerned the panic in
tcp_sacktag_walk. This is just a blind shot but thx for retrying.
We can submit a one-liner to remove the fast retrans warning but want
to nail the bigger issue first.
On Wed, Oct 25, 2017 at 7:07 PM, Alexei Starovoitov
[off-list ref] wrote:
On Thu, Sep 28, 2017 at 04:36:58PM -0700, Yuchung Cheng wrote:
quoted
On Thu, Sep 28, 2017 at 1:14 AM, Oleksandr Natalenko
[off-list ref] wrote:
quoted
Hi.
Won't tell about panic in tcp_sacktag_walk() since I cannot trigger it
intentionally, but setting net.ipv4.tcp_retrans_collapse to 0 *does not* fix
warning in tcp_fastretrans_alert() for me.
Hi Oleksandr: no retrans_collapse should not matter for that warning
in tcp_fstretrans_alert(). the warning as I explained earlier is
likely false. Neal and I are more concerned the panic in
tcp_sacktag_walk. This is just a blind shot but thx for retrying.
We can submit a one-liner to remove the fast retrans warning but want
to nail the bigger issue first.
we're still seeing the warnings followed by crashes and it's very concerning.
We hoped that most recent Neal's patches from Sep 18 around this area may
magically fix the issue, but no. The panics are still there.
It's confirmed that net.ipv4.tcp_retrans_collapse=0 does not help
whereas net.ipv4.tcp_recovery=0 works, but obviously undesirable.
We're out of ideas on how to debug this.
Can you try Eric's latest SACK rb-tree patches?
https://patchwork.ozlabs.org/cover/822218/
Roman's SNMP data suggests MTU probing is enabled. Another blind shot
is to disable it.
From: Eric Dumazet <edumazet@google.com> Date: 2017-10-27 20:38:30
On Wed, Oct 25, 2017 at 10:37 PM, Yuchung Cheng [off-list ref] wrote:
On Wed, Oct 25, 2017 at 7:07 PM, Alexei Starovoitov
[off-list ref] wrote:
quoted
On Thu, Sep 28, 2017 at 04:36:58PM -0700, Yuchung Cheng wrote:
quoted
On Thu, Sep 28, 2017 at 1:14 AM, Oleksandr Natalenko
[off-list ref] wrote:
quoted
Hi.
Won't tell about panic in tcp_sacktag_walk() since I cannot trigger it
intentionally, but setting net.ipv4.tcp_retrans_collapse to 0 *does not* fix
warning in tcp_fastretrans_alert() for me.
Hi Oleksandr: no retrans_collapse should not matter for that warning
in tcp_fstretrans_alert(). the warning as I explained earlier is
likely false. Neal and I are more concerned the panic in
tcp_sacktag_walk. This is just a blind shot but thx for retrying.
We can submit a one-liner to remove the fast retrans warning but want
to nail the bigger issue first.
we're still seeing the warnings followed by crashes and it's very concerning.
We hoped that most recent Neal's patches from Sep 18 around this area may
magically fix the issue, but no. The panics are still there.
It's confirmed that net.ipv4.tcp_retrans_collapse=0 does not help
whereas net.ipv4.tcp_recovery=0 works, but obviously undesirable.
We're out of ideas on how to debug this.
Can you try Eric's latest SACK rb-tree patches?
https://patchwork.ozlabs.org/cover/822218/
Roman's SNMP data suggests MTU probing is enabled. Another blind shot
is to disable it.
From: Eric Dumazet <hidden> Date: 2017-10-31 06:08:24
From: Eric Dumazet <edumazet@google.com>
Based on SNMP values provided by Roman, Yuchung made the observation
that some crashes in tcp_sacktag_walk() might be caused by MTU probing.
Looking at tcp_mtu_probe(), I found that when a new skb was placed
in front of the write queue, we were not updating tcp highest sack.
If one skb is freed because all its content was copied to the new skb
(for MTU probing), then tp->highest_sack could point to a now freed skb.
Bad things would then happen, including infinite loops.
This patch renames tcp_highest_sack_combine() and uses it
from tcp_mtu_probe() to fix the bug.
Note that I also removed one test against tp->sacked_out,
since we want to replace tp->highest_sack regardless of whatever
condition, since keeping a stale pointer to freed skb is a recipe
for disaster.
Fixes: a47e5a988a57 ("[TCP]: Convert highest_sack to sk_buff to allow direct access")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Alexei Starovoitov <redacted>
Reported-by: Roman Gushchin <redacted>
Reported-by: Oleksandr Natalenko <redacted>
---
include/net/tcp.h | 6 +++---
net/ipv4/tcp_output.c | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
@@ -1771,12 +1771,12 @@ static inline void tcp_highest_sack_reset(struct sock *sk)tcp_sk(sk)->highest_sack=tcp_write_queue_head(sk);}-/* Called when old skb is about to be deleted (to be combined with new skb) */-staticinlinevoidtcp_highest_sack_combine(structsock*sk,+/* Called when old skb is about to be deleted and replaced by new skb */+staticinlinevoidtcp_highest_sack_replace(structsock*sk,structsk_buff*old,structsk_buff*new){-if(tcp_sk(sk)->sacked_out&&(old==tcp_sk(sk)->highest_sack))+if(old==tcp_highest_sack(sk))tcp_sk(sk)->highest_sack=new;}
On Mon, Oct 30, 2017 at 11:08:20PM -0700, Eric Dumazet wrote:
From: Eric Dumazet <edumazet@google.com>
Based on SNMP values provided by Roman, Yuchung made the observation
that some crashes in tcp_sacktag_walk() might be caused by MTU probing.
Looking at tcp_mtu_probe(), I found that when a new skb was placed
in front of the write queue, we were not updating tcp highest sack.
If one skb is freed because all its content was copied to the new skb
(for MTU probing), then tp->highest_sack could point to a now freed skb.
Bad things would then happen, including infinite loops.
This patch renames tcp_highest_sack_combine() and uses it
from tcp_mtu_probe() to fix the bug.
Note that I also removed one test against tp->sacked_out,
since we want to replace tp->highest_sack regardless of whatever
condition, since keeping a stale pointer to freed skb is a recipe
for disaster.
Fixes: a47e5a988a57 ("[TCP]: Convert highest_sack to sk_buff to allow direct access")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Alexei Starovoitov <redacted>
Reported-by: Roman Gushchin <redacted>
Reported-by: Oleksandr Natalenko <redacted>
Thanks!
Acked-by: Alexei Starovoitov <ast@kernel.org>
wow. a bug from 2007.
Any idea why it only started to bite us in 4.11 ?
It's not trivial for us to reproduce it, but we will definitely
test the patch as soon as we can.
Do you have packet drill test or something for easy repro?
From: Eric Dumazet <hidden> Date: 2017-10-31 06:21:44
On Mon, 2017-10-30 at 23:17 -0700, Alexei Starovoitov wrote:
On Mon, Oct 30, 2017 at 11:08:20PM -0700, Eric Dumazet wrote:
quoted
From: Eric Dumazet <edumazet@google.com>
Based on SNMP values provided by Roman, Yuchung made the observation
that some crashes in tcp_sacktag_walk() might be caused by MTU probing.
Looking at tcp_mtu_probe(), I found that when a new skb was placed
in front of the write queue, we were not updating tcp highest sack.
If one skb is freed because all its content was copied to the new skb
(for MTU probing), then tp->highest_sack could point to a now freed skb.
Bad things would then happen, including infinite loops.
This patch renames tcp_highest_sack_combine() and uses it
from tcp_mtu_probe() to fix the bug.
Note that I also removed one test against tp->sacked_out,
since we want to replace tp->highest_sack regardless of whatever
condition, since keeping a stale pointer to freed skb is a recipe
for disaster.
Fixes: a47e5a988a57 ("[TCP]: Convert highest_sack to sk_buff to allow direct access")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Alexei Starovoitov <redacted>
Reported-by: Roman Gushchin <redacted>
Reported-by: Oleksandr Natalenko <redacted>
Thanks!
Acked-by: Alexei Starovoitov <ast@kernel.org>
wow. a bug from 2007.
Any idea why it only started to bite us in 4.11 ?
It's not trivial for us to reproduce it, but we will definitely
test the patch as soon as we can.
Do you have packet drill test or something for easy repro?
I tried to cook a packetdrill test but could not trigger the issue.
When have you started to enable mtu probing ?
(Linux defaults to not enabling it )
On Mon, Oct 30, 2017 at 11:21:42PM -0700, Eric Dumazet wrote:
On Mon, 2017-10-30 at 23:17 -0700, Alexei Starovoitov wrote:
quoted
On Mon, Oct 30, 2017 at 11:08:20PM -0700, Eric Dumazet wrote:
quoted
From: Eric Dumazet <edumazet@google.com>
Based on SNMP values provided by Roman, Yuchung made the observation
that some crashes in tcp_sacktag_walk() might be caused by MTU probing.
Looking at tcp_mtu_probe(), I found that when a new skb was placed
in front of the write queue, we were not updating tcp highest sack.
If one skb is freed because all its content was copied to the new skb
(for MTU probing), then tp->highest_sack could point to a now freed skb.
Bad things would then happen, including infinite loops.
This patch renames tcp_highest_sack_combine() and uses it
from tcp_mtu_probe() to fix the bug.
Note that I also removed one test against tp->sacked_out,
since we want to replace tp->highest_sack regardless of whatever
condition, since keeping a stale pointer to freed skb is a recipe
for disaster.
Fixes: a47e5a988a57 ("[TCP]: Convert highest_sack to sk_buff to allow direct access")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Alexei Starovoitov <redacted>
Reported-by: Roman Gushchin <redacted>
Reported-by: Oleksandr Natalenko <redacted>
Thanks!
Acked-by: Alexei Starovoitov <ast@kernel.org>
wow. a bug from 2007.
Any idea why it only started to bite us in 4.11 ?
It's not trivial for us to reproduce it, but we will definitely
test the patch as soon as we can.
Do you have packet drill test or something for easy repro?
I tried to cook a packetdrill test but could not trigger the issue.
When have you started to enable mtu probing ?
for some time. somehow 4.6 based kernel didn't trigger it.
May be it's a different bug still...
On Tue, Oct 31, 2017 at 2:08 AM, Eric Dumazet [off-list ref] wrote:
From: Eric Dumazet <edumazet@google.com>
Based on SNMP values provided by Roman, Yuchung made the observation
that some crashes in tcp_sacktag_walk() might be caused by MTU probing.
Looking at tcp_mtu_probe(), I found that when a new skb was placed
in front of the write queue, we were not updating tcp highest sack.
If one skb is freed because all its content was copied to the new skb
(for MTU probing), then tp->highest_sack could point to a now freed skb.
Bad things would then happen, including infinite loops.
This patch renames tcp_highest_sack_combine() and uses it
from tcp_mtu_probe() to fix the bug.
Note that I also removed one test against tp->sacked_out,
since we want to replace tp->highest_sack regardless of whatever
condition, since keeping a stale pointer to freed skb is a recipe
for disaster.
Fixes: a47e5a988a57 ("[TCP]: Convert highest_sack to sk_buff to allow direct access")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Alexei Starovoitov <redacted>
Reported-by: Roman Gushchin <redacted>
Reported-by: Oleksandr Natalenko <redacted>
---
include/net/tcp.h | 6 +++---
net/ipv4/tcp_output.c | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
On Mon, Oct 30, 2017 at 11:17 PM, Alexei Starovoitov
[off-list ref] wrote:
On Mon, Oct 30, 2017 at 11:08:20PM -0700, Eric Dumazet wrote:
quoted
From: Eric Dumazet <edumazet@google.com>
Based on SNMP values provided by Roman, Yuchung made the observation
that some crashes in tcp_sacktag_walk() might be caused by MTU probing.
Looking at tcp_mtu_probe(), I found that when a new skb was placed
in front of the write queue, we were not updating tcp highest sack.
If one skb is freed because all its content was copied to the new skb
(for MTU probing), then tp->highest_sack could point to a now freed skb.
Bad things would then happen, including infinite loops.
This patch renames tcp_highest_sack_combine() and uses it
from tcp_mtu_probe() to fix the bug.
Note that I also removed one test against tp->sacked_out,
since we want to replace tp->highest_sack regardless of whatever
condition, since keeping a stale pointer to freed skb is a recipe
for disaster.
Fixes: a47e5a988a57 ("[TCP]: Convert highest_sack to sk_buff to allow direct access")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Alexei Starovoitov <redacted>
Reported-by: Roman Gushchin <redacted>
Reported-by: Oleksandr Natalenko <redacted>
Thanks!
Acked-by: Alexei Starovoitov <ast@kernel.org>
wow. a bug from 2007.
Any idea why it only started to bite us in 4.11 ?
FWIW some random guess:
Since RACK was confirmed to trigger the issue, and RACK enables
detecting lost retransmission w/o limited-transmit in CA_Loss state, I
guess RACK create a new type of "fast retransmit" that caused some
previously impossible SACK during MTU probing.
Acked-by: Yuchung Cheng <redacted>
It's not trivial for us to reproduce it, but we will definitely
test the patch as soon as we can.
Do you have packet drill test or something for easy repro?
From: David Miller <davem@davemloft.net> Date: 2017-11-01 12:20:22
From: Eric Dumazet <redacted>
Date: Mon, 30 Oct 2017 23:08:20 -0700
From: Eric Dumazet <edumazet@google.com>
Based on SNMP values provided by Roman, Yuchung made the observation
that some crashes in tcp_sacktag_walk() might be caused by MTU probing.
Looking at tcp_mtu_probe(), I found that when a new skb was placed
in front of the write queue, we were not updating tcp highest sack.
If one skb is freed because all its content was copied to the new skb
(for MTU probing), then tp->highest_sack could point to a now freed skb.
Bad things would then happen, including infinite loops.
This patch renames tcp_highest_sack_combine() and uses it
from tcp_mtu_probe() to fix the bug.
Note that I also removed one test against tp->sacked_out,
since we want to replace tp->highest_sack regardless of whatever
condition, since keeping a stale pointer to freed skb is a recipe
for disaster.
Fixes: a47e5a988a57 ("[TCP]: Convert highest_sack to sk_buff to allow direct access")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Alexei Starovoitov <redacted>
Reported-by: Roman Gushchin <redacted>
Reported-by: Oleksandr Natalenko <redacted>
Hi.
Thanks for the fix.
However, tcp_fastretrans_alert() warning case still remains open even with
this patch. Do I understand correctly that these are 2 different issues?
Currently, I use latest 4.13 stable kernel + this patch and still get:
WARNING: CPU: 1 PID: 736 at net/ipv4/tcp_input.c:2826 tcp_fastretrans_alert
+0x7c8/0x990
Any idea on this?
On úterý 31. října 2017 7:08:20 CET Eric Dumazet wrote:
quoted hunk
From: Eric Dumazet <edumazet@google.com>
Based on SNMP values provided by Roman, Yuchung made the observation
that some crashes in tcp_sacktag_walk() might be caused by MTU probing.
Looking at tcp_mtu_probe(), I found that when a new skb was placed
in front of the write queue, we were not updating tcp highest sack.
If one skb is freed because all its content was copied to the new skb
(for MTU probing), then tp->highest_sack could point to a now freed skb.
Bad things would then happen, including infinite loops.
This patch renames tcp_highest_sack_combine() and uses it
from tcp_mtu_probe() to fix the bug.
Note that I also removed one test against tp->sacked_out,
since we want to replace tp->highest_sack regardless of whatever
condition, since keeping a stale pointer to freed skb is a recipe
for disaster.
Fixes: a47e5a988a57 ("[TCP]: Convert highest_sack to sk_buff to allow direct
access") Signed-off-by: Eric Dumazet [off-list ref]
Reported-by: Alexei Starovoitov <redacted>
Reported-by: Roman Gushchin <redacted>
Reported-by: Oleksandr Natalenko <redacted>
---
include/net/tcp.h | 6 +++---
net/ipv4/tcp_output.c | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
sock *sk) tcp_sk(sk)->highest_sack = tcp_write_queue_head(sk);
}
-/* Called when old skb is about to be deleted (to be combined with new skb)
*/ -static inline void tcp_highest_sack_combine(struct sock *sk,
+/* Called when old skb is about to be deleted and replaced by new skb */
+static inline void tcp_highest_sack_replace(struct sock *sk,
struct sk_buff *old,
struct sk_buff *new)
{
- if (tcp_sk(sk)->sacked_out && (old == tcp_sk(sk)->highest_sack))
+ if (old == tcp_highest_sack(sk))
tcp_sk(sk)->highest_sack = new;
}
From: Eric Dumazet <hidden> Date: 2017-11-03 21:31:23
On Fri, 2017-11-03 at 19:22 +0100, Oleksandr Natalenko wrote:
Hi.
Thanks for the fix.
However, tcp_fastretrans_alert() warning case still remains open even with
this patch. Do I understand correctly that these are 2 different issues?
Currently, I use latest 4.13 stable kernel + this patch and still get:
WARNING: CPU: 1 PID: 736 at net/ipv4/tcp_input.c:2826 tcp_fastretrans_alert
+0x7c8/
My patch only fixed the panics that you guys reported.
The warning issue in fastretrans is a separate problem,
we are still working on it, but at least the effects are not
catastrophic.
On Fri, Oct 27, 2017 at 1:38 PM, Eric Dumazet [off-list ref] wrote:
On Wed, Oct 25, 2017 at 10:37 PM, Yuchung Cheng [off-list ref] wrote:
quoted
On Wed, Oct 25, 2017 at 7:07 PM, Alexei Starovoitov
[off-list ref] wrote:
quoted
On Thu, Sep 28, 2017 at 04:36:58PM -0700, Yuchung Cheng wrote:
quoted
On Thu, Sep 28, 2017 at 1:14 AM, Oleksandr Natalenko
[off-list ref] wrote:
quoted
Hi.
Won't tell about panic in tcp_sacktag_walk() since I cannot trigger it
intentionally, but setting net.ipv4.tcp_retrans_collapse to 0 *does not* fix
warning in tcp_fastretrans_alert() for me.
Hi Oleksandr: no retrans_collapse should not matter for that warning
in tcp_fstretrans_alert(). the warning as I explained earlier is
hi guys can you try if the warning goes away w/ this quick fix?
likely false. Neal and I are more concerned the panic in
tcp_sacktag_walk. This is just a blind shot but thx for retrying.
We can submit a one-liner to remove the fast retrans warning but want
to nail the bigger issue first.
we're still seeing the warnings followed by crashes and it's very concerning.
We hoped that most recent Neal's patches from Sep 18 around this area may
magically fix the issue, but no. The panics are still there.
It's confirmed that net.ipv4.tcp_retrans_collapse=0 does not help
whereas net.ipv4.tcp_recovery=0 works, but obviously undesirable.
We're out of ideas on how to debug this.
Can you try Eric's latest SACK rb-tree patches?
https://patchwork.ozlabs.org/cover/822218/
Roman's SNMP data suggests MTU probing is enabled. Another blind shot
is to disable it.
Hi.
I'm running the machine with this patch applied for 7 hours now, and the
warning hasn't appeared yet. Typically, it should be there within the
first hour.
I'll keep an eye on it for a longer time, but as of now it looks good.
Some explanation on this please?
Thanks!
06.11.2017 23:27, Yuchung Cheng wrote:
...snip...
quoted hunk
hi guys can you try if the warning goes away w/ this quick fix?
Hi.
I'm running the machine with this patch applied for 7 hours now, and
the warning hasn't appeared yet. Typically, it should be there within
the first hour.
I'll keep an eye on it for a longer time, but as of now it looks good.
Some explanation on this please?
Thanks!
06.11.2017 23:27, Yuchung Cheng wrote:
...snip...
quoted
hi guys can you try if the warning goes away w/ this quick fix?