Re: unkillable qemu: sleeping in devdrn state

From: Bakul Shah <bakul_at_bitblocks.com>
Date: Thu, 23 Nov 2006 08:58:57 -0800
> 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
_at__at_ -321,6 +321,7 _at__at_
 #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);
Received on Thu Nov 23 2006 - 15:58:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:03 UTC