patthegreat at altavista.net patthegreat at altavista.net
Tue Oct 24 07:08:49 GMT 2000

Hello samba developers,

We are having a serious problem with Samba in that the smbd process
will go out of control into a loop whenever two people access the same

We are running Linux version 2.0.34C53_SK on a Mips (i.e. a cobalt)
We are running Samba 2.0.7 generically compiled on this machine from
source (we were having this same problem with the cobalt supplied 
samba and hoped that the bug was resolved in the latest version).

Our smb.conf has the following entries regarding locking:
  locking = no
  oplocks = no
  strict locking = no

despite that, whenever the multiple-access freakouts occur, we get and
endlessly repeating loop of the following in the log file:

[2000/10/24 15:52:49, 0] smbd/oplock.c:receive_local_message(247)
  receive_local_message. Error in recvfrom. (Invalid argument).

Here is the section in oplock.c where the error occurs, apparently
from a recvfrom() call failing with errno = "Invalid argument".
Evidently whatever routine is calling receive_local_message() is
calling it continuously, probably taking the False returned under
these conditions as an indication that the file in question is still 
'locked'.  This causes network problems and causes the load average to
spike until the offending process is signalled.

   * From here down we deal with the smbd <--> smbd
   * oplock break protocol only.

   * Read a loopback udp message.
  msg_len = recvfrom(oplock_sock, &buffer[OPBRK_CMD_HEADER_LEN],
                     buffer_len - OPBRK_CMD_HEADER_LEN, 0,
                     (struct sockaddr *)&from, &fromlen);

  if(msg_len < 0) {
    DEBUG(0,("receive_local_message. Error in recvfrom. (%s).\n",strerror(errno)));
    return False;

Unfortunately we do not really have the know how to run this under a
debugger, breakpointing the recvfrom, viewing its arguments and call

Thanks for your time in fixing what would appear to be a bug (since it
is a bad argument passed to a system call)  We will try out any
amended code and let you know the results, since you all probably run
Intel machines and may not readily have access to a similar machine.  

Patrick Alford

P.S. gcc is 2.7.2 on this machine.

Get your free email from AltaVista at http://altavista.iname.com

More information about the samba mailing list