From: "Jan Beulich" Subject: Re: netback Oops then xenwatch stuck in D state Date: Wed, 13 Feb 2013 16:40:05 +0000 Message-ID: <511BCFF502000078000BDFCD@nat28.tlf.novell.com> References: <510C3AA3.2090508@theshore.net> <50E3A390-C52B-476A-8B20-BADBA42F3775@theshore.net> <51181924.4050500@theshore.net> <1360583103.16636.29.camel@zion.uk.xensource.com> <1360663133.20449.123.camel@zakaz.uk.xensource.com> <511AFFC9.3050404@theshore.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <511AFFC9.3050404@theshore.net> Content-Disposition: inline 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: Wei Liu , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 13.02.13 at 03:51, "Christopher S. Aker" wrote: > Feb 12 20:34:12: vif vif-21-0 vif21.0: Frag is bigger than frame. > Feb 12 20:34:12: vif vif-21-0 vif21.0: fatal error; disabling device > <-------------- > Feb 12 20:34:12: BUG: unable to handle kernel NULL pointer dereference at 00000000000008b8 >... > Feb 12 20:34:12: Call Trace: > Feb 12 20:34:12: [] _raw_spin_lock_irqsave+0x2a/0x40 > Feb 12 20:34:12: [] xen_netbk_schedule_xenvif+0x8f/0x100 > Feb 12 20:34:12: [] xen_netbk_check_rx_xenvif+0x25/0x60 > Feb 12 20:34:12: [] netbk_tx_err+0x5b/0x70 > Feb 12 20:34:12: [] xen_netbk_tx_build_gops+0xb8c/0xbc0 > Feb 12 20:34:12: [] ? __switch_to+0x160/0x4f0 > Feb 12 20:34:12: [] ? idle_balance+0xf8/0x150 > Feb 12 20:34:12: [] ? finish_task_switch+0x60/0xd0 > Feb 12 20:34:12: [] ? __schedule+0x394/0x750 > Feb 12 20:34:12: [] xen_netbk_kthread+0xef/0x9d0 > Feb 12 20:34:12: [] ? finish_task_switch+0x60/0xd0 > Feb 12 20:34:12: [] ? wake_up_bit+0x40/0x40 > Feb 12 20:34:12: [] ? xen_netbk_tx_build_gops+0xbc0/0xbc0 > Feb 12 20:34:12: [] kthread+0xc6/0xd0 > Feb 12 20:34:12: [] ? xen_end_context_switch+0x19/0x20 > Feb 12 20:34:12: [] ? kthread_freezable_should_stop+0x70/0x70 > Feb 12 20:34:12: [] ret_from_fork+0x7c/0xb0 > Feb 12 20:34:12: [] ? kthread_freezable_should_stop+0x70/0x70 I think the root cause is the same as for the problem reported on the !classic" kernels - we should not blindly shut down everything on a fatal error. Instead I think we ought to set a flag on the xenvif and disassociate the two in a more controlled manner. On the pv-ops tree, that would likely be just at the bottom of the main loop in xen_netbk_kthread(), with the caveat that there needs to be a way to identify the busted xenvif(s). On the classic tree, this apparently could be done directly in net_tx_action() (and hence can be done in netbk_fatal_tx_err() in place of the call to xenvif_carrier_off()), but the scheduled piece of code would then need to sync with both tasklets. Of course there's nothing preventing the pv-ops solution to be similar to this (allowing easier adding back of tasklet support, which - as I already told you elsewhere - appears to address throughput and/or CPU utilization problems people reported to us with the kthreads approach). Jan