"Error 0" bug tracked halfway. Help needed

Vsevolod Ilyushchenko simonf at interna.ru
Mon Apr 12 12:09:06 GMT 1999


This is probably a question to developers. If nobody responds, I will go
developers mailing list and bug you there. :)

A while ago I have posted a question here about why my Samba gives the
"Error writing file: code 0". Nobody answered, so I have tracked down
stuff. (Someone recently noted the same bug on HPUX.)

My Samba is 2.0.3. I am writing a file via smbclient from a slow (486)
Linux PC to a faster (P 200) 4.0SP4 WinNT PC (this does not happen with
95). The Samba code does the file transmission via do_put() in client.c,
which function prints the above error if it returns a different value
from what was passed inside it. In my case, the returned value is LARGER
(69616) than the requested (65536). Weird.

Now I am getting inside cli_write() in clientgen.c. AFAIU, MID is some
of ID for packets sent during the transmission of one 65536 bytes block.
function cli_write() first sends stuff and then begins to receive
until everything is acked. In particular, it uses the SVAL macro to
the value of MID from an incoming reply.

Very well, the reply packet order is broken. After working normally for
a while,
NT responds with MID 3 right after MID 1, and everything inside
breaks down.

This is not the problem of my NIC losing packets: this always happens at
approximately the same place of a long file, and it's always 1-skip 2-3.
Besides, I was monitoring the packets from another PC via tcpdump-smb,
from what I understood from its output, the picture is the same.

Smbmount works fine.

OK. Any ideas?


|       x |   Simon (Vsevolod ILyushchenko) 		simonf at interna.ru
| y = e   |   		 		 http://www.internasoft.com/simon
|_________|   Life is file...  		 		     ICQ 14235453			   

Disclaimer: This is not me. 
This is just my mailer talking to your mailer...

More information about the samba mailing list