[OpenAFS-devel] diagnosing my problem with ubik elections... bug in
ubik
Hartmut Reuter
reuter@rzg.mpg.de
Wed, 04 Apr 2001 10:50:59 +0200
"Neulinger, Nathan" wrote:
>
> I did find one bug in ubik code... this isn't the complete solution to my
> problem, but I figured I'd send this to fix if I'm not confused. This bug
> explains the weird symptoms I was seeing with the hosts not getting the
> correct lowestHost.
>
> in vote.c around line 208:
>
> if (!amIClone &&
> (ntohl((afs_uint32) ubik_host) <= ntohl((afs_uint32) lowestHost)
> || lowestTime + BIGTIME < now)) {
> lowestTime = now;
> lowestHost = ubik_host[0];
> }
>
> the comparison is wrong... should be:
>
> (ntohl((afs_uint32) ubik_host[0]) <= ntohl((afs_uint32) lowestHost)
This is my fault! We were, however, running with this code without
problems for years. I am sorry for this inconvenience.
Hartmut
>
> As it is, you're comparing the ntohl of a pointer to lowestHost, so it's
> always updating lowest_host to be ubik_host[0]. (itself)
>
> Once I changed that, the lowestHost calculation is looking much better.
> Still not syncing up cause no one is ever sending a yes vote, but I'm still
> looking at that.
>
> -- Nathan
>
> ------------------------------------------------------------
> Nathan Neulinger EMail: nneul@umr.edu
> University of Missouri - Rolla Phone: (573) 341-4841
> Computing Services Fax: (573) 341-4216
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo.cgi/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)
-----------------------------------------------------------------