Skip to contentSkip to conversation

mpd client timeouts (bisected) 2.6.35-rc3

DISCUSSION Applied Markus Trippelsdorf 8 participants 13 messages Jun 12, 2010 – Jun 17, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Commit 597a264b1a9c7e36d1728f677c66c5c1f7e3b837:
»net: deliver skbs on inactive slaves to exact matches«

causes large timeouts when mpd clients try to connect to a locally running mpd (music player demon) on my machine. This makes it impossible to control mpd.

I bisected this down to the commit mentioned above. Reverting the commit from 2.6.35-rc3 also solves the problem.

Signature · 1 line
Markus
maintainer
#1 lore raw

From: Markus Trippelsdorf <[email protected]>
Date: Sat, 12 Jun 2010 12:28:02 +0200

Quoted 9 lines

Commit 597a264b1a9c7e36d1728f677c66c5c1f7e3b837:
»net: deliver skbs on inactive slaves to exact matches«

causes large timeouts when mpd clients try to connect to a locally running mpd (music player demon) on my machine. This makes it impossible to control mpd.

I bisected this down to the commit mentioned above. Reverting the commit from 2.6.35-rc3 also solves the problem.

John, find an easy and fast way to fix this or else I am going to revert.

Thanks.

#2 lore raw
Quoted 9 lines · David Miller

From: Markus Trippelsdorf <[email protected]>
Date: Sat, 12 Jun 2010 12:28:02 +0200

Quoted 6 lines

Commit 597a264b1a9c7e36d1728f677c66c5c1f7e3b837:
»net: deliver skbs on inactive slaves to exact matches«

causes large timeouts when mpd clients try to connect to a locally
running mpd (music player demon) on my machine. This makes it impossible to control mpd.

Quoted 7 lines
Quoted 2 lines

I bisected this down to the commit mentioned above. Reverting the commit from 2.6.35-rc3 also solves the problem.

John, find an easy and fast way to fix this or else I am going to revert.

Thanks.

Looks like skbs are hitting loopback_xmit() with deliver_no_wcard set. Then in the receive path these skbs are only delivered to exact matches. Not sure why this bit is set here, I'll track this down first thing tomorrow.

Thanks,
John.

#3 lore raw
Quoted 15 lines · John Fastabend
Quoted 14 lines · David Miller

From: Markus Trippelsdorf <[email protected]>
Date: Sat, 12 Jun 2010 12:28:02 +0200

Quoted 8 lines

Commit 597a264b1a9c7e36d1728f677c66c5c1f7e3b837:
»net: deliver skbs on inactive slaves to exact matches«

causes large timeouts when mpd clients try to connect to a locally
running mpd (music player demon) on my machine. This makes it impossible to control mpd.

I bisected this down to the commit mentioned above. Reverting the commit from 2.6.35-rc3 also solves the problem.

John, find an easy and fast way to fix this or else I am going to revert.

Quoted 7 lines
Quoted 1 line

Thanks.

Looks like skbs are hitting loopback_xmit() with deliver_no_wcard set. Then in the receive path these skbs are only delivered to exact matches. Not sure why this bit is set here, I'll track this down first thing tomorrow.

Thanks,
John.
--

Needed to set the wcard bit in copy_skb_header otherwise it will not be cleared when called from skb_clone. Which then hits the loopback device gets pushed into the rx path and is eventually dropped. The following patch fixes this. Hopefully, this is easy and fast enough for you Dave.

[PATCH] net: fix deliver_no_wcard regression on loopback device

deliver_no_wcard is not being set in skb_copy_header. In the skb_cloned case it is not being cleared and may cause the skb to be dropped when the loopback device pushes it back up the stack.

---

 net/core/skbuff.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
net/core/skbuff.c +1 -0
index 9f07e74..bcf2fa3 100644
@@ -532,6 +532,7 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
 	new->ip_summed		= old->ip_summed;
 	skb_copy_queue_mapping(new, old);
 	new->priority		= old->priority;
+	new->deliver_no_wcard	= old->deliver_no_wcard;
 #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
 	new->ipvs_property	= old->ipvs_property;
 #endif
