Date: Thu, 23 Nov 2006 08:58:57 -0800 From: Bakul Shah <bakul@bitblocks.com> To: Hajimu UMEMOTO <ume@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: unkillable qemu: sleeping in devdrn state Message-ID: <20061123165857.5931F5B3E@mail.bitblocks.com> In-Reply-To: Your message of "Thu, 23 Nov 2006 21:07:36 %2B0900." <ygeu00qs6wn.wl%ume@mahoroba.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> bakul> With a fairly recent -current kernel qemu sleeps in "devdrn" > bakul> state and is unkillable. /proc doesn't have qemu's pid entry > bakul> but it does show up in a ps listing! This bug is not 100% > bakul> repeatable but close enough. AFAIK this problem appears only > bakul> when kqemu is used with qemu. > > Though I'm not using qemu, I met similar problem with portupgrade. > The portupgrade sleeps in "devdrm" state. > Don't you set kern.pts.enable to 1? It seems the problem doesn't > occur when kern.pts.enable=0. I tried that but the problem remained. The following "fixed" it but I don't trust it is the right fix. IMHO destroy_dev() needs to do dev_relthread() or we need to figure out why si_threadcount is > 0 and fix that so that we don't have to go fix all the drivers. --- kqemu-freebsd.c-old Thu Nov 19 08:36:25 2006 +++ kqemu-freebsd.c Mon Nov 20 01:05:56 2006 @@ -321,6 +321,7 @@ #if __FreeBSD_version >= 500000 dev->si_drv1 = NULL; TAILQ_REMOVE(&kqemuhead, ks, kqemu_ent); + dev_relthread(dev); destroy_dev(dev); #endif free(ks, M_KQEMU);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061123165857.5931F5B3E>