[Bug 331615] New: shutdown hangs with autofs
https://bugzilla.novell.com/show_bug.cgi?id=331615 Summary: shutdown hangs with autofs Product: openSUSE 10.3 Version: Final Platform: x86-64 OS/Version: openSUSE 10.3 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: mkoenig@novell.com ReportedBy: detlef@die-mafia.de QAContact: qa@suse.de CC: werner@novell.com Found By: --- I use autofs to import nfs-shares, but if i shutdown and a share is mounted, the shutdown hangs. Output in messages: Oct 7 10:20:11 detlef-pc rpc.statd[4784]: Version 1.1.0 Starting Oct 7 10:20:11 detlef-pc rpc.statd[4784]: Flags: Oct 7 10:20:11 detlef-pc rpc.statd[4784]: unable to register (statd, 1, udp). Oct 7 10:20:52 detlef-pc rpc.statd[4789]: Version 1.1.0 Starting Oct 7 10:20:52 detlef-pc rpc.statd[4789]: Flags: Oct 7 10:20:52 detlef-pc rpc.statd[4789]: unable to register (statd, 1, udp). .. An old /etc/init.d/autofs (from rc1, don't know ;)), seems to work fine. This is the old stop-function: function stop() { count=0 while [ -n "`pidof $DAEMON`" -a $count -lt 15 ] ; do /sbin/killproc -TERM $DAEMON RETVAL=$? [ $RETVAL = 0 -a -z "`pidof $DAEMON`" ] || sleep 3 count=`expr $count + 1` done return $RETVAL } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c1 Matthias Koenig <mkoenig@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |detlef@die-mafia.de --- Comment #1 from Matthias Koenig <mkoenig@novell.com> 2007-10-08 09:16:11 MST --- Works for me. We had to fix some bugs in the /etc/init.d/autofs script after RC1, the stop() function you pasted is broken, it does not work if the filesystem is busy. Did you check that you have the real /etc/init.d/autofs script from the final release and not accidentally one from an earlier RC? Please attach your /etc/init.d/autofs script. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c2 --- Comment #2 from Detlef Reichelt <detlef@die-mafia.de> 2007-10-08 15:29:59 MST --- Created an attachment (id=176907) --> (https://bugzilla.novell.com/attachment.cgi?id=176907) autofs -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c3 --- Comment #3 from Detlef Reichelt <detlef@die-mafia.de> 2007-10-08 15:30:22 MST --- It was an fresh install from dvd, no upgrade from rc1. After copy an old autofs script (found this in an older backup), it works for me. Because of another bug, i try to install again on a clean partition, and post my results. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c4 --- Comment #4 from Detlef Reichelt <detlef@die-mafia.de> 2007-10-08 16:25:14 MST --- same problem after fresh install... :( cat /etc/exports on server: /srv/share/suse/ *(rw,root_squash,sync,all_squash,subtree_check) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c5 Tobias Abt <tabt@tabt.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tabt@tabt.de Status|NEEDINFO |NEW Info Provider|detlef@die-mafia.de | --- Comment #5 from Tobias Abt <tabt@tabt.de> 2007-10-08 17:22:37 MST --- I get the same lockup on my system (freshly installed 10.3 GM). How to reproduce: - insserv -d autofs - remove '#' from /net-line in /etc/auto.master - rcautofs start (or reboot) - ls /net/SOMESERVER/SOMEPATH - reboot -> gets stuck, does not seem to want to time out (>15 min) If you do not access some NFS share, it will not lock up during reboot. If you stop autofs manually before reboot, it will terminate gracefully and also not lock up. The problem is that portmap is shut down before autofs, which is not such a good idea if NFS mounts are still around... SOLUTION: add "portmap" to /etc/init.d/autofs Should-Stop entry (and most probably also to Should-Start) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c6 Matthias Koenig <mkoenig@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #6 from Matthias Koenig <mkoenig@novell.com> 2007-10-09 03:01:01 MST --- Ah, you are right. The shutdown dependency is completely broken. But portmap should be pulled in via $remote_fs rather than directly (as it is done in Required-Start) Does this patch for /etc/init.d autofs fix it? --- autofs-20071009 2007-10-02 17:50:41.000000000 +0200 +++ autofs 2007-10-09 10:50:34.000000000 +0200 @@ -7,8 +7,8 @@ # Provides: autofs # Required-Start: $network $syslog $remote_fs # Should-Start: ypbind keyserv ldap gssd -# Required-Stop: -# Should-Stop: gssd +# Required-Stop: $network $syslog $remote_fs +# Should-Stop: ypbind keyserv ldap gssd # Default-Start: 3 5 # Default-Stop: # Description: Start the autofs daemon for automatic mounting of filesystems. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c7 --- Comment #7 from Tobias Abt <tabt@tabt.de> 2007-10-09 03:50:38 MST --- I did this and the dependency seems to be correct (ls -1 /etc/init.d/rc5.d): K01stopblktrace K10cron K10smartd K10xinetd K11autofs K11nscd K11postfix K11xdm K12alsasound K12cups K12irq_balancer K12ntp K12powersaved K12splash K12sshd K15auditd K15avahi-dnsconfd K15portmap K15splash_early K16avahi-daemon K16syslog K17network K18earlyxdm K19haldaemon K20consolekit K21acpid K21dbus K21earlysyslog K21fbset K21random K21resmgr But looking at the order of the output of the shutdown scripts the sequence is like that: xinet CUPS kdm ntp audit cron nscd postfix RPC portmap (!) kdm avahi DNS smart saving random seed powersave irqbalance avahi ssh automount (!) -> stuck... Ahem, I just don't get it. It seems the running order of the scripts is messed up although the K??-link names are correct. This seems to point to the rc-script scheduler... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c8 --- Comment #8 from Matthias Koenig <mkoenig@novell.com> 2007-10-09 06:47:23 MST --- Wait, I just noticed that my fix does not fix anything as Suse init dependencies are determined by the start tags only. Also, as we have enabled RUN_PARALLEL by default, the symlinks are completely irrelevant for the order of execution. This order is calculated with the help of the /etc/init.d/.depend.{boot,start,stop} files. The problem might be that nfs is not enabled. As a result insserv does not resolve portmap. Because the dependency chain is autofs->$remote_fs->nfs->$portmap. Can you please check if nfs is enabled and if this fixes the dependencies? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c9 --- Comment #9 from Tobias Abt <tabt@tabt.de> 2007-10-09 11:39:31 MST --- The NFS client service was neither activated nor started, yes. It is correct that activating and starting the nfs client service does solve the problem. Ok, I have not yet looked into the parallel start/stop scripts, I assumed they were still using those numbers only that now all equal numbers can be started and stopped in parallel. Live and learn... :-) However, insserv then should complain about nfs not being activated. Sure, you can use automount for purposes other than NFS mounts, but to be on the safe side, if you can't check whether NFS is used or not, at least complain that it might be necessary. Or, have portmap depend on automount being stopped first. Should never hurt and fulfills the task, too. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c10 Dr. Werner Fink <werner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|mkoenig@novell.com |werner@novell.com Severity|Normal |Enhancement --- Comment #10 from Dr. Werner Fink <werner@novell.com> 2007-10-10 02:36:30 MST --- OK, then I'll pick up the bug for testing a modified version of insserv if you Tobias are willingly to test such a new insserv. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c11 --- Comment #11 from Tobias Abt <tabt@tabt.de> 2007-10-10 02:48:59 MST --- Sure, send it my way, I'll test it ASAP. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c12 --- Comment #12 from Dr. Werner Fink <werner@novell.com> 2007-10-10 05:20:45 MST --- Created an attachment (id=177331) --> (https://bugzilla.novell.com/attachment.cgi?id=177331) insserv-1.09.0-48.x86_64.rpm Das neue insserv rpm. Zum Testen biete vorher das nfs script wieder disablen, dann das neue insserv installieren und danach einfach mal inssserv aufrufen. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c13 Dr. Werner Fink <werner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |detlef@die-mafia.de --- Comment #13 from Dr. Werner Fink <werner@novell.com> 2007-10-10 05:21:14 MST --- See comment #12 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c14 --- Comment #14 from Detlef Reichelt <detlef@die-mafia.de> 2007-10-10 06:40:31 MST --- Habe auf einer frisch installierten 10.3 dein neues RPM vor der Konfiguration von autofs eingespielt. Works for me! ;) THX -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615 Dr. Werner Fink <werner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Enhancement |Normal -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615 Dr. Werner Fink <werner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Info Provider|ast@novell.com |detlef@die-mafia.de -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c16 --- Comment #16 from Dr. Werner Fink <werner@novell.com> 2007-10-11 02:33:59 MST --- Created an attachment (id=177593) --> (https://bugzilla.novell.com/attachment.cgi?id=177593) insserv-1.09.0-48.i586.rpm The same for i586 and higher -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c17 --- Comment #17 from Detlef Reichelt <detlef@die-mafia.de> 2007-10-11 14:46:55 MST --- schei.... nein, geht nicht! Ich habe es so getestet: Start -> NFS-Mounts nutzen -> Konqueror im NFS-Mount offen lassen -> Reboot geht! Nun habe ich aber meine Kiste einige Stunden laufen lassen, und schwupps, der "alte" Fehler, shutdown hängt.... :( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c18 --- Comment #18 from Dr. Werner Fink <werner@novell.com> 2007-10-12 04:07:01 MST --- ??? Und du bist sicher, dass das an autofs liegt ??? Bitte attache mal die neue /etc/init.d/.depend.stop und /etc/init.d/.depend.start ... als Textdatei (text/plain), dann koennen wir mal sehen, ob autofs via nfs von portmap abhaengt. ------------------------------------------------------------------- ???` Are you sure that this is caused by autofs ??? Please attach the new files /etc/init.d/.depend.stop and /etc/init.d/.depend.start as text files (text/plain), then we might be able to determine if autofs depends indirect with nfs on portmap. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c19 --- Comment #19 from Detlef Reichelt <detlef@die-mafia.de> 2007-10-12 05:26:46 MST --- Created an attachment (id=178072) --> (https://bugzilla.novell.com/attachment.cgi?id=178072) depend.start -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c20 --- Comment #20 from Detlef Reichelt <detlef@die-mafia.de> 2007-10-12 05:27:10 MST --- Created an attachment (id=178073) --> (https://bugzilla.novell.com/attachment.cgi?id=178073) depend.stop -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615 Dr. Werner Fink <werner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178072|application/octet-stream |text/plain mime type| | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615 Dr. Werner Fink <werner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178073|application/octet-stream |text/plain mime type| | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c21 --- Comment #21 from Detlef Reichelt <detlef@die-mafia.de> 2007-10-12 05:30:18 MST --- Hm, if this is an autofs bug? I'm not sure anymore.... :( Could be a problem of nfs or portmap. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c22 --- Comment #22 from Dr. Werner Fink <werner@novell.com> 2007-10-12 05:37:16 MST --- AFAICS it should work ... all dependcies are correct, only within the TARGETS the disabled services are missed. Maybe startpar has a problem with this. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c23 --- Comment #23 from Dr. Werner Fink <werner@novell.com> 2007-10-12 06:12:01 MST --- Just run a test with startpar and got this result for stopping by diffing the order with and without enabled nfs script: --- nfs +++ no_nfs @@ -1,24 +1,23 @@ xdm ntp autofs cron nscd powersaved ypbind alsasound irq_balancer lm_sensors +portmap splash splash_early sshd -nfs -portmap syslog earlysyslog fbset network haldaemon acpid dbus random resmgr first xdm is stopped, then ntp, then autofs ... and long after this the portmap. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c24 --- Comment #24 from Dr. Werner Fink <werner@novell.com> 2007-10-12 09:07:09 MST --- Please could you add portmap to the RequiredStart line of autofs and run the insserv command afterwards. Does this work for you or is the enabled nfs service mandatory for you regardless of having portmap witin the RequiredStart line of autofs? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c25 --- Comment #25 from Tobias Abt <tabt@tabt.de> 2007-10-12 11:08:57 MST --- (In reply to comment #24 from Werner Fink)
Please could you add portmap to the RequiredStart line of autofs and run the insserv command afterwards. Does this work for you or is the enabled nfs service mandatory for you regardless of having portmap witin the RequiredStart line of autofs?
With portmap in the RequiredStart line autofs gets inserted in the portmap depend.stop line and portmap is ended after autofs. As it should. I would however put it in ShouldStart. I know people that like to disable portmap on principle... :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c26 --- Comment #26 from Tobias Abt <tabt@tabt.de> 2007-10-12 11:16:20 MST --- (In reply to comment #25 from Tobias Abt)
I would however put it in ShouldStart. I know people that like to disable portmap on principle... :-)
On second thought, put it in RequiredStart. In an environment where someone would disable portmap autofs does not make any sense either. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c27 Dr. Werner Fink <werner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Info Provider|detlef@die-mafia.de |tabt@tabt.de --- Comment #27 from Dr. Werner Fink <werner@novell.com> 2007-10-16 08:22:49 MST --- Please could you remove the portmap from RequiredStart of autofs and add nfs to the TARGETS of /etc/init.d/.depend.stop and /etc/init.d/.depend.start with the help of e.g. vi. Afterwards you should not call insserv but reboot to see if this works. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c28 Tobias Abt <tabt@tabt.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|tabt@tabt.de | --- Comment #28 from Tobias Abt <tabt@tabt.de> 2007-10-17 15:18:01 MST --- (In reply to comment #27 from Werner Fink)
Please could you remove the portmap from RequiredStart of autofs and add nfs to the TARGETS of /etc/init.d/.depend.stop and /etc/init.d/.depend.start with the help of e.g. vi. Afterwards you should not call insserv but reboot to see if this works.
I removed the RequiredStart, did an insserv -r nfs and added nfs to the mentioned TARGET vars. Then I accessed my NFS server and rebooted. The shutdown order is not ok, portmap is ended before autofs. Therefore the system got stuck. (To be sure, I tried it again right after that, same result.) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c29 --- Comment #29 from Matthias Koenig <mkoenig@novell.com> 2007-10-18 04:40:11 MST --- Ok, as this fix would require major changes to startpar, I will just add the $portmap dependency to the autofs Should-Start line. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=331615#c32 Dr. Werner Fink <werner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #32 from Dr. Werner Fink <werner@novell.com> 2007-11-05 05:55:21 MST --- as the new autofs script is released this bug is fixed -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com