[OpenAFS-devel] OpenAFS, Linux and truncate_inode_pages()

Rainer Toebbicke rtb@pclella.cern.ch
Tue, 28 Feb 2006 09:59:37 +0100


chas williams - CONTRACTOR wrote:

> 
> 
> practically everything in afs happens under AFS_GLOCK.  this does
> tend to provide the same protection as i_sem.  for correctness,
> afs should probably take i_sem as appropriate.
> 
> 

I still suspect a Linuxer would not consider AFS locks a discharge.

Actually, I ran into this when told that running a 'find 
/usr/vice/cache ...' has been suspected to hang AFS. Luckily 
osi_UFSTruncate is about the only place where the i_sem is 
downed/upped correctly, so that wasn't it. But it illustrates that 
certain conventions should be taken seriously.


>>(the background: I can show that for sufficiently large N and 
>>concurrency the script  "for i (1..N) { cp file.i file.i+1; cmp file.i 
>>file.i+1 || die}" fails).
> 
> 
 > how about something we could use to duplicate the problem?

Oh? Easy! You need a farm of about 10 clients on Gb Ethernet, 4-5 
small servers on Gb as well with decently performing RAIDs and plenty 
of time:

set up a directory /afs/.../$hostname for each client, about 10 2GB 
volumes per client mounted at /afs/.../$hostname/[0-9], and then run
/afs/cern.ch/user/r/rtb/common/bin/disk_stress -rN500 \
	/afs/.../$hostname/?
on each client and wait. The problem usually manifests itself after a 
few days, sometimes 1-2 weeks. Survival after > 3 weeks on all clients 
is exceptional.

Happy hunting! You expected a one-liner? I'm afraid it isn't that easy.
[I've got a few hints on what can actually be reasonably excluded 
should somebody (against expectations) seriously try to reproduce this...]

Anyway, I'm knocking at various portions of the client code and listen 
if it sounds hollow. The setup described seems to look artificial but 
we've got enough traffic and reported oddities to suspect that it is 
also triggered by normal use. At what frequency - no idea.




-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rainer Toebbicke
European Laboratory for Particle Physics(CERN) - Geneva, Switzerland
Phone: +41 22 767 8985       Fax: +41 22 767 7155