bug: Infinite recursion in debug.c when debug_level >= 5

John E. Malmberg wb8tyw at qsl.net
Sat Oct 23 15:41:40 GMT 2004


There is a bug in DEBUG.C that shows up when the log level is greater
than 5 and the output of SMBD is redirected to SYS$OUTPUT:

What is happening is that DEBUG calls sys_fstat() calls vms_stat() which 
does check of the cache for /SYS$OUTPUT/smbd.log

Sometimes for reasons that I do not know, the cache lookup fails, and it 
tries to create a new entry.  This calls a hash_init routine which calls 
DEBUG at level 5 to log this.

This starts the cycle all over again.

The apparent quick fix for the debug.c is to move the save and restore 
of the DEBUGLEVEL value to before call to sys_fstat() and the restore to 
after the resulting if () block.

But that also brings up some interesting questions as to why sys_fstat 
is going through all the extra overhead of file translation and cache 
processing by calling vms_stat() instead of a more simpler vms_fstat() 
call.  Removing all that overhead should greatly improve the speed of 
SAMBA on VMS.

I have found this while trying to merge Jean-Yves latest fixes in with 
the 2.2.12 source that I posted earlier.  I am still chasing down a bug 
in the resulting 2.2.12 stream, but this bug got in the way.

-John
wb8tyw at qsl.net
Personal Opinion Only



More information about the samba-vms mailing list