afsd_services.exe taking up 99% of CPU on Win2k

Shyh-Wei Luan
Fri, 23 Mar 2001 09:12:36 -0800

We experienced a problem like this before both with IBM AFS and Open AFS
W2K client.    A memory leak seemed to be contributing to the problem.
James Peterson already sent a fix to the Open AFS.    Jeff Riegel and James
later found a better fix to the problem.   Jeff, James: Was the new fix
submitted?   Would you describe the new fix?

Shyh-Wei Luan

The following is what James sent to Open AFS.

During a directory scan W2K does not send the FindClose the way NT does.
When smb_ReceiveTran2SearchDir() processes FindFirst or FindNext, the
termination Flags is never set either (close search if end of search).
Since these operations don't occur smb_DeleteDirSearch() is never called;
therefore the dsp (smb_dirSearch_t) is never freed.

This problem was reproducible while trying to scan a directory (e.g. dir
*.c/s) with symbolic links.

When smb_ReceiveTran2SearchDir() processes FindFirst or FindNext the last
SMB call in a session can be indicated by checking for no more files

Running a directory scan (DOS window) and file cache size of 5 MB:
   With the memory leak patch, the program grew upto the limit of +5.3MB.
   Without the patch, the program will grew +27MB before the operation was
   finished, then became unstable.


-2368,6  +2368,6
         * or if something went wrong, close the search.
+        if ((searchFlags & 1) || (returnedNames == 0) //Release dsp when
names==0, W2k doesn't return FindClose like NT                 -         if
((searchFlags & 1) || ((searchFlags & 2) && eos)
          || code != 0) smb_DeleteDirSearch(dsp);
     if (code)
          smb_SendTran2Error(vcp, p, opx, code);

Dinh Ly <> on 03/22/2001 02:29:42 PM

Sent by:

Subject:  afsd_services.exe taking up 99% of CPU on Win2k


I just recently set up a machine with AFS Client v.3.6 b2.5 for
Win2k.  After working for a while, the machine is suddenly dragged down by
the AFS service.  The machine is not working as a server, so the service
shouldn't be running overtime.  Anyone seen anything like this before?  The
machine has SMS installed on it, and so I had to do the registry fix to get
the client to work in the first place.  Aside from that, the only other
thing I could think is that it might have something to do with a script the
machine runs sometimes to obtain tokens.


Dinh Ly
Qualcomm Inc.
Corporate IT
(858) 651-4366 Voice
(858) 442-0722 Mobile
(858) 636-9807 Pager