When smbclient is requested to replace a "largefile" with a "newfile" (smbclient -c 'put newfile largefile') on the samba server that has a slow and busy disk subsystem then smbclient times out with error "Call timed out: server did not respond after 20000 milliseconds opening remote file \largefile".
This happens also when deleting a large file.
The situation is observed on clients connecting to a busy samba server with ext3 disk subsystem and several GB large files, for which open with O_TRUNC flag or delete lasts longer than 20s.
For me this bug breaks automated backup scripts which upload backups using smbclient - smbclient times out leaving a file with 0 byte length on server.
Expected results: File upload or delete is done correctly.
Steps to reproduce: prepare a large file on a server and heavily load the disk subsystem with writes (~10 threads writing other files). Then try to replace or remove this file with smbclient from another machine. The file size size should be chosen so that unix "rm" command requires at least 20s to remove this file (8GB worked for me).
Tested with samba server 3.0.21a (i386, Fedora Core 3, ext3 on raid5 on ATA disks, Pentium IV, 2GB RAM) and different smbclients: 3.0.21a on i386 Fedora Core 1, 3.0.14a-2 on i386 Fedora Core 4, 2.2.8a on Sparc Solaris 8.
Created attachment 3144 [details]
This just increases the timeout for libsmbclient
Created attachment 3145 [details]
This just increases the timeout for clientgen.c
Patches are for 3.0.28