[OpenAFS-devel] cannot shutdown 1.3.81 on linux 2.6.12-rc[12]

Roland Kuhn rkuhn@e18.physik.tu-muenchen.de
Tue, 19 Apr 2005 22:45:43 +0200 (CEST)


Hi!

Sorry, I cannot reply to the thread with the similar name because I just 
subscribed.

I immediately recognized the sysrq-t output and I would like to add a: "me 
too!"

As I'm not very familiar with the openafs internals it took me some time 
to gain some insight, here's what I think is happening:

src/afs/afs_call.c:afs_shutdown()
{
     [...]
     afs_warn("afs... ");
     while (afs_termState == AFSOP_STOP_AFS) {
         afs_osi_CancelWait(&AFS_WaitHandler);
         afs_osi_Sleep(&afs_termState);
     }

The backtrace shows that this loop does not terminate (you can see the 
afs_osi_SleepSig()), which is also matched by the dmesg output stopping 
after "afs...". On the other hand the afsd already exited, which must have 
happened like this:

src/afs/afs_daemons.c:afs_Daemon()
{
     [...]
         if (now > 0) {
             afs_osi_Wait(now, &AFS_WaitHandler, 0);
         }

         if (afs_termState == AFSOP_STOP_AFS) {
             if (afs_CheckServerDaemonStarted)
                 afs_termState = AFSOP_STOP_CS;
             else
                 afs_termState = AFSOP_STOP_BKG;
             afs_osi_Wakeup(&afs_termState);
             return;
         }

I haven't had the time to check the afs_termState in afs_shutdown yet as 
I've noticed that AFS_GLOCK() seems to do nothing if !CONFIG_SMP, so I 
figured I'd enable that since I use CONFIG_PREEMPT, which (to my naive 
mind) seems to necessitate locking...

If you have any suggestions how to hunt this down please let me know.

Ciao,
 					Roland