unkillable qemu: sleeping in devdrn state
Bakul Shah
bakul at bitblocks.com
Thu Nov 23 08:58:58 PST 2006
> 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);
More information about the freebsd-current
mailing list