Acked-by
#4 lore raw
Quoted 58 lines · John Fastabend
Quoted 18 lines · John Fastabend
Quoted 10 lines · David Miller

From: Markus Trippelsdorf <[email protected]>
Date: Sat, 12 Jun 2010 12:28:02 +0200

Quoted 7 lines

Commit 597a264b1a9c7e36d1728f677c66c5c1f7e3b837:
»net: deliver skbs on inactive slaves to exact matches«

causes large timeouts when mpd clients try to connect to a locally running mpd (music player demon) on my machine. This makes it impossible to control mpd.

Quoted 6 lines
Quoted 2 lines

I bisected this down to the commit mentioned above. Reverting the commit from 2.6.35-rc3 also solves the problem.

John, find an easy and fast way to fix this or else I am going to revert.

Thanks.

Quoted 7 lines

Looks like skbs are hitting loopback_xmit() with deliver_no_wcard set. Then in the receive path these skbs are only delivered to exact matches. Not sure why this bit is set here, I'll track this down first thing tomorrow.

Thanks,
John.
--

Needed to set the wcard bit in copy_skb_header otherwise it will not be cleared when called from skb_clone. Which then hits the loopback device gets pushed into the rx path and is eventually dropped. The following patch fixes this. Hopefully, this is easy and fast enough for you Dave.

[PATCH] net: fix deliver_no_wcard regression on loopback device

deliver_no_wcard is not being set in skb_copy_header. In the skb_cloned case it is not being cleared and may cause the skb to be dropped when the loopback device pushes it back up the stack.

---

  net/core/skbuff.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
net/core/skbuff.c +1 -0
index 9f07e74..bcf2fa3 100644
@@ -532,6 +532,7 @@ static void __copy_skb_header(struct sk_buff *new, const 
 struct sk_buff *old)
  	new->ip_summed		= old->ip_summed;
  	skb_copy_queue_mapping(new, old);
  	new->priority		= old->priority;
+	new->deliver_no_wcard	= old->deliver_no_wcard;
  #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
  	new->ipvs_property	= old->ipvs_property;
Quoted 2 lines

#endif
--

BTW, David, it seems there is a double rxhash copy...

[PATCH] net: rxhash already set in __copy_skb_header

No need to copy rxhash again in __skb_clone()

---

net/core/skbuff.c +0 -1
index 9f07e74..a58e63b 100644
@@ -569,7 +569,6 @@ static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff *skb)
 	C(len);
 	C(data_len);
 	C(mac_len);
-	C(rxhash);
 	n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len;
 	n->cloned = 1;
 	n->nohdr = 0;
author Tested-by
#6 lore raw
In reply to John Fastabend
Quoted 28 lines · John Fastabend
Quoted 18 lines · John Fastabend
Quoted 10 lines · David Miller

From: Markus Trippelsdorf <[email protected]>
Date: Sat, 12 Jun 2010 12:28:02 +0200

Quoted 7 lines

Commit 597a264b1a9c7e36d1728f677c66c5c1f7e3b837:
»net: deliver skbs on inactive slaves to exact matches«

causes large timeouts when mpd clients try to connect to a locally running mpd (music player demon) on my machine. This makes it impossible to control mpd.

Quoted 6 lines
Quoted 2 lines

I bisected this down to the commit mentioned above. Reverting the commit from 2.6.35-rc3 also solves the problem.

John, find an easy and fast way to fix this or else I am going to revert.

Thanks.

Quoted 8 lines

Looks like skbs are hitting loopback_xmit() with deliver_no_wcard set. Then in the receive path these skbs are only delivered to exact matches. Not sure why this bit is set here, I'll track this down first thing tomorrow.

Thanks,
John.
--

Quoted 8 lines

Needed to set the wcard bit in copy_skb_header otherwise it will not be cleared when called from skb_clone. Which then hits the loopback device gets pushed into the rx path and is eventually dropped. The following patch fixes this. Hopefully, this is easy and fast enough for you Dave.

[PATCH] net: fix deliver_no_wcard regression on loopback device

This solves the problem here. Thanks.

Signature · 1 line
Markus
maintainer Applied
#10 lore raw
In reply to John Fastabend

From: John Fastabend <[email protected]>
Date: Sun, 13 Jun 2010 13:36:30 -0700

Quoted 7 lines

Needed to set the wcard bit in copy_skb_header otherwise it will not be cleared when called from skb_clone. Which then hits the loopback device gets pushed into the rx path and is eventually dropped. The following patch fixes this. Hopefully, this is easy and fast enough for you Dave.

Quoted 8 lines

[PATCH] net: fix deliver_no_wcard regression on loopback device

deliver_no_wcard is not being set in skb_copy_header. In the skb_cloned case it is not being cleared and may cause the skb to be dropped when the loopback device pushes it back up the stack.

Applied, but your email client corrupted this patch in many ways. Please correct this for next time, thanks.

maintainer
#5 lore raw
In reply to Eric Dumazet

From: Eric Dumazet <[email protected]>
Date: Sun, 13 Jun 2010 22:50:46 +0200

Quoted 1 line

Eric, please never ACK a patch in the same mail in which you are posting new patch. Patchwork won't add your ACK to the patchwork entry you are ACK'ing because all of your text will go into a new patchwork entry for the patch you are posting.

Quoted 7 lines

BTW, David, it seems there is a double rxhash copy...

[PATCH] net: rxhash already set in __copy_skb_header

No need to copy rxhash again in __skb_clone()

I'll apply this, thanks.

#11 lore raw
In reply to David Miller
Quoted 17 lines · David Miller

From: John Fastabend <[email protected]>
Date: Sun, 13 Jun 2010 13:36:30 -0700

Quoted 14 lines

Needed to set the wcard bit in copy_skb_header otherwise it will not be cleared when called from skb_clone. Which then hits the loopback device gets pushed into the rx path and is eventually dropped. The following patch fixes this. Hopefully, this is easy and fast enough for you Dave.

[PATCH] net: fix deliver_no_wcard regression on loopback device

deliver_no_wcard is not being set in skb_copy_header. In the skb_cloned case it is not being cleared and may cause the skb to be dropped when the loopback device pushes it back up the stack.

Quoted 4 lines
Quoted 1 line

Applied, but your email client corrupted this patch in many ways. Please correct this for next time, thanks.

FWIW:

Signature · 1 line
MST
#8 lore raw
In reply to [email protected]
Quoted 1 line · On Sun, 13 Jun 2010 at 22:59, [email protected] wrote:

This solves the problem here. Thanks.

Not sure if this is related, but I've noticed connection timeouts and connections going in FIN_WAIT2 state (most of them SSH tunnels) with 2.6.35. Going back to 2.6.34 or applying John's (and Eric's) patch does seem to fix this issue.

Thanks,
Christian.

Signature · 3 lines
BOFH excuse #168:

le0: no carrier: transceiver cable problem?
Tested-by
#12 lore raw
In reply to John Fastabend

It fixed the aim7/specjbb2005 issues!

Regards!
Alex

Quoted 33 lines

Needed to set the wcard bit in copy_skb_header otherwise it will not be cleared when called from skb_clone. Which then hits the loopback device gets pushed into the rx path and is eventually dropped. The following patch fixes this. Hopefully, this is easy and fast enough for you Dave.

[PATCH] net: fix deliver_no_wcard regression on loopback device

deliver_no_wcard is not being set in skb_copy_header. In the skb_cloned case it is not being cleared and may cause the skb to be dropped when the loopback device pushes it back up the stack.

---

 net/core/skbuff.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
net/core/skbuff.c +1 -0
index 9f07e74..bcf2fa3 100644
@@ -532,6 +532,7 @@ static void __copy_skb_header(struct sk_buff *new, const
 struct sk_buff *old)
 	new->ip_summed		= old->ip_summed;
 	skb_copy_queue_mapping(new, old);
 	new->priority		= old->priority;
+	new->deliver_no_wcard	= old->deliver_no_wcard;
 #if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
 	new->ipvs_property	= old->ipvs_property;

#endif