Moving a current working directory of a chrooted/jailed process, which is accessed via nullfs mount, to the outside of chroot/jail will hang the process in R state with CPU maxed out. The process cannot be killed. Whether mount is rw or ro makes no difference.
Steps to reproduce:
/test/jail <--- minimum chroot environment, or static shell
With nullfs mount:
/test/inside on /test/jail/mnt (nullfs, local, soft-updates)
host# chroot /test/jail /bin/sh
jail# cd /mnt/subdir
host# mv /test/mounted/subdir /test/outside
! at this point we have:
jail# cd .
Shell process hangs w/ CPU utilization maxed and cannot be killed (R state). Nullfs mount cannot be unmounted, results in D state.
Return to normal operation requires reboot.
12.2-RELEASE-p1, 12.2-RELEASE-p3, physical and virtual (virtualbox).
14.0-CURRENT will panic the kernel.
Show the panic, at least.
Created attachment 222534 [details]
screenshot of the VM console