xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>, Philipp Hahn <hahn@univention.de>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Erik Damrose <Damrose@univention.de>,
	Ian Campbell <ian.campbell@citrix.com>,
	Zoltan Kiss <zoltan.kiss@citrix.com>
Subject: Re: RFH: Kernel OOPS in xen_netbk_rx_action / xenvif_gop_skb
Date: Thu, 19 Jun 2014 15:35:11 +0100	[thread overview]
Message-ID: <53A2F51F.5010905@citrix.com> (raw)
In-Reply-To: <20140619141252.GO20819@zion.uk.xensource.com>

On 19/06/14 15:12, Wei Liu wrote:
> On Wed, Jun 18, 2014 at 06:48:31PM +0200, Philipp Hahn wrote:
> [...]
>>
>> (gdb) list *(xen_netbk_rx_action+0x18b)
>> 0xffffffffa04287dc is in xen_netbk_rx_action
>> (/var/build/temp/tmp.hW3dNilayw/pbuilder/linux-3.10.11/drivers/net/xen-netback/netback
>> .c:611).
>> 606                     meta->gso_size = skb_shinfo(skb)->gso_size;
>> 607             else
>> 608                     meta->gso_size = 0;
>> 609
>> 610             meta->size = 0;
>> 611             meta->id = req->id;
>> 612             npo->copy_off = 0;
>> 613             npo->copy_gref = req->gref;
>> 614
>> 615             data = skb->data;
>>
>>
>> After more debugging today I think something like this happens:
>>
>> 1. The VM is receiving packets through bonding + bridge + netback +
>> netfront.
>>
>> 2. For some unknown reason at least one packet remains in the rx queue
>> and is not delivered to the domU immediately by netback.
>>
>> 3. The VM finishes shutting down.
>>
>> 4. The shared ring between dom0 and domU is freed.
>>
>> 5. then xen-netback continues processing the pending requests and tries
>> to put the packet into the now already released shared ring.
>>
>>
>> >From reading the attached disassembly I guess, that
>>  AX = &meta
>>  CX = &rx->string
>>  DX =~ rx.req_cons
>>  CR2 = &req->id
>> where
>>  CX + DX * sizeof(union struct xen_netif_rx_{request,response})=8 = CR2
>>
>>
>> Any additional ideas or insight is appreciated.
>>
> 
> I think your analysis makes sense. Netback does have it's internal queue
> and kthread can certainly be scheduled away. There doesn't seem to be a
> synchronisation point between a vif getting disconnet and internal queue
> gets processed. I attach a quick hack. If it does work to a degree then
> we can try to work out a proper fix.

The kthread_stop() in xenvif_disconnect() waits for the kthread to exit
so I don't see how Philipp's analysis can be right.

David

  reply	other threads:[~2014-06-19 14:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06 10:26 RFH: Kernel OOPS in xen_netbk_rx_action / xenvif_gop_skb Philipp Hahn
2014-06-06 10:58 ` Wei Liu
2014-06-06 22:12   ` Philipp Hahn
2014-06-18 16:48     ` Philipp Hahn
2014-06-19 14:12       ` Wei Liu
2014-06-19 14:35         ` David Vrabel [this message]
2014-06-19 14:41           ` Wei Liu
2014-06-23 14:56         ` Philipp Hahn
2014-06-27  8:42           ` Philipp Hahn
2014-06-27 17:48             ` Philipp Hahn
2014-06-27 18:24               ` Philipp Hahn
2014-07-02  7:45                 ` [PATCH] " Philipp Hahn
2014-07-10 12:41                   ` Wei Liu
     [not found]                   ` <20140710124122.GA2381@zion.uk.xensource.com>
2014-07-11  9:41                     ` Philipp Hahn
     [not found]                     ` <53BFB142.7050201@univention.de>
2014-07-11  9:53                       ` Wei Liu
2014-07-11 10:32                       ` Wei Liu
     [not found]                       ` <20140711103236.GB12584@zion.uk.xensource.com>
2014-07-11 11:02                         ` Philipp Hahn
     [not found]                         ` <53BFC43A.4080709@univention.de>
2014-07-11 11:16                           ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A2F51F.5010905@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=Damrose@univention.de \
    --cc=hahn@univention.de \
    --cc=ian.campbell@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=zoltan.kiss@citrix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).