mddestroy from script hangs

From: S. Ross Gohlke <ross_at_bisd.ro>
Date: Tue, 09 Dec 2025 17:29:02 UTC
I am running pkgbase upgraded on 20251204. Since the upgrade, two of my 
scripts invoking "mdconfig -du" suddenly hang:

^T

     load: 0.68  cmd: mdconfig 48250 [mddestroy] 845.83r 0.00u 0.00s 0% 
2808k
     mi_switch+0x172 sleepq_switch+0x109 _sleep+0x24d mddestroy+0xc4 
mdctlioctl+0x462 devfs_ioctl+0xd1 VOP_IOCTL_APV+0x51 vn_ioctl+0x160 
devfs_ioctl_f+0x1e kern_ioctl+0x2a1 sys_ioctl+0x133 amd64_syscall+0x169 
fast_syscall_common+0xf8

Sometimes I can quit it with ^C, sometimes I can't, but in either case 
subsequent invocations of mdconfig, like "mdconfig -lv", likewise hang.

If I disable the "mdconfig -du" in the script and perform it manually 
from the command line, it works fine. I tried sleeping for a bit before 
"mdconfig -du", that did not help.

These two scripts, one of which has been in use for years, one for 
months, have never exhibited this problem.

Regards,

Ross