shutdown hangs with wlan autofs/nfs mounted homedirs

Bug #614731 reported by Sam Liddicott
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
autofs5 (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: autofs5

I have nfs4 home directories mounted with autofs.

If i boot-up and shutdown, everything is fine.

If I login for a graphical session and then choose shutdown from a gnome menu, then the shutdown hangs - with tasks like gnome-screensaver and other personal tasks hanging as well as system tasks like flush and sync.

The text console reports that these tasks have been hanging for more than 120 seconds.

I have seen /etc/init.d/networking that it tries not to shutdown network interfaces if there are network mounted file systems, and debugging that I've added to /etc/init.d/network and I am sure that it is not running.

I'm wondering if wpa_supplicant is being killed or something; or maybe the file system is being un-mounted before the applications have finished with it,

If I un-mount all the mounted home directories before shutting down then there are no problems.

I'm willing to do any amount of debug, but I'm not too hot on debugging upstart

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: autofs 5.0.5-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.35-14.20-generic 2.6.35
Uname: Linux 2.6.35-14-generic i686
Architecture: i386
Date: Sat Aug 7 14:11:05 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100806)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: autofs5

Revision history for this message
Sam Liddicott (sam-liddicott) wrote :
Revision history for this message
Chuck Short (zulcss) wrote :

Please attach your /etc/auto.master, and your /etc/network/interfaces.

chuck

Changed in autofs5 (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Sam Liddicott (sam-liddicott) wrote :
Revision history for this message
Sam Liddicott (sam-liddicott) wrote :
Revision history for this message
Sam Liddicott (sam-liddicott) wrote :

The WLAN is not defined in /etc/network/interfaces these days.

It was defined via network-manager and "available for all users". I believe HAL manages it. The WLAN connects before I login (or lack of NFS homedir would stop me logging in).

Changed in autofs5 (Ubuntu):
status: Incomplete → New
Revision history for this message
Sam Liddicott (sam-liddicott) wrote :

I should add that a consequence of this bug us users holding down the power-off button and getting unclean shutdown.

After a while this leads to corruptions that prevent X from starting and require a system re-install

Revision history for this message
Ian (cracklebar) wrote :

I am seeing the exact same thing. Does not matter the version of nfs, I am using nfs3.

I am using wireless to share /home directories. If you shutdown within a gnome session it just hangs. If you log out and then use the shutdown from the login screen it does shutdown.

But a real pain when my wife uses the notebook. Stuffs up firefox config, leaves locks, you can lose bookmarks.

I have /home mounted as NFS so when we log in from workstation or laptop. Desktop is the same.

If the shutdown order can be changed somehow, I believe it will fix it.

Ian...

Revision history for this message
Lars Erik Kolden (lars-erik-kolden) wrote :

Struggling with the same thing on a school with around 60 laptops connecting to a NFS server via LDAP and autofs. I have had some other problems that have arose because of this. For instance a Network Manager bug that disabled the wifi card if the laptop went into hibernation/suspend. Of course this happened all the time, since the pupils just clicks "shutdown" from the profile and close the lid of the laptop.

Revision history for this message
Christophe BERNARD (christophe-bernard) wrote :

Same for me. We have autofs home dirs. eth0 is in /etc/network/interfaces so users have no control over it. For some reason unclear to me, shutdown fails unless I first unlog and then stop autofs and gdm by hand before asking to shut down.

This is very painful, especially because it is difficult to debug: there is no clear documented way to understand the order in which the upstart jobs are shutting down and where is the deadlock (which job is waiting for which, etc.), unless (following the upstart doc) I put additional debugging commands all over the place in the upstart scripts.

Revision history for this message
Sam Liddicott (sam-liddicott) wrote : Re: [Bug 614731] Re: shutdown hangs with wlan autofs/nfs mountedhomedirs

I'm pretty sure that the problem is because the network stops before
filesystem unmounts, and so the nfs unmount hangs because the file
server is unreachable.

The fix would be to unmount network file systems before stopping the
network.

But that would require stopping processes that use network file systems
even sooner than that.

But some processes are used to manage the network card (particularly
wireless network) so they can't be killed before un-mounting the network
file systems.

The current workaround is to use windows with roaming profile or
something like that, I believe that works quite well.

Revision history for this message
Iome (frodone) wrote :

I had this problem in 10.10, and now in 11.04. I'm mounting a dir other than home and on wired network.
I managed to work around this by stopping autofs on shutdown and reboot:

sudo update-rc.d autofs stop 25 0 6 .

No ill effects till now (can't imagine what would be worse than having to press the power button...)

Bye

Revision history for this message
Pekka Hämäläinen (pekka-hamalainen) wrote :

This is very painful problem and I haven't been able to find decent workaround even with days reading these posts.
My system is 10.04, wifi (ath9k) and /home, and few other directories automounted. Server is still running 8.04, ldap, nfs, samba etc. There are few clients in my network and all have similar problems.
So what happens on the client side is that I can boot normally, log in (using ldap uid's), and work normally with network drives. But when I try to "restart" or "shutdown" the client in gnome session, it freezes completely and never recovers. The only procedure that somehow works is to 1st log off and then shutdown / re-start
I have changed wpa_ifupdown in rc0.d and rc6.d from S15.. to S34.. to postpone the network interface stoppage after unmounts should happen - however no visible difference in the behavior.
Final annoying piece of information: syslog is almost empty from shutdown event related info.
Hope that some-one is working on this, I could run few trials and traces when needed.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in autofs5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Sam Liddicott (sam-liddicott) wrote : Re: [Bug 614731] Re: shutdown hangs with wlan autofs/nfs mounted homedirs

I don't observe this buggy behavior with recent 11.10 builds.

Revision history for this message
Sam Liddicott (sam-liddicott) wrote :

Although 11.10 has tried to sleep with nfs mounts resulting in a deadlock
when sync-ing.

Revision history for this message
Markus Kuhn (markus-kuhn) wrote :

In Ubuntu 16.04, you could place into /etc/NetworkManager/dispatcher.d/pre-down.d a script to run something like "killall -s USR1 automount && sleep 1". This should help to timeout non-busy automounts before the network interface goes down.

Revision history for this message
Sam Liddicott (sam-liddicott) wrote :

Thanks for the hint.
I didn't have the problem since the 11.10 builds..

Sam
On 10 Jun 2016 2:11 pm, "Markus Kuhn" <email address hidden> wrote:

> In Ubuntu 16.04, you could place into /etc/NetworkManager/dispatcher.d
> /pre-down.d a script to run something like "killall -s USR1 automount &&
> sleep 1". This should help to timeout non-busy automounts before the
> network interface goes down.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/614731
>
> Title:
> shutdown hangs with wlan autofs/nfs mounted homedirs
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/autofs5/+bug/614731/+subscriptions
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.