FS#27409 - [initscripts] shutdown hangs on Unmounting Non-API Filesystems
Attached to Project:
Arch Linux
Opened by Andrew Gaydenko (student975) - Friday, 02 December 2011, 16:03 GMT
Last edited by Eric Belanger (Snowman) - Friday, 16 November 2012, 17:58 GMT
Opened by Andrew Gaydenko (student975) - Friday, 02 December 2011, 16:03 GMT
Last edited by Eric Belanger (Snowman) - Friday, 16 November 2012, 17:58 GMT
|
Details
The problem is described here (with Arch team members
participation):
https://bbs.archlinux.org/viewtopic.php?id=130868 Having the same problem I haven't found an appropriate task. |
This task depends upon
umount_all() {
# $1: restrict to fstype
local mounts
while read -r target fstype options; do
# match only targetted fstypes
if [[ $1 && $1 != "$fstype" ]]; then
continue
fi
# don't unmount API filesystems
if [[ $target = /@(proc|sys|run|dev|dev/pts) ]]; then
continue
fi
# avoid networked devices
IFS=, read -ra opts <<< "$options"
if in_array _netdev "${opts[@]}"; then
continue
fi
echo "$target" >> /test
umount -r "$target"
mounts+=("$target")
done < <(findmnt -mrunRo TARGET,FSTYPE,OPTIONS / | tac)
#umount -r "${mounts[@]}"
}
When the problem does't happen,I get:
/tmp
/dev/shm
/usr/share/nginx/http/gaoxiang
/srv/ftp/gaoxiang
/home
/var
/boot
/
and When the problem happens,I get:
/tmp
/dev/shm
/usr/share/nginx/http/gaoxiang
/srv/ftp/gaoxiang
/home
This means that it hangs when unmounting /home in my compurter.
For me, this problem can be got happened by runing firefox and do some login, soon firefox will becomes very slow, then the problem happens.
My fstab and the output of strace firefox and other related file is attached as a tar.
I mount a samba share with autofs thru an openvpn link. The share gets mounted in /mnt .
My daemons array in rc.conf looks like:
DAEMONS=(!hwclock ntpd syslog-ng dbus cpufreq !acpid !laptop-mode iptables networkmanager !netfs fcron @mysqld sensors @sshd alsa openvpn-git @bluetooth @httpd @postfix smartd avahi-daemon cupsd samba autofs)
It not an actual hang - I just have to wait for ~10min until a "connection timeout" gets printed on the screen. (Sorry I don't know the exact timeout message - I can't find in logs and I didn't have time to read it).
My daemons:
DAEMONS=(syslog-ng crond dbus @laptop-mode @acpid @networkmanager)
From:
rh:06:once:/etc/rc.shutdown
To (back?):
rh:06:wait:/etc/rc.shutdown
I've changed this file from defaults to improve boot time, but this line doesn't seem to have anything to do with boot time (why should it?).
https://wiki.archlinux.org/index.php/Improve_Boot_Performance
Can anyone still reproduce with a standard /etc/inittab file?
I know that I have changed some lines on inittab and, if that line has word wait, shutdown works fine.
Edit: Updated kernel and seems to be fixed
I don't use any network filesystems (nfs or cifs/smb) currently with this computer.
http://paste.kde.org/201584/ - /proc/self/mounts
/run/mount/utab is empty
http://paste.kde.org/201590/ - /etc/fstab
inittab and /etc/rc.d/functions are unmodified.
DAEMONS=(syslog-ng dbus networkmanager crond cpufreq @pdnsd @samba @autofs kdm)
Tried to stop autofs, unmount all /export/* directories and do swapoff manually before powering off, but nothing changes.
Upd: found this - https://bbs.archlinux.org/viewtopic.php?pid=1038913#p1038913 , looks very similar.
Upd2: fixed by updating Plymouth to git version. Sorry for inconvenience :)
Situation: samba share mounted with fstab over an openvpn link.
All I had to do is put netfs *after* openvpn in the daemons array.
Only so netfs manages to cleanly unmount the samba share and then the openvpn daemon is stopped.
- netfs service and
- _netdev cifs mount option
I don't see the problem any more, thanks!
1) I do not have any network mounted filesystems.
2) No btrfs, only ext4
3) I've migrated recently from dmraid to mdadm, that could or couldn't be the cause.