Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 13
Private No

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

Closed by  Eric Belanger (Snowman)
Friday, 16 November 2012, 17:58 GMT
Reason for closing:  Won't fix
Comment by Gao Xiang (zasdfgbnm) - Sunday, 11 December 2011, 01:00 GMT
I modified my functions in rc.d like this

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.
Comment by Tom Gundersen (tomegun) - Tuesday, 13 December 2011, 22:42 GMT
Could someone please confirm that this is still a problem with initscripts from testing (reboot at least twice).
Comment by Arthur Țițeică (roentgen) - Wednesday, 14 December 2011, 07:18 GMT
I still have a hang (once every ~5 reboots/halts).

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).
Comment by Gao Xiang (zasdfgbnm) - Thursday, 15 December 2011, 11:14 GMT
My problem still happens.
Comment by Tomi Leppänen (Tomin) - Wednesday, 28 December 2011, 10:11 GMT
I'm having this as well. I'm using Plymouth but if I press Alt+F1 I can see the messages and the last one is Unmounting Non-API Filesystems [DONE]. My computer didn't shutdown after about 30 minutes of waiting.

My daemons:
DAEMONS=(syslog-ng crond dbus @laptop-mode @acpid @networkmanager)
Comment by Tomi Leppänen (Tomin) - Saturday, 31 December 2011, 11:27 GMT
I found out that this won't happen if I change a line in /etc/inittab.
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
Comment by Tom Gundersen (tomegun) - Saturday, 31 December 2011, 11:33 GMT
@Tomin: thanks for figuring this out.

Can anyone still reproduce with a standard /etc/inittab file?
Comment by Andrew Gaydenko (student975) - Saturday, 31 December 2011, 13:10 GMT
I (being the issue reporter) have never changed rc.shutdown line in inittab file.
Comment by Tomi Leppänen (Tomin) - Saturday, 31 December 2011, 16:21 GMT
I don't know if I have, so what do you have in your inittab then?
I know that I have changed some lines on inittab and, if that line has word wait, shutdown works fine.
Comment by Andrew Gaydenko (student975) - Saturday, 31 December 2011, 16:47 GMT
I have stock rh:06:wait:/etc/rc.shutdown string.
Comment by Luke Foreman (Dark) - Saturday, 31 December 2011, 19:36 GMT
I can reproduce this in arch running in VirtualBox on a windows host with some samba mounts and also vbox shared folders. No changes to /etc/inittab

Edit: Updated kernel and seems to be fixed
Comment by Dave Reisner (falconindy) - Saturday, 31 December 2011, 19:38 GMT
A "me too" is completely worthless without system config. Save your /proc/self/mounts and /run/mount/utab to disk, confirm that shutdown hangs, and then post it along with your /etc/fstab.
Comment by Tomi Leppänen (Tomin) - Sunday, 01 January 2012, 08:43 GMT
Yesterday evening and this morning my doesn't want to shutdown anymore. I don't know why it did work just fine after I had changed that line, but now it hangs just like it did before.

I don't use any network filesystems (nfs or cifs/smb) currently with this computer.
Comment by Gao Xiang (zasdfgbnm) - Sunday, 01 January 2012, 09:57 GMT
Hi,Tomin. Do you use btrfs filesystem? I'm using btrfs filesystem and it hangs on umounting btrfs partitions. I do btrfsck it find errors in it, but the tool can't fix problems now. I think it's these errors that cause umounting hang.
Comment by Andrew Gaydenko (student975) - Sunday, 01 January 2012, 10:05 GMT
At my case there are no btrfs file systems (ext2/ext4 for local hdd and autofs/cifs are in use).
Comment by h31 (h31) - Tuesday, 07 February 2012, 20:33 GMT
In my case "Unmounting Non-API Filesystems" is "DONE", but after this my computer hangs.
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 :)
Comment by Arthur Țițeică (roentgen) - Sunday, 04 March 2012, 16:49 GMT
Seems fine in my case.

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.
Comment by Tom Gundersen (tomegun) - Wednesday, 21 March 2012, 13:50 GMT
Please confirm whethre or not this is still an issue with initscripts-2012.03.1-1.
Comment by Andrew Gaydenko (student975) - Wednesday, 21 March 2012, 14:11 GMT
At my case with added

- netfs service and
- _netdev cifs mount option

I don't see the problem any more, thanks!
Comment by Andrew Gaydenko (student975) - Tuesday, 10 April 2012, 21:14 GMT
Are there any reason the task isn't still closed? I have the second machine where the issue has gone also :-)
Comment by Rares Aioanei (lmov) - Tuesday, 02 October 2012, 22:48 GMT
  • Field changed: Percent Complete (100% → 0%)
Still happening here, although not always, with stock inittab.
Comment by Tom Gundersen (tomegun) - Tuesday, 02 October 2012, 22:48 GMT
Rares: do you have any more info? anything that makes your system different from the other reporters?
Comment by Rares Aioanei (lmov) - Wednesday, 03 October 2012, 07:15 GMT
Not exactly; maybe the fact that I sometimes NFS mount a partition from another computer on my LAN. I'll test and let you know.
Comment by Mike Taylor (mtaylor) - Tuesday, 09 October 2012, 03:43 GMT
I'm experiencing this problem as well. As with Rares, I sometimes NFS mount a partition from another computer on my LAN. When I manually umount the NFS shares before shutdown it doesn't hang, but shutting down with the NFS shares mounted causes this problem (on 3 different computers), so I'm quite tempted to think the NFS shares are likely at fault.
Comment by Stéphane Travostino (eazy) - Wednesday, 17 October 2012, 09:19 GMT
Happening here too, in the last few days.

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.
Comment by Tom Gundersen (tomegun) - Sunday, 04 November 2012, 16:21 GMT
If anyone wants this fixed, post a patch to the projects ml. I'm not going to be working on this.

Loading...