From: Sander Eikelenboom Subject: Re: [Linux 3.7-rc8] DomU: WARNING: at net/core/skbuff.c:3444 skb_try_coalesce+0x359/0x390() Date: Mon, 10 Dec 2012 16:03:32 +0100 Message-ID: <101480918.20121210160332@eikelenboom.it> References: <1259250907.20121208211402@eikelenboom.it> <50C4A8FD.5070407@oracle.com> <341064135.20121209223602@eikelenboom.it> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <341064135.20121209223602@eikelenboom.it> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Konrad Rzeszutek Wilk , annie li , Eric Dumazet , xen-devel List-Id: xen-devel@lists.xenproject.org Sunday, December 9, 2012, 10:36:02 PM, you wrote: > Sunday, December 9, 2012, 4:06:37 PM, you wrote: >> Hi Ian, >> I guess this issue is similar with this one >> http://comments.gmane.org/gmane.linux.network/236358. And netfront also >> needs to reserve some tail room for IP/TCP headers too? > Hi Annie, > Thanks for digging this up ! > That looks indeed remarkable similar. It's probably revealed by the other netfront/netback changes in 3.7, because i have never seen it before. > It also seems to take some time before it gets triggered. > Only the code in netfront.c is that much different, i don't think i'm able to determine the proper size and suggest a fix. Hi Ian, > Why is this being discussed in private mail? Please can you resend to > xen-devel and/or netdev. Sorry i missed the CC to xen-devel on the first post, wasn't meant to be private in any way. > I have a vague recollection of a patch to set skb->truesize more > accurately in xennet_poll (netfront), but I can't seem to find any > reference to it now. I tried to gain some extra info from net/core/skbuff.c around the warn. diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 3f0636c..a7831b7 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -3442,6 +3442,10 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, } WARN_ON_ONCE(delta < len); + if(delta < len){ + net_warn_ratelimited("netfront: WARN delta(%d) < len(%d) truesize(%d) SKB_DATA_ALIGN(%d) SKB_TRUESIZE(%d) \n", + delta,len,from->truesize,SKB_DATA_ALIGN(sizeof(struct sk_buff)),SKB_TRUESIZE(skb_end_offset(from))); + } memcpy(skb_shinfo(to)->frags + skb_shinfo(to)->nr_frags, skb_shinfo(from)->frags, This results in: [ 5557.333423] ------------[ cut here ]------------ [ 5557.333471] WARNING: at net/core/skbuff.c:3444 skb_try_coalesce+0x355/0x3d0() [ 5557.333495] Modules linked in: [ 5557.333519] Pid: 1872, comm: apache2 Not tainted 3.7.0-rc8-20121209-netdebug #1 [ 5557.333543] Call Trace: [ 5557.333556] [] warn_slowpath_common+0x7a/0xb0 [ 5557.333598] [] warn_slowpath_null+0x15/0x20 [ 5557.333621] [] skb_try_coalesce+0x355/0x3d0 [ 5557.333646] [] tcp_try_coalesce+0x69/0xc0 [ 5557.333669] [] tcp_queue_rcv+0x54/0x100 [ 5557.333691] [] ? tcp_transmit_skb+0x7ff/0x8d0 [ 5557.333714] [] tcp_rcv_established+0x2bb/0x6a0 [ 5557.333737] [] ? tcp_v4_rcv+0x6cf/0xb10 [ 5557.333758] [] tcp_v4_do_rcv+0x135/0x480 [ 5557.333951] [] ? _raw_spin_lock_nested+0x42/0x50 [ 5557.333975] [] ? tcp_v4_rcv+0x6cf/0xb10 [ 5557.334009] [] tcp_v4_rcv+0x95d/0xb10 [ 5557.334032] [] ? lock_acquire+0xd8/0x100 [ 5557.334055] [] ? ip_local_deliver_finish+0x45/0x230 [ 5557.334081] [] ip_local_deliver_finish+0x11a/0x230 [ 5557.334105] [] ? ip_local_deliver_finish+0x45/0x230 [ 5557.334129] [] ip_local_deliver+0x38/0x80 [ 5557.334152] [] ip_rcv_finish+0x15a/0x630 [ 5557.334175] [] ip_rcv+0x218/0x300 [ 5557.334197] [] __netif_receive_skb+0x65d/0x8d0 [ 5557.334220] [] ? __netif_receive_skb+0x145/0x8d0 [ 5557.334244] [] ? trace_hardirqs_on+0xd/0x10 [ 5557.334268] [] ? free_hot_cold_page+0x1b3/0x1e0 [ 5557.334294] [] netif_receive_skb+0x28/0xf0 [ 5557.334315] [] ? __pskb_pull_tail+0x253/0x340 [ 5557.334343] [] xennet_poll+0xad5/0xe10 [ 5557.334379] [] net_rx_action+0x136/0x260 [ 5557.334403] [] ? __do_softirq+0x71/0x1a0 [ 5557.334426] [] __do_softirq+0xc9/0x1a0 [ 5557.334448] [] call_softirq+0x1c/0x30 [ 5557.334470] [] do_softirq+0x85/0xf0 [ 5557.334491] [] irq_exit+0x9e/0xd0 [ 5557.334514] [] xen_evtchn_do_upcall+0x2f/0x40 [ 5557.334537] [] xen_do_hypervisor_callback+0x1e/0x30 [ 5557.334566] [] ? copy_user_generic_string+0x30/0x40 [ 5557.334607] [] ? tcp_sendmsg+0xafa/0xe10 [ 5557.334632] [] ? inet_sendmsg+0xa9/0x100 [ 5557.334654] [] ? inet_autobind+0x70/0x70 [ 5557.334676] [] ? sock_destroy_inode+0x40/0x40 [ 5557.334698] [] ? sock_aio_write+0x12d/0x140 [ 5557.334723] [] ? do_sync_readv_writev+0x9b/0xe0 [ 5557.334750] [] ? do_readv_writev+0xcf/0x1d0 [ 5557.334785] [] ? vfs_writev+0x3e/0x60 [ 5557.334806] [] ? sys_writev+0x5a/0xc0 [ 5557.334826] [] ? trace_hardirqs_on_thunk+0x3a/0x3f [ 5557.334856] [] ? system_call_fastpath+0x16/0x1b [ 5557.334876] ---[ end trace 62036fd3c663553e ]--- [ 5557.335039] skbuff: netfront: WARN delta(18634) < len(18824) truesize(19530) SKB_DATA_ALIGN(256) SKB_TRUESIZE(896) [ 6195.800823] skbuff: netfront: WARN delta(18634) < len(18824) truesize(19530) SKB_DATA_ALIGN(256) SKB_TRUESIZE(896) I hope it gives some more insight. -- Sander > -- > Sander >> Thanks >> Annie >> On 2012-12-9 4:14, Sander Eikelenboom wrote: >>> Hi All, >>> >>> I still seem to hit some network warn in 3.7-rc8+. >>> It only seems to appear in guests and not in dom0, it happens every once in a while and in multiple guests. >>> >>> [ 778.846089] ------------[ cut here ]------------ >>> [ 778.846107] WARNING: at net/core/skbuff.c:3444 skb_try_coalesce+0x359/0x390() >>> [ 778.846114] Modules linked in: >>> [ 778.846121] Pid: 0, comm: swapper/0 Not tainted 3.7.0-rc8-20121208 #1 >>> [ 778.846127] Call Trace: >>> [ 778.846131] [] warn_slowpath_common+0x7a/0xb0 >>> [ 778.846143] [] warn_slowpath_null+0x15/0x20 >>> [ 778.846149] [] skb_try_coalesce+0x359/0x390 >>> [ 778.846157] [] tcp_try_coalesce+0x69/0xc0 >>> [ 778.846163] [] tcp_queue_rcv+0x54/0x100 >>> [ 778.846168] [] ? tcp_wfree+0x2f/0x140 >>> [ 778.846174] [] tcp_rcv_established+0x2bb/0x6a0 >>> [ 778.846180] [] ? tcp_v4_rcv+0x6cf/0xb10 >>> [ 778.846186] [] tcp_v4_do_rcv+0x135/0x480 >>> [ 778.846192] [] ? _raw_spin_lock_nested+0x42/0x50 >>> [ 778.846198] [] ? tcp_v4_rcv+0x6cf/0xb10 >>> [ 778.846203] [] tcp_v4_rcv+0x95d/0xb10 >>> [ 778.846209] [] ? lock_acquire+0xd8/0x100 >>> [ 778.846216] [] ? ip_local_deliver_finish+0x45/0x230 >>> [ 778.846222] [] ip_local_deliver_finish+0x11a/0x230 >>> [ 778.846228] [] ? ip_local_deliver_finish+0x45/0x230 >>> [ 778.846284] [] ip_local_deliver+0x38/0x80 >>> [ 778.846291] [] ip_rcv_finish+0x15a/0x630 >>> [ 778.846297] [] ip_rcv+0x218/0x300 >>> [ 778.846303] [] __netif_receive_skb+0x65d/0x8d0 >>> [ 778.846309] [] ? __netif_receive_skb+0x145/0x8d0 >>> [ 778.846315] [] ? trace_hardirqs_on+0xd/0x10 >>> [ 778.846322] [] ? free_hot_cold_page+0x1b3/0x1e0 >>> [ 778.846329] [] netif_receive_skb+0x28/0xf0 >>> [ 778.846334] [] ? __pskb_pull_tail+0x253/0x340 >>> [ 778.846342] [] xennet_poll+0xad5/0xe10 >>> [ 778.846349] [] net_rx_action+0x136/0x260 >>> [ 778.846355] [] __do_softirq+0xc9/0x1a0 >>> [ 778.846361] [] call_softirq+0x1c/0x30 >>> [ 778.846368] [] do_softirq+0x85/0xf0 >>> [ 778.846373] [] irq_exit+0x9e/0xd0 >>> [ 778.846380] [] xen_evtchn_do_upcall+0x2f/0x40 >>> [ 778.846386] [] xen_do_hypervisor_callback+0x1e/0x30 >>> [ 778.846391] [] ? xen_hypercall_sched_op+0xa/0x20 >>> [ 778.846401] [] ? xen_hypercall_sched_op+0xa/0x20 >>> [ 778.846408] [] ? xen_safe_halt+0x10/0x20 >>> [ 778.846415] [] ? default_idle+0x40/0x90 >>> [ 778.846421] [] ? cpu_idle+0x96/0xf0 >>> [ 778.846428] [] ? rest_init+0xbc/0xd0 >>> [ 778.846433] [] ? csum_partial_copy_generic+0x170/0x170 >>> [ 778.846441] [] ? start_kernel+0x390/0x39d >>> [ 778.846447] [] ? repair_env_string+0x5b/0x5b >>> [ 778.846454] [] ? x86_64_start_reservations+0x131/0x136 >>> [ 778.846461] [] ? xen_start_kernel+0x54e/0x550 >>> [ 778.846467] ---[ end trace d13d814dbabaca0e ]--- >>> >>> >>> -- >>> Sander >>> >>>