[OpenAFS] Max bucket len exceeded - odd length?

Steve Simmons scs@umich.edu
Wed, 5 Sep 2012 13:20:47 -0400


We've been receiving messages like this occasionally on one of our 1.4.8 =
clients:

Sep  4 15:54:03 <host> kernel: afs_get_hash_stats: Warning! exceeded max =
bucket len 32
Sep  4 15:54:03 <host> kernel: afs_get_hash_stats: Warning! exceeded max =
bucket len 30

Sep  1 07:13:18 <host> kernel: afs_get_hash_stats: Warning! exceeded max =
bucket len 31
Sep  1 07:13:18 <host> kernel: afs_get_hash_stats: Warning! exceeded max =
bucket len 30
Sep  1 07:13:18 <host> kernel: afs_get_hash_stats: Warning! exceeded max =
bucket len 30

Aug 28 09:59:28 <host> kernel: afs_get_hash_stats: Warning! exceeded max =
bucket len 31
Aug 28 09:59:28 <host> kernel: afs_get_hash_stats: Warning! exceeded max =
bucket len 30

After reading the code involved (both 1.4.8 and current master) it =
appears this is a non-issue in most cases. The hash bucket in use gets =
wrapped back to the beginning, presumably expiring out semi-random =
stuff. However, there may be another problem.

Note the first error message on Sept 4. This states that the max bucket =
was 32. Several other times it complains about 31. Reading the code, it =
appears the bucket is actually overflowed due to a flaw in =
hash_bucket_stat() as it appears in both src/afs/LINUX/osi_alloc.c, =
src/afs/LINUX24/osi_alloc.c. As long as it's using the same bucket it'll =
happily increment cur_bucket_len without checking it against the max. As =
shown above, this condition does apply occasionally.

Steve=