Subject: unkillable qemu: sleeping in devdrn state
From: Bakul Shah
Date: 11/20/2006 9:06:08 AM
With a fairly recent -current kernel qemu sleeps in "devdrn"
state and is unkillable. /proc doesn't have qemu's pid entry
but it does show up in a ps listing! This bug is not 100%
repeatable but close enough. AFAIK this problem appears only
when kqemu is used with qemu.
This refcounting related problem has been reported for a
number of other devices. In one such thread (on cvs-all,
Subject: Re: cvs commit: src/sys/kern kern_conf.c) Tai-hwa
Liang has analyzed the problem and suggested a workaround for
a couple of devices. Rather than mucking with all the device
drivers, I hope a global fix is possible. Perhaps the
original fix by Tor Egge is not the only way to fix the bug?
I haven't analyzed the problem so likely I am talking through
my hat.
"You are in a maze of twisty little passages, all alike"
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Subject: unkillable qemu: sleeping in devdrn state
From: Bakul Shah
Date: 11/23/2006 5:01:58 PM
> 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);
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
|