[OpenAFS-devel] callback handling problem
Hartmut Reuter
reuter@rzg.mpg.de
Thu, 31 Jan 2002 18:22:38 +0100
In older versions of callback.c was no "if ( !" around the call to
ClearHostCallbacks_r. Therefore the loop was left. I suppose we need a
line
hp1 = hp;
after the "return,". That would lih_r() start searching with the next
host.
Here the original part:
do {
lih_host = 0;
h_Enumerate_r(lih_r, (char *)hp1);
hp = lih_host;
if (hp) {
cbstuff.GSS4++;
if ( ! ClearHostCallbacks_r(hp, 0 /* not locked or held */)
)
return;
} else {
hp1 = hostp;
cbstuff.GSS1++;
ViceLog(5,("GSS: Try harder for longest inactive host cnt=
%d\n", i));
/*
* Next time try getting callbacks from any host even if
* it's deleted (that's actually great since we can freely
* remove its callbacks) or it's held since the only other
* option is starvation for the file server (i.e. until the
* callback timeout arrives).
*/
i++;
}
} while (i < 2);
Hartmut
Thomas Mueller wrote:
>
> Hi folks,
>
> we still have the problem which I reported last October.
> I now can say what happens but I have no idea why it happens.
>
> Occasionally the fileserver ends up with all threads running an infinite
> loop in GetSomeSpace_r() in viced/callback.c (do { ... } while (i < 2);)
>
> If
>
> h_Enumerate_r(lih_r, (char*)hp1);
>
> finds at least one host which passes all test in lih_r(...)
> then
>
> ClearHostCallbacks_r(hp, 0)
>
> is called, but this function returns immediately (return value 1)
> if this host entry is locked and the next round in this loop starts.
>
> So if hostList contains only a few (sometimes only one) entries
> with host->cblist != 0 AND those entries are locked this thread keeps in
> that do-while-loop.
>
> Do you think, it would be a solution to modify lih_r() a little bit so
> that it doesnt pick up locked host entries?
>
> Thomas.
> --
> -------------------------------------------------------------------------
> Thomas Mueller, TU Chemnitz, Universitaetsrechenzentrum, D-09107 Chemnitz
> e-mail: Thomas.Mueller@hrz.tu-chemnitz.de
> -------------------------------------------------------------------------
>
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
--
-----------------------------------------------------------------
Hartmut Reuter e-mail reuter@rzg.mpg.de
phone +49-89-3299-1328
RZG (Rechenzentrum Garching) fax +49-89-3299-1301
Computing Center of the Max-Planck-Gesellschaft (MPG) and the
Institut fuer Plasmaphysik (IPP)
-----------------------------------------------------------------