Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 310293

Summary: sys-apps/openrc-0.6.0-r1 - fuser cannot use SIGKILL in rc-mount.sh
Product: Gentoo Linux Reporter: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: roy
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://roy.marples.name/projects/openrc/changeset/4b333eaf366b6168fbe3e0e2cbf05022499c79aa
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 295613    

Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-03-19 22:02:34 UTC
rc-mount.sh is designed to use fuser on mounted partitions to kill any process still accessing those mounts when the system is about to shut down. The script is should use SIGTERM for the first two fuser runs and if those fail using SIGKILL for the last run of fuser.
Unfortunately the script is a bit flawed and doesn't come to the point where SIGKILL could be used. This is especially bad when /home is on a separate partition/mount and someone is still logged into the system via ssh while shutdown is running. In this case rc-mount.sh fails to kill the ssh-process which results in rc-mount.sh being unable to unmount /home.

The patch mentioned in the URL field does fix this problem so please include that patch in our openrc package.

Reproducible: Always

Steps to Reproduce:
1. Have /home being on a separate partition/mount
2. Have some user where his $HOME is located under /home logged into the machine via ssh
3. run shutdown on the machine
4. see unmount of /home failing due to ssh process not being killed by fuser in rc-mount.sh
Comment 1 William Hubbs gentoo-dev 2010-03-19 22:34:34 UTC
Roy,

I have been asked to do a revbump to include this patch.  However, there have been quite a few changes since -r1, so, I am enclined to wait for your next release.  Can you give me an idea of when that may happen?

Thanks,

William
Comment 2 Roy Marples 2010-03-19 22:44:48 UTC
I'll see about knocking one out over the weekend
Comment 3 William Hubbs gentoo-dev 2010-03-27 22:31:43 UTC
This is fixed in 0.6.1-r1.