Stopping or restarting the bind init script will cause the shell to hang because fuser is not working properly when CONFIG_SWAP is not set in the kernel. Reproducible: Always Steps to Reproduce: 1. Disable "Support for paging of anonymous memory (swap)" in the kernel 2. rebuild the kernel/reboot 3. setup/configure bind for chroot 4. /etc/init.d/bind restart Actual Results: /etc/init.d/bind restart * Stopping chrooted named ... * Umounting chroot dirs * Waiting until all named processes are stopped Expected Results: /etc/init.d/bind restart * Stopping chrooted named ... * Umounting chroot dirs * umount /mnt/services/dns/etc/bind * umount /mnt/services/dns/var/log/named * umount /mnt/services/dns/var/bind [ ok ] * Starting chrooted named ... * Mounting chroot dirs * mounting /etc/bind to /mnt/services/dns/etc/bind * mounting /var/bind to /mnt/services/dns/var/bind * mounting /var/log/named to /mnt/services/dns/var/log/named [ ok ] fuser says "Cannot open /proc/swaps" when it is ran as "fuser /" or any directory, but it still works. I didn't know whether or not to make this a bug of psmisc or bind. My psmisc version is sys-process/psmisc-22.12.
Created attachment 252081 [details, diff] Patch to check for SWAP support in the kernel Attached a patch to check for SWAP support by adding a chroot use flag.
Created attachment 252085 [details, diff] Patch to check for SWAP support in the kernel Needed to check for SWAP, not swap in if statement.
(In reply to comment #2) > Created an attachment (id=252085) [details] > Patch to check for SWAP support in the kernel > > Needed to check for SWAP, not swap in if statement. > + linux_config_exists || die "Your kernel sources are unconfigured" Please don't do that ^. On linux_config_exists() returning true, you want to run linux_chkconfig_present SWAP. On linux_config_exists() returning false, you want to warn the user that results are unpredictable. Remember, you don't need kernel sources or a /proc/config.gz on a running Gentoo host. (The easy example is a virtual machine (VPS) that has a kernel managed by something/someone else) Assigning to maintainers.
Oh, sorry one more thing. I also question the "die "SWAP support not detected" " statement for similar reasons. You don't need SWAP support on the build host to run bind, Unless there is a buildtime failure.
Please run "fuser /chroot/dns" when the init script hangs.