[OpenAFS] rh71, oafs 1.04: unloading unused kernel module crash machine

Simon Josefsson simon+openafs-info@josefsson.org
21 May 2001 23:18:32 +0200


Thanks, works.  Maybe adding something like the following could
prevent this in the future?

--- afs-        Mon May 21 23:16:00 2001
+++ afs Mon May 21 23:16:50 2001
@@ -161,6 +161,8 @@
        if  is_on $AFS_CLIENT  ; then
                killall inetd.afs
                umount /afs
+               # make sure afs is really shutdown before unloading module:
+               /usr/vice/etc/afsd -shutdown
        fi
 
        if  is_on $AFS_SERVER && test -x /usr/afs/bin/bos ; then

Derek Atkins <warlord@MIT.EDU> writes:

> Ahh.  You cannot rmmod libafs before you shutdown AFS.
> The problem is that in your case AFS is in a half-state.
> AFS is, I bet, still running, even if /afs isn't properly
> mounted.  AFS really doesn't know how to cope with this
> situation.  You can check this by running 'ps' and see
> if there are any afsd processes.
> 
> I bet, if you check, that afsd is actually running.  What
> 'umount /afs' does is wind up shutting-down afs.  If it's
> not properly mounted, you may need to manually run:
> 
> 	afsd -shutdown
> 
> before you run
> 
> 	rmmod libafs
> 
> This should fix the problem for you....
> 
> -derek
> 
> Simon Josefsson <simon+openafs-info@josefsson.org> writes:
> 
> > Rmmod.  But looking at the afs rc.d script, the only difference seem
> > to be that the script umount /afs before rmmod'ing, and in my case
> > /afs wasn't mounted since it didn't find any servers.
> > 
> > I've verified this on another machine, and it happens there as well.
> > 
> > I don't think it's the disk problems someone else suggested, the crash
> > happens exactly after rmmod, and I've no problem with disk access
> > before the rmmod.
> > 
> > (The machine is a laptop, and sometimes out of wavelan-coverage..)
> > 
> > Derek Atkins <warlord@MIT.EDU> writes:
> > 
> > > By "unload the kernel module" do you mean, literally, 'rmmod libafs'
> > > or do you mean running '/etc/rc.d/init.d/afs stop'?
> > > 
> > > -derek
> > > 
> > > Simon Josefsson <simon+openafs-info@josefsson.org> writes:
> > > 
> > > > This seems pretty reproducable: On a vanilly redhat71 (i386) machine
> > > > with openafs client installed, unplug the network, restart afs (e.g.
> > > > reboot machine), and after it has timed out to the servers (and you
> > > > get to a login prompt), unload the kernel module.  Boom.  No OOPSes
> > > > but any disk related operations (i.e. almost anything) hang
> > > > indefinitely.  The machine still answers ping though (if you plug
> > > > network back in, that is).
> > > > 
> > > > _______________________________________________
> > > > OpenAFS-info mailing list
> > > > OpenAFS-info@openafs.org
> > > > https://lists.openafs.org/mailman/listinfo/openafs-info
> > > 
> > > -- 
> > >        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
> > >        Member, MIT Student Information Processing Board  (SIPB)
> > >        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
> > >        warlord@MIT.EDU                        PGP key available
> > 
> 
> -- 
>        Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>        Member, MIT Student Information Processing Board  (SIPB)
>        URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
>        warlord@MIT.EDU                        PGP key available