This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] "kobject add failed"

To: "Petersson, Mats" <Mats.Petersson@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] "kobject add failed"
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Thu, 03 May 2007 18:03:23 +0100
Delivery-date: Thu, 03 May 2007 10:02:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <907625E08839C4409CE5768403633E0B018E1CBF@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AceNmT0esnMamshHQgCftANOeSweVQACJPy4AAAGsIAAAMJU7A==
Thread-topic: [Xen-devel] "kobject add failed"
User-agent: Microsoft-Entourage/
On 3/5/07 17:45, "Petersson, Mats" <Mats.Petersson@xxxxxxx> wrote:

> I haven't seen it before. Any idea why this would happen now, and not
> before?

Because now you are doing two save/restores in a loop at the same time.

> Why would it happen only when doing two save/restore sessions (of
> different domains of course) on the same machine (which I have done
> before - but not that recently).

It looks like there might be a race in drivers/net/tun.c:tun_set_iff(). Two
invocations of ioctl(TUNSETIFF) can both resolve "tap%d" to "tap0" (because
both observe that tap0 is not registered). The second one to execute
register_netdevice() then bugs out because the interface already exists!

However, the invocation of tun_set_iff() is wrapped in rtnl_lock()/unlock()
so should be concurrency safe. Still, this is where I would concentrate my
search if I were you.

 -- Keir

> I got a second backtrace like that. I've since tried to avoid it by
> removing the (unnecessary) vif= in the setup of the simple-guest (it's
> got no code to deal with network devices anyway). 

Xen-devel mailing list