From owner-freebsd-current@FreeBSD.ORG Thu Oct 24 22:24:12 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E995C18B for ; Thu, 24 Oct 2013 22:24:12 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from mail-oa0-x22e.google.com (mail-oa0-x22e.google.com [IPv6:2607:f8b0:4003:c02::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AFBDA2F87 for ; Thu, 24 Oct 2013 22:24:12 +0000 (UTC) Received: by mail-oa0-f46.google.com with SMTP id g12so178147oah.19 for ; Thu, 24 Oct 2013 15:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=6b4BWXVCY6YlwyZxc8ve74/t/lVAMGsdNxhOjZeEY+E=; b=OWqxqmjmjBl2Owmv6HU3MAaShTNIKIjy6LYhI7yZXmK6KYu+at5Hd+pBmbMGQWDvde i7RLhc4uqOO+GH1fr1PN72eADtDfxFEany2tQkcG4jeRna/2JYY6SxGciDx5kjrQBJyV XXA8ZQ0J6CwnavrjE9xgmnMhfIwIk8hTir1epc4jspbXpdyr2wnrlJU0ShdjanyDqZAI XSlXaLnpGBDiVJcKYhBW9BUjku8mJtohfDgj6qSnMKKoE7AyyrP4Xr50RdH85guhbAX4 jvewCDVPapQtLkl+JIuYF2JbEj4PLvKq3zan+aGgemAcW8Nmhb0j81xX63OW8sPlLi+f wZMg== MIME-Version: 1.0 X-Received: by 10.60.43.131 with SMTP id w3mr490439oel.10.1382653451937; Thu, 24 Oct 2013 15:24:11 -0700 (PDT) Received: by 10.76.19.115 with HTTP; Thu, 24 Oct 2013 15:24:11 -0700 (PDT) In-Reply-To: <52699C97.7070105@citrix.com> References: <5268F37E.9050004@citrix.com> <526986E0.2050807@citrix.com> <20131024211507.GD10625@kib.kiev.ua> <52699C97.7070105@citrix.com> Date: Thu, 24 Oct 2013 18:24:11 -0400 Message-ID: Subject: Re: CUREENT issue with ballon.c From: Outback Dingo To: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Konstantin Belousov , current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2013 22:24:13 -0000 On Thu, Oct 24, 2013 at 6:17 PM, Roger Pau Monn=E9 wr= ote: > On 24/10/13 22:15, Konstantin Belousov wrote: > > On Thu, Oct 24, 2013 at 09:45:20PM +0100, Roger Pau Monn? wrote: > >> On 24/10/13 13:01, Outback Dingo wrote: > >>> > >>> > >>> On Thu, Oct 24, 2013 at 6:16 AM, Roger Pau Monn? >>> > wrote: > >>> > >>> On 24/10/13 03:02, Outback Dingo wrote: > >>> > --- trap 0, rip =3D 0, rsp =3D 0xfffffe00002c6b70, rbp =3D 0 --= - > >>> > uma_zalloc_arg: zone "16" with the following non-sleepable lock= s > held: > >>> > exclusive sleep mutex balloon_lock (balloon_lock) r =3D 0 > >>> > (0xffffffff816e9c58) locked @ > >>> /usr/src/sys/dev/xen/balloon/balloon.c:339 > >>> > exclusive sleep mutex balloon_mutex (balloon_mutex) r =3D 0 > >>> > (0xffffffff816e9c38) locked @ > >>> /usr/src/sys/dev/xen/balloon/balloon.c:373 > >>> > KDB: stack backtrace: > >>> > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > >>> > 0xfffffe00002c67c0 > >>> > kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe00002c6870 > >>> > witness_warn() at witness_warn+0x4a8/frame 0xfffffe00002c6930 > >>> > uma_zalloc_arg() at uma_zalloc_arg+0x3b/frame 0xfffffe00002c69a= 0 > >>> > malloc() at malloc+0x101/frame 0xfffffe00002c69f0 > >>> > balloon_process() at balloon_process+0x44a/frame > 0xfffffe00002c6a70 > >>> > fork_exit() at fork_exit+0x84/frame 0xfffffe00002c6ab0 > >>> > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00002c6a= b0 > >>> > --- trap 0, rip =3D 0, rsp =3D 0xfffffe00002c6b70, rbp =3D 0 --= - > >>> > uma_zalloc_arg: zone "16" with the following non-sleepable lock= s > held: > >>> > exclusive sleep mutex balloon_lock (balloon_lock) r =3D 0 > >>> > (0xffffffff816e9c58) locked @ > >>> /usr/src/sys/dev/xen/balloon/balloon.c:339 > >>> > exclusive sleep mutex balloon_mutex (balloon_mutex) r =3D 0 > >>> > (0xffffffff816e9c38) locked @ > >>> /usr/src/sys/dev/xen/balloon/balloon.c:373 > >>> > KDB: stack backtrace: > >>> > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > >>> > 0xfffffe00002c67c0 > >>> > kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe00002c6870 > >>> > witness_warn() at witness_warn+0x4a8/frame 0xfffffe00002c6930 > >>> > uma_zalloc_arg() at uma_zalloc_arg+0x3b/frame 0xfffffe00002c69a= 0 > >>> > malloc() at malloc+0x101/frame 0xfffffe00002c69f0 > >>> > balloon_process() at balloon_process+0x44a/frame > 0xfffffe00002c6a70 > >>> > fork_exit() at fork_exit+0x84/frame 0xfffffe00002c6ab0 > >>> > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00002c6a= b0 > >>> > --- trap 0, rip =3D 0, rsp =3D 0xfffffe00002c6b70, rbp =3D 0 --= - > >>> > uma_zalloc_arg: zone "16" with the following non-sleepable lock= s > held: > >>> > >>> Did you do anything specific to trigger the crash? Can you explai= n > the > >>> steps needed to reproduce it? > >>> > >>> > >>> just recompiled a kernel, and booted it scrolls continuously across t= he > >>> screen > >>> doesnt seem to ever stop. > >> > >> I've tried r257051 and it seems to work fine, could you please post yo= ur > >> Xen version, the config file used to launch the VM and the toolstack > used? > > > > Do you have witness enabled in your kernel config ? > > Yes, but I'm not touching balloon memory target. > > > There is an obvious case of calling malloc(M_WAITOK) while holding both > > balloon_lock and balloon_mutex: > > ballon_process->decrease_reservation->balloon_append. > > Yes, I'm aware of that, it's just that it shouldn't happen unless you > actually trigger a balloon memory decrease, which should not happen > automatically AFAIK, that's why I was asking if this was happening > without the user specifically requesting it. > > Anyway, this should be clearly fixed and pulled into 10 no matter what > triggered it. I will send a patch as soon as possible. > > Yes, WITNESS was enabled, im using Kubuntu / XEN kernel / and virt-manager.... it was fine running Current, until i ran updates this week then encountered this. Ive since disabled WITNESS with a recompile, but the VM still apears more sluggish then before. root@M14xR2:/home/dingo# xm info host : M14xR2 release : 3.11.0-12-generic version : #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 machine : x86_64 nr_cpus : 4 nr_nodes : 1 cores_per_socket : 2 threads_per_core : 2 cpu_mhz : 2494 xen:/// capabilities: x86_64 xenmigr xen 64 qemu-dm xenpv xen 32 qemu-dm xenpv hvm 32 qemu-dm hvmloader xenfv hvm 64 qemu-dm hvmloader xenfv hw_caps : bfebfbff:28100800:00000000:00007f00:77bae3bf:00000000:00000001:00000281 virt_caps : hvm total_memory : 8074 free_memory : 12 free_cpus : 0 xen_major : 4 xen_minor : 3 xen_extra : .0 xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 xen_scheduler : credit xen_pagesize : 4096 platform_params : virt_start=3D0xffff800000000000 xen_changeset : xen_commandline : placeholder cc_compiler : gcc (Ubuntu/Linaro 4.8.1-10ubuntu5) 4.8.1 cc_compile_by : stefan.bader cc_compile_domain : canonical.com cc_compile_date : Wed Oct 2 11:17:12 UTC 2013 xend_config_format : 4 root@M14xR2:/home/dingo# uname -a Linux M14xR2 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux