[Bug 253593] Process hangs if nullfs mounted cwd moved out of chroot
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Feb 17 18:25:12 UTC 2021
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253593
Bug ID: 253593
Summary: Process hangs if nullfs mounted cwd moved out of
chroot
Product: Base System
Version: 12.2-STABLE
Hardware: amd64
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: bugs at FreeBSD.org
Reporter: koscak.gregor at gmail.com
Overview:
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:
Setup directories
/test/mounted/subdir
/test/outside
/test/jail <--- minimum chroot environment, or static shell
With nullfs mount:
host# mount
/test/inside on /test/jail/mnt (nullfs, local, soft-updates)
Procedure:
[terminal1]
host# chroot /test/jail /bin/sh
jail# cd /mnt/subdir
[terminal2]
host# mv /test/mounted/subdir /test/outside
! at this point we have:
! /test/mounted
! /test/outside/subdir
[terminal1]
jail# pwd
/mnt/subdir
jail# cd .
Actual result:
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.
Expected result:
Graceful failure.
Tested on:
12.2-RELEASE-p1, 12.2-RELEASE-p3, physical and virtual (virtualbox).
14.0-CURRENT will panic the kernel.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